Class ConfigurationServiceImpl

java.lang.Object
org.finos.fluxnova.bpm.engine.impl.ServiceImpl
org.finos.fluxnova.bpm.engine.impl.ConfigurationServiceImpl
All Implemented Interfaces:
ConfigurationService

public class ConfigurationServiceImpl extends ServiceImpl implements ConfigurationService
  • Constructor Details

    • ConfigurationServiceImpl

      public ConfigurationServiceImpl()
  • Method Details

    • createConfiguration

      public Configuration createConfiguration(String configKey, String configValue, String tenantId)
      Description copied from interface: ConfigurationService

      Creates a new configuration entry.

      If tenantId is null the 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:
      createConfiguration in interface ConfigurationService
      Parameters:
      configKey - the configuration key, must not be null
      configValue - the configuration value, must not be null or blank
      tenantId - the tenant to scope the entry to, or null for a global entry
      Returns:
      the newly created configuration
    • getConfiguration

      public Configuration getConfiguration(String configurationId)
      Description copied from interface: ConfigurationService

      Returns the configuration with the given id.

      Specified by:
      getConfiguration in interface ConfigurationService
      Parameters:
      configurationId - the id of the configuration, must not be null
      Returns:
      the configuration, or null if no configuration exists for that id
    • getConfigurations

      public List<Configuration> getConfigurations(String tenantId, boolean includeInactive)
      Description copied from interface: ConfigurationService
      Returns the configurations applicable to the requested scope.

      If tenantId is null, 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 includeInactive is true, all entries of every status are returned without merging: the global entries and, when tenantId is set, the tenant's entries.

      Specified by:
      getConfigurations in interface ConfigurationService
      Parameters:
      tenantId - the tenant scope, or null for global defaults
      includeInactive - whether to include inactive configurations
      Returns:
      configurations ordered by key, then global before tenant, then version
    • updateConfiguration

      public Configuration updateConfiguration(String configurationId, String configValue)
      Description copied from interface: ConfigurationService

      Updates the value of an active configuration by creating a new version.

      The existing entry is marked Configuration.STATUS_INACTIVE and a new Configuration.STATUS_ACTIVE entry 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:
      updateConfiguration in interface ConfigurationService
      Parameters:
      configurationId - the id of the active configuration to update
      configValue - the new configuration value, must not be blank
      Returns:
      the newly created active configuration version
    • deleteConfiguration

      public void deleteConfiguration(String configurationId)
      Description copied from interface: ConfigurationService

      Soft-deletes an active configuration by marking it Configuration.STATUS_DELETED. The entry is retained and can still be retrieved by id or with includeInactive.

      Specified by:
      deleteConfiguration in interface ConfigurationService
      Parameters:
      configurationId - the id of the active configuration to delete