Package org.opends.server.core
Class RootDNConfigManager
- java.lang.Object
-
- org.opends.server.core.RootDNConfigManager
-
- All Implemented Interfaces:
ConfigurationAddListener<RootDNUserCfg>,ConfigurationChangeListener<RootDNUserCfg>,ConfigurationDeleteListener<RootDNUserCfg>
public class RootDNConfigManager extends Object implements ConfigurationChangeListener<RootDNUserCfg>, ConfigurationAddListener<RootDNUserCfg>, ConfigurationDeleteListener<RootDNUserCfg>
This class defines a utility that will be used to manage the set of root users defined in the Directory Server. It will handle both the "cn=Root DNs,cn=config" entry itself (through the root privilege change listener), and all of its children.
-
-
Constructor Summary
Constructors Constructor Description RootDNConfigManager(ServerContext serverContext)Creates a new instance of this root DN config manager.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConfigChangeResultapplyConfigurationAdd(RootDNUserCfg configuration)Adds a new configuration to this add listener.ConfigChangeResultapplyConfigurationChange(RootDNUserCfg configuration)Applies the configuration changes to this change listener.ConfigChangeResultapplyConfigurationDelete(RootDNUserCfg configuration)Deletes an existing configuration from this delete listener.Set<Privilege>getRootPrivileges()Retrieves the set of privileges that will be granted to root users by default.voidinitializeRootDNs()Initializes all of the root users currently defined in the Directory Server configuration, as well as the set of privileges that root users will inherit by default.booleanisConfigurationAddAcceptable(RootDNUserCfg configuration, List<org.forgerock.i18n.LocalizableMessage> unacceptableReasons)Indicates whether the proposed addition of a new configuration is acceptable to this add listener.booleanisConfigurationChangeAcceptable(RootDNUserCfg configuration, List<org.forgerock.i18n.LocalizableMessage> unacceptableReasons)Indicates whether the proposed change to the configuration is acceptable to this change listener.booleanisConfigurationDeleteAcceptable(RootDNUserCfg configuration, List<org.forgerock.i18n.LocalizableMessage> unacceptableReasons)Indicates whether the proposed deletion of an existing configuration is acceptable to this delete listener.
-
-
-
Constructor Detail
-
RootDNConfigManager
public RootDNConfigManager(ServerContext serverContext)
Creates a new instance of this root DN config manager.- Parameters:
serverContext- The server context.
-
-
Method Detail
-
initializeRootDNs
public void initializeRootDNs() throws ConfigException, InitializationExceptionInitializes all of the root users currently defined in the Directory Server configuration, as well as the set of privileges that root users will inherit by default.- Throws:
ConfigException- If a configuration problem causes the identity mapper initialization process to fail.InitializationException- If a problem occurs while initializing the identity mappers that is not related to the server configuration.
-
getRootPrivileges
public Set<Privilege> getRootPrivileges()
Retrieves the set of privileges that will be granted to root users by default.- Returns:
- The set of privileges that will be granted to root users by default.
-
isConfigurationAddAcceptable
public boolean isConfigurationAddAcceptable(RootDNUserCfg configuration, List<org.forgerock.i18n.LocalizableMessage> unacceptableReasons)
Description copied from interface:ConfigurationAddListenerIndicates whether the proposed addition of a new configuration is acceptable to this add listener.- Specified by:
isConfigurationAddAcceptablein interfaceConfigurationAddListener<RootDNUserCfg>- Parameters:
configuration- The configuration that will be added.unacceptableReasons- A list that can be used to hold messages about why the provided configuration is not acceptable.- Returns:
- Returns
trueif the proposed addition is acceptable, orfalseif it is not.
-
applyConfigurationAdd
public ConfigChangeResult applyConfigurationAdd(RootDNUserCfg configuration)
Description copied from interface:ConfigurationAddListenerAdds a new configuration to this add listener.- Specified by:
applyConfigurationAddin interfaceConfigurationAddListener<RootDNUserCfg>- Parameters:
configuration- The configuration that will be added.- Returns:
- Returns information about the result of adding the configuration.
-
isConfigurationDeleteAcceptable
public boolean isConfigurationDeleteAcceptable(RootDNUserCfg configuration, List<org.forgerock.i18n.LocalizableMessage> unacceptableReasons)
Description copied from interface:ConfigurationDeleteListenerIndicates whether the proposed deletion of an existing configuration is acceptable to this delete listener.- Specified by:
isConfigurationDeleteAcceptablein interfaceConfigurationDeleteListener<RootDNUserCfg>- Parameters:
configuration- The configuration that will be deleted.unacceptableReasons- A list that can be used to hold messages about why the provided configuration is not acceptable.- Returns:
- Returns
trueif the proposed deletion is acceptable, orfalseif it is not.
-
applyConfigurationDelete
public ConfigChangeResult applyConfigurationDelete(RootDNUserCfg configuration)
Description copied from interface:ConfigurationDeleteListenerDeletes an existing configuration from this delete listener.- Specified by:
applyConfigurationDeletein interfaceConfigurationDeleteListener<RootDNUserCfg>- Parameters:
configuration- The existing configuration that will be deleted.- Returns:
- Returns information about the result of deleting the configuration.
-
isConfigurationChangeAcceptable
public boolean isConfigurationChangeAcceptable(RootDNUserCfg configuration, List<org.forgerock.i18n.LocalizableMessage> unacceptableReasons)
Description copied from interface:ConfigurationChangeListenerIndicates whether the proposed change to the configuration is acceptable to this change listener.- Specified by:
isConfigurationChangeAcceptablein interfaceConfigurationChangeListener<RootDNUserCfg>- Parameters:
configuration- The new configuration containing the changes.unacceptableReasons- A list that can be used to hold messages about why the provided configuration is not acceptable.- Returns:
- Returns
trueif the proposed change is acceptable, orfalseif it is not.
-
applyConfigurationChange
public ConfigChangeResult applyConfigurationChange(RootDNUserCfg configuration)
Description copied from interface:ConfigurationChangeListenerApplies the configuration changes to this change listener.- Specified by:
applyConfigurationChangein interfaceConfigurationChangeListener<RootDNUserCfg>- Parameters:
configuration- The new configuration containing the changes.- Returns:
- Returns information about the result of changing the configuration.
-
-