T
- The type of configuration handled by this data provider.public interface DataProviderFactory<T extends DataProviderCfg>
DataProvider
Modifier and Type | Method and Description |
---|---|
DataProvider |
createDataProvider(DataProviderID id,
T configuration)
Creates and initializes a new data provider based on the information in
the provided configuration.
|
boolean |
isConfigurationAcceptable(T configuration,
List<LocalizableMessage> unacceptableReasons)
Indicates whether the provided configuration is acceptable for creating
and initializing a new data provider using this data provider factory.
|
DataProvider createDataProvider(DataProviderID id, T configuration) throws ConfigException
Implementations must not start any services nor attempt to connect to other data providers. However, they may register with the backup/restore and import/export managers.
id
- The ID which should be used to uniquely identify this data
provider.configuration
- The configuration that contains the information to use to
create and initialize the new data provider.ConfigException
- If an unrecoverable problem arises during initialization of
the data provider as a result of the server configuration.DataProvider.startDataProvider()
boolean isConfigurationAcceptable(T configuration, List<LocalizableMessage> unacceptableReasons)
This method will be called before
createDataProvider(DataProviderID, DataProviderCfg)
in order
validate the configuration.
Implementations should perform basic validation of the configuration but should not attempt to start any resource or connect to other data providers.
configuration
- The configuration for which to make the determination.unacceptableReasons
- A list that may be used to hold the reasons that the provided
configuration is not acceptable.true
if the provided configuration is acceptable for this
data provider factory, or false
if not.Copyright 2010-2017 ForgeRock AS.