Package com.atlassian.jira.license
Class MultiLicenseStoreImpl
java.lang.Object
com.atlassian.jira.license.MultiLicenseStoreImpl
- All Implemented Interfaces:
MultiLicenseStore
Store that looks for licenses in the
ProductLicense table.- Since:
- v6.3
-
Constructor Summary
ConstructorsConstructorDescriptionMultiLicenseStoreImpl(EntityEngine entityEngine, ApplicationProperties applicationProperties, com.atlassian.beehive.ClusterLockService clusterLockService) -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Removes all licenses from JIRA.voidconfirmProceedUnderEvaluationTerms(String userName) This will confirm that user has agreed to proceed under Evaluation terms, typically when the license is too old for the current JIRA build.voidResets persisted information about license in use being too old for current build.retrieve()Retrieves all product license strings.Gets the server ID from the persistence backendvoidPersists a new state for all licenses.voidstoreServerId(String serverId) Stores the server ID to the persistent backend
-
Constructor Details
-
MultiLicenseStoreImpl
public MultiLicenseStoreImpl(EntityEngine entityEngine, ApplicationProperties applicationProperties, com.atlassian.beehive.ClusterLockService clusterLockService)
-
-
Method Details
-
retrieve
Description copied from interface:MultiLicenseStoreRetrieves all product license strings. The returned Iterable is immutable and is ordered by the ID in the database. The returned Iterable is not null and does not contain null elements. The absence of a license is indicated by an empty list.- Specified by:
retrievein interfaceMultiLicenseStore- Returns:
- all current license strings from persistence
-
store
Description copied from interface:MultiLicenseStorePersists a new state for all licenses. This will overwrite all licenses currently stored.This method will do some cursory checking of inputs but will still store most invalid licenses if requested. The caller should test licenses strings for validity before attempting to store them. This method may throw an unspecified runtime exception if the argument is invalid, for example if it is null, empty, or contains a null element.
Until the application roles dark feature is enabled, MultiLicenseStores may operate in legacy mode. In legacy mode a single license is arbitrarily chosen and stored in the backing legacy license store, typically as an ApplicationProperties property. It is the caller's responsibility to ensure that no more than one license is attempted to be stored when in legacy mode.
- Specified by:
storein interfaceMultiLicenseStore- Parameters:
licenses- the license strings to store
-
resetOldBuildConfirmation
public void resetOldBuildConfirmation()Description copied from interface:MultiLicenseStoreResets persisted information about license in use being too old for current build.- Specified by:
resetOldBuildConfirmationin interfaceMultiLicenseStore
-
confirmProceedUnderEvaluationTerms
Description copied from interface:MultiLicenseStoreThis will confirm that user has agreed to proceed under Evaluation terms, typically when the license is too old for the current JIRA build.- Specified by:
confirmProceedUnderEvaluationTermsin interfaceMultiLicenseStore- Parameters:
userName- the name of the user that made the confirmation
-
clear
public void clear()Description copied from interface:MultiLicenseStoreRemoves all licenses from JIRA. Usually you don't want to call this, but it is used to clear out corrupt licenses.- Specified by:
clearin interfaceMultiLicenseStore
-
retrieveServerId
Description copied from interface:MultiLicenseStoreGets the server ID from the persistence backend- Specified by:
retrieveServerIdin interfaceMultiLicenseStore- Returns:
- the server ID,
nullif not found
-
storeServerId
Description copied from interface:MultiLicenseStoreStores the server ID to the persistent backend- Specified by:
storeServerIdin interfaceMultiLicenseStore- Parameters:
serverId- the server ID to store
-