public interface ConfigurationService<T extends UserPasswordConfiguration>
Modifier and Type | Method and Description |
---|---|
void |
addConfigurationServiceListener(ConfigurationServiceListener<T> listener)
Adds a configuration event listener to this service
|
void |
deleteConfiguration(java.lang.String name) |
T |
getConfiguration(java.lang.String name)
Gets a configuration by its name and fails if not found.
|
java.util.List<ConfigurationDescriptor> |
getConfigurationDescriptors() |
java.util.List<T> |
getConfigurations() |
java.lang.Class<T> |
getConfigurationType()
Type of configuration handled by this service
|
java.util.Optional<T> |
getOptionalConfiguration(java.lang.String name) |
T |
newConfiguration(T configuration) |
T |
replaceConfiguration(T configuration,
java.util.function.Function<java.lang.String,java.lang.String> replacementFunction)
Tries to replace a configuration by another based on its name.
|
ConnectionResult |
test(T configuration)
Tests a configuration
|
void |
updateConfiguration(java.lang.String name,
T configuration)
Gets the former password if new password is blank for the same user.
|
java.util.List<T> getConfigurations()
java.util.List<ConfigurationDescriptor> getConfigurationDescriptors()
T getConfiguration(java.lang.String name)
Note that the returned configuration is not obfuscated. It can be used internally safely and will be obfuscated whenever sent to the client.
name
- Name of the configuration to findConfigurationNotFoundException
- If the configuration cannot be foundjava.util.Optional<T> getOptionalConfiguration(java.lang.String name)
void deleteConfiguration(java.lang.String name)
ConnectionResult test(T configuration)
void updateConfiguration(java.lang.String name, T configuration)
T replaceConfiguration(T configuration, java.util.function.Function<java.lang.String,java.lang.String> replacementFunction) throws ConfigurationNotFoundException
If the replacement function, applied on the configuration name, would give the same exact name, this method returns the configuration.
If the names are different, there are two cases:
ConfigurationNotFoundException
exception is thrown.ConfigurationNotFoundException
java.lang.Class<T> getConfigurationType()
void addConfigurationServiceListener(ConfigurationServiceListener<T> listener)