Package com.xebialabs.license.service
Class AbstractLicenseService
java.lang.Object
com.xebialabs.license.service.BaseLicenseService
com.xebialabs.license.service.AbstractLicenseService
- All Implemented Interfaces:
com.xebialabs.license.service.LicenseService
- Direct Known Subclasses:
LicenseServiceImpl,RegistrationLicenseService
public abstract class AbstractLicenseService
extends BaseLicenseService
implements com.xebialabs.license.service.LicenseService
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Collection<com.xebialabs.license.LicenseType> protected final Clockprotected com.xebialabs.license.Licenseprotected final Fileprotected static final org.slf4j.Loggerprotected final Stringprotected com.xebialabs.deployit.repository.RepositoryMetadataServiceFields inherited from class com.xebialabs.license.service.BaseLicenseService
ciCounter, ciCounterFactory -
Constructor Summary
ConstructorsConstructorDescriptionAbstractLicenseService(String licensePath, String product, com.xebialabs.deployit.repository.RepositoryMetadataService repositoryMetadataService) AbstractLicenseService(String licensePath, String product, com.xebialabs.deployit.repository.RepositoryMetadataService repositoryMetadataService, Clock clock) -
Method Summary
Modifier and TypeMethodDescriptioncom.xebialabs.license.Licenseorg.joda.time.Periodvoidinitialize(com.xebialabs.license.service.LicenseCiCounterFactory ciCounterFactory) protected booleanisAllowedLicenseType(com.xebialabs.license.License license) booleanprotected booleanisValidEdition(com.xebialabs.license.License license) protected voidlogLicenseEditionError(com.xebialabs.license.License license) protected voidlogLicenseError(File licenseFile) protected voidlogLicenseVersionError(com.xebialabs.license.License license) protected abstract com.xebialabs.license.LicensereadLicense(File licenseFile) voidreload()voidvalidate()voidvalidate(com.xebialabs.license.License license) protected voidvalidateLicenseProperties(com.xebialabs.license.License license) Methods inherited from class com.xebialabs.license.service.BaseLicenseService
getCounter, initialize, reLoadCiCounter, rollbackTransaction, startTransactionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.xebialabs.license.service.LicenseService
getCounter, rollbackTransaction, startTransaction
-
Field Details
-
log
protected static final org.slf4j.Logger log -
allowedLicenseTypes
-
clock
-
licenseFile
-
product
-
allowedEditions
-
license
protected com.xebialabs.license.License license -
repositoryMetadataService
protected com.xebialabs.deployit.repository.RepositoryMetadataService repositoryMetadataService
-
-
Constructor Details
-
AbstractLicenseService
-
AbstractLicenseService
-
-
Method Details
-
initialize
public void initialize(com.xebialabs.license.service.LicenseCiCounterFactory ciCounterFactory) - Specified by:
initializein interfacecom.xebialabs.license.service.LicenseService
-
logLicenseError
-
logLicenseVersionError
protected void logLicenseVersionError(com.xebialabs.license.License license) -
logLicenseEditionError
protected void logLicenseEditionError(com.xebialabs.license.License license) -
getProduct
- Specified by:
getProductin interfacecom.xebialabs.license.service.LicenseService
-
isLicenseExpired
public boolean isLicenseExpired()- Specified by:
isLicenseExpiredin interfacecom.xebialabs.license.service.LicenseService
-
getValidPeriod
public org.joda.time.Period getValidPeriod()- Specified by:
getValidPeriodin interfacecom.xebialabs.license.service.LicenseService
-
validate
public void validate() throws com.xebialabs.license.LicenseViolationException- Specified by:
validatein interfacecom.xebialabs.license.service.LicenseService- Overrides:
validatein classBaseLicenseService- Throws:
com.xebialabs.license.LicenseViolationException
-
validate
public void validate(com.xebialabs.license.License license) throws com.xebialabs.license.LicenseViolationException - Specified by:
validatein interfacecom.xebialabs.license.service.LicenseService- Overrides:
validatein classBaseLicenseService- Throws:
com.xebialabs.license.LicenseViolationException
-
reload
public void reload() throws com.xebialabs.license.LicenseViolationException, com.xebialabs.license.LicenseParseException- Specified by:
reloadin interfacecom.xebialabs.license.service.LicenseService- Throws:
com.xebialabs.license.LicenseViolationExceptioncom.xebialabs.license.LicenseParseException
-
getLicense
public com.xebialabs.license.License getLicense()- Specified by:
getLicensein interfacecom.xebialabs.license.service.LicenseService
-
validateLicenseProperties
protected void validateLicenseProperties(com.xebialabs.license.License license) throws com.xebialabs.license.LicenseViolationException - Throws:
com.xebialabs.license.LicenseViolationException
-
isValidEdition
protected boolean isValidEdition(com.xebialabs.license.License license) -
isAllowedLicenseType
protected boolean isAllowedLicenseType(com.xebialabs.license.License license) -
readLicense
protected abstract com.xebialabs.license.License readLicense(File licenseFile) throws com.xebialabs.license.LicenseParseException, com.xebialabs.license.LicenseViolationException - Throws:
com.xebialabs.license.LicenseParseExceptioncom.xebialabs.license.LicenseViolationException
-