Class BeCPGLicenseManager

java.lang.Object
fr.becpg.repo.license.BeCPGLicenseManager

@Service("becpgLicenseManager") @DependsOn public class BeCPGLicenseManager extends Object

BeCPGLicenseManager class.

Version:
$Id: $Id
Author:
matthieu
  • Field Details

    • INVALID_LICENSE_FILE

      private static final String INVALID_LICENSE_FILE
      See Also:
    • logger

      private static final org.apache.commons.logging.Log logger
    • beCPGCacheService

      @Autowired private BeCPGCacheService beCPGCacheService
    • repoService

      @Autowired private RepoService repoService
    • nodeService

      @Autowired private org.alfresco.service.cmr.repository.NodeService nodeService
    • contentService

      @Autowired private org.alfresco.service.cmr.repository.ContentService contentService
    • authenticationService

      @Autowired private org.alfresco.repo.security.authentication.AbstractAuthenticationService authenticationService
    • showLicenseWarning

      @Value("${beCPG.licence.showWarning:true}") private boolean showLicenseWarning
  • Constructor Details

    • BeCPGLicenseManager

      public BeCPGLicenseManager()
  • Method Details

    • isShowLicenseWarning

      public boolean isShowLicenseWarning()

      isShowUnauthorizedWarning.

      Returns:
      a boolean.
    • getAllowedConcurrentRead

      public long getAllowedConcurrentRead()

      getAllowedConcurrentRead.

      Returns:
      a long.
    • getLicense

      private BeCPGLicense getLicense()
    • getAllowedConcurrentWrite

      public long getAllowedConcurrentWrite()

      getAllowedConcurrentWrite.

      Returns:
      a long.
    • getAllowedConcurrentSupplier

      public long getAllowedConcurrentSupplier()

      getAllowedConcurrentSupplier.

      Returns:
      a long.
    • getAllowedNamedWrite

      public long getAllowedNamedWrite()

      getAllowedNamedWrite.

      Returns:
      a long.
    • getAllowedNamedRead

      public long getAllowedNamedRead()

      getAllowedNamedRead.

      Returns:
      a long.
    • getLicenseName

      public String getLicenseName()

      getLicenseName.

      Returns:
      a String object.
    • isLicenseValid

      public boolean isLicenseValid()

      isLicenseValid.

      Returns:
      a boolean
    • namedLicenseExceeded

      private boolean namedLicenseExceeded()
    • isValid

      public static boolean isValid(String licenseKey, BeCPGLicense license)

      isValid.

      Parameters:
      licenseKey - a String object.
      license - a BeCPGLicense object.
      Returns:
      a boolean.
    • computeLicenseKey

      public static String computeLicenseKey(BeCPGLicense license)

      computeLicenseKey.

      Parameters:
      license - a BeCPGLicense object.
      Returns:
      a String object.
    • getLicenseFile

      private org.json.JSONObject getLicenseFile()
    • floatingLicensesExceeded

      public boolean floatingLicensesExceeded(String sessionId)

      floatingLicensesExceeded.

      Parameters:
      sessionId - a String object
      Returns:
      a boolean
    • isSpecialLicenceUser

      public boolean isSpecialLicenceUser()

      isSpecialLicenceUser.

      Returns:
      a boolean
    • isSpecialLicenseUser

      public boolean isSpecialLicenseUser(String runAsUser)

      isSpecialLicenseUser.

      Parameters:
      runAsUser - a String object
      Returns:
      a boolean
    • hasWriteLicense

      public boolean hasWriteLicense()

      hasWriteLicense.

      Returns:
      a boolean