Class License

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

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

  • Constructor Details

    • License

      public License(String data)
  • Method Details

    • getData

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

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

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

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

      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

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

      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

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

      public String toString()
      Overrides:
      toString in class Object