Class ConfigurationServiceImpl
- All Implemented Interfaces:
ConfigurationService
-
Field Summary
Fields inherited from class org.finos.fluxnova.bpm.engine.impl.ServiceImpl
commandExecutor -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateConfiguration(String configKey, String configValue, String tenantId) Creates a new configuration entry.voiddeleteConfiguration(String configurationId) Soft-deletes an active configuration by marking itConfiguration.STATUS_DELETED.getConfiguration(String configurationId) Returns the configuration with the given id.getConfigurations(String tenantId, boolean includeInactive) Returns the configurations applicable to the requested scope.updateConfiguration(String configurationId, String configValue) Updates the value of an active configuration by creating a new version.Methods inherited from class org.finos.fluxnova.bpm.engine.impl.ServiceImpl
getCommandExecutor, setCommandExecutor
-
Constructor Details
-
ConfigurationServiceImpl
public ConfigurationServiceImpl()
-
-
Method Details
-
createConfiguration
Description copied from interface:ConfigurationServiceCreates a new configuration entry.
If
tenantIdisnullthe entry is created as a global configuration which applies to all tenants.The version starts at 1, or continues after the highest existing version when a previously deleted key is re-created in the same scope.
- Specified by:
createConfigurationin interfaceConfigurationService- Parameters:
configKey- the configuration key, must not benullconfigValue- the configuration value, must not benullor blanktenantId- the tenant to scope the entry to, ornullfor a global entry- Returns:
- the newly created configuration
-
getConfiguration
Description copied from interface:ConfigurationServiceReturns the configuration with the given id.
- Specified by:
getConfigurationin interfaceConfigurationService- Parameters:
configurationId- the id of the configuration, must not benull- Returns:
- the configuration, or
nullif no configuration exists for that id
-
getConfigurations
Description copied from interface:ConfigurationServiceReturns the configurations applicable to the requested scope.If
tenantIdisnull, the global default configurations are returned. For a tenant, active global configurations are returned with any active tenant entry replacing the global entry of the same key.If
includeInactiveistrue, all entries of every status are returned without merging: the global entries and, whentenantIdis set, the tenant's entries.- Specified by:
getConfigurationsin interfaceConfigurationService- Parameters:
tenantId- the tenant scope, ornullfor global defaultsincludeInactive- whether to include inactive configurations- Returns:
- configurations ordered by key, then global before tenant, then version
-
updateConfiguration
Description copied from interface:ConfigurationServiceUpdates the value of an active configuration by creating a new version.
The existing entry is marked
Configuration.STATUS_INACTIVEand a newConfiguration.STATUS_ACTIVEentry with the same key and tenant scope is created. Its version is one greater than the highest existing version for that key and scope.- Specified by:
updateConfigurationin interfaceConfigurationService- Parameters:
configurationId- the id of the active configuration to updateconfigValue- the new configuration value, must not be blank- Returns:
- the newly created active configuration version
-
deleteConfiguration
Description copied from interface:ConfigurationServiceSoft-deletes an active configuration by marking it
Configuration.STATUS_DELETED. The entry is retained and can still be retrieved by id or withincludeInactive.- Specified by:
deleteConfigurationin interfaceConfigurationService- Parameters:
configurationId- the id of the active configuration to delete
-