Package fr.becpg.repo.license
Class BeCPGLicenseManager
java.lang.Object
fr.becpg.repo.license.BeCPGLicenseManager
BeCPGLicenseManager class.
- Version:
- $Id: $Id
- Author:
- matthieu
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate org.alfresco.repo.security.authentication.AbstractAuthenticationServiceprivate BeCPGCacheServiceprivate org.alfresco.service.cmr.repository.ContentServiceprivate static final Stringprivate static final org.apache.commons.logging.Logprivate org.alfresco.service.cmr.repository.NodeServiceprivate RepoServiceprivate boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringcomputeLicenseKey(BeCPGLicense license) computeLicenseKey.booleanfloatingLicensesExceeded(String sessionId) floatingLicensesExceeded.longgetAllowedConcurrentRead.longgetAllowedConcurrentSupplier.longgetAllowedConcurrentWrite.longgetAllowedNamedRead.longgetAllowedNamedWrite.private BeCPGLicenseprivate org.json.JSONObjectgetLicenseName.booleanhasWriteLicense.booleanisLicenseValid.booleanisShowUnauthorizedWarning.booleanisSpecialLicenceUser.booleanisSpecialLicenseUser(String runAsUser) isSpecialLicenseUser.static booleanisValid(String licenseKey, BeCPGLicense license) isValid.private boolean
-
Field Details
-
INVALID_LICENSE_FILE
- See Also:
-
logger
private static final org.apache.commons.logging.Log logger -
beCPGCacheService
-
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
-
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
getLicenseName.
- Returns:
- a
Stringobject.
-
isLicenseValid
public boolean isLicenseValid()isLicenseValid.
- Returns:
- a boolean
-
namedLicenseExceeded
private boolean namedLicenseExceeded() -
isValid
isValid.
- Parameters:
licenseKey- aStringobject.license- aBeCPGLicenseobject.- Returns:
- a boolean.
-
computeLicenseKey
computeLicenseKey.
- Parameters:
license- aBeCPGLicenseobject.- Returns:
- a
Stringobject.
-
getLicenseFile
private org.json.JSONObject getLicenseFile() -
floatingLicensesExceeded
floatingLicensesExceeded.
- Parameters:
sessionId- aStringobject- Returns:
- a boolean
-
isSpecialLicenceUser
public boolean isSpecialLicenceUser()isSpecialLicenceUser.
- Returns:
- a boolean
-
isSpecialLicenseUser
isSpecialLicenseUser.
- Parameters:
runAsUser- aStringobject- Returns:
- a boolean
-
hasWriteLicense
public boolean hasWriteLicense()hasWriteLicense.
- Returns:
- a boolean
-