Class License

java.lang.Object
org.bgerp.app.dist.lic.License

public class License extends Object
License for plugins.
  • Field Details Link icon

  • Constructor Details Link icon

    • License Link icon

      public License(String data)
  • Method Details Link icon

    • getData Link icon

      public String getData()
      License content.
      Returns:
    • getDigest Link icon

      public byte[] getDigest()
      Digest for all the license's lines before lic.sign.signature.
      Returns:
    • getError Link icon

      public String getError()
      License check result.
      Returns:
      null on correct result, or error text.
    • getPlugins Link icon

      public Set<String> getPlugins()
      Plugin IDs.
      Returns:
    • sign Link icon

      public byte[] sign(String keyFilePath, String keyFilePswd) throws Exception
      License content with signature on the end.
      Parameters:
      keyFilePath - file of Java resource path to SSH private key file.
      keyFilePswd - password to SSH private key file, null - no password is used.
      Returns:
      UTF-8 encoded signed license.
      Throws:
      Exception
    • check Link icon

      public void check(DynActionForm form)
      Adds LicenseEvent to form response case the license has error.
      Parameters:
      form -
    • checkSessionLimit Link icon

      public boolean checkSessionLimit()
      Checks if count of logged in users is less that license limit. When error is not blank, returns true to allow fix the license. Return true when license check is disabled.
      Returns:
      allowance to log in.
    • isCreatedToday Link icon

      public boolean isCreatedToday()
      Returns:
      is the license object created today.
    • toString Link icon

      public String toString()
      Overrides:
      toString in class Object