Package org.forgerock.opendj.config
Class ConfigurationFramework
java.lang.Object
org.forgerock.opendj.config.ConfigurationFramework
This class is responsible for managing the configuration framework including:
- loading core components during application initialization
- loading extensions during and after application initialization
- changing the property validation strategy based on whether the application is a client or server.
Initially the configuration framework is disabled, and calls to the getClassLoader()
will return the system default class loader.
Applications MUST NOT maintain persistent references to the class loader as it can change at run-time.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Initializes the configuration framework using the application's class loader as the parent class loader, and the provided install and instance paths.static ClassLoader
Returns the class loader which should be used for loading classes and resources.static String
getPrintableExtensionInformation
(ServerPaths serverPaths) Returns a string representing all information about extensions.void
Initializes the configuration framework using the application's class loader as the parent class loader, and the current working directory as the install and instance path.void
Silently initialize the configuration framework.static ConfigurationFramework
newConfigurationFramework
(ServerPaths serverPaths) Returns a new configuration framework instance.
-
Method Details
-
getPrintableExtensionInformation
Returns a string representing all information about extensions.- Parameters:
serverPaths
- The server paths- Returns:
- A string representing all information about extensions;
null
if there is no information available.
-
newConfigurationFramework
Returns a new configuration framework instance.- Parameters:
serverPaths
- the server paths to use- Returns:
- a new configuration framework instance
-
getClassLoader
Returns the class loader which should be used for loading classes and resources. When this configuration framework is disabled, the system default class loader will be returned by default.Applications MUST NOT maintain persistent references to the class loader as it can change at run-time.
- Returns:
- Returns the class loader which should be used for loading classes and resources.
-
initialize
Initializes the configuration framework using the application's class loader as the parent class loader, and the current working directory as the install and instance path.- Throws:
ConfigException
- If the configuration framework could not initialize successfully.IllegalStateException
- If the configuration framework has already been initialized.
-
initializeSilently
public void initializeSilently()Silently initialize the configuration framework.Do not log anything during the initialization. Catch
ConfigException
which may occurs and convert it to aRuntimeException
. This method should be used by client tools who need to initialize the framework. -
forceInitialize
Initializes the configuration framework using the application's class loader as the parent class loader, and the provided install and instance paths.- Throws:
ConfigException
- If the configuration framework could not initialize successfully.IllegalStateException
- If the configuration framework has already been initialized.
-