public class BackendConfigManager extends Object implements org.forgerock.opendj.config.server.ConfigurationChangeListener<org.forgerock.opendj.server.config.server.BackendCfg>, org.forgerock.opendj.config.server.ConfigurationAddListener<org.forgerock.opendj.server.config.server.BackendCfg>, org.forgerock.opendj.config.server.ConfigurationDeleteListener<org.forgerock.opendj.server.config.server.BackendCfg>
It performs the necessary initialization of the backends when the server is first started, and then manages any changes to them while the server is running.
| Modifier and Type | Class and Description |
|---|---|
static class |
BackendConfigManager.NamingContext
Represents a naming context, determined by its base DN.
|
static class |
BackendConfigManager.NamingContextFilter
Filter on naming context.
|
| Constructor and Description |
|---|
BackendConfigManager(ServerContext serverContext)
Creates a new instance of this backend config manager.
|
| Modifier and Type | Method and Description |
|---|---|
org.forgerock.opendj.config.server.ConfigChangeResult |
applyConfigurationAdd(org.forgerock.opendj.server.config.server.BackendCfg cfg) |
org.forgerock.opendj.config.server.ConfigChangeResult |
applyConfigurationChange(org.forgerock.opendj.server.config.server.BackendCfg cfg) |
org.forgerock.opendj.config.server.ConfigChangeResult |
applyConfigurationDelete(org.forgerock.opendj.server.config.server.BackendCfg configEntry) |
boolean |
containsLocalNamingContext(org.forgerock.opendj.ldap.DN dn)
Indicates whether the specified DN is contained in the local backends as
a naming context.
|
void |
deregisterBaseDN(org.forgerock.opendj.ldap.DN baseDN)
Deregisters the provided base DN.
|
void |
deregisterLocalBackend(LocalBackend<?> backend)
Deregisters a local backend.
|
void |
deregisterLocalBackendInitializationListener(LocalBackendInitializationListener listener)
Deregisters a local backend initialization listener.
|
Backend<?> |
findBackendForEntry(org.forgerock.opendj.ldap.DN entryDN)
Retrieves the backend that should be used to handle operations on the specified entry.
|
LocalBackend<?> |
findLocalBackendForEntry(org.forgerock.opendj.ldap.DN entryDN)
Retrieves the local backend and the corresponding baseDN that should be used to handle operations
on the specified entry.
|
org.forgerock.opendj.ldap.DN |
findNamingContextForEntry(org.forgerock.opendj.ldap.DN entryDN)
Retrieves the naming context that should be used to handle operations
on the specified entry.
|
Set<org.forgerock.opendj.ldap.DN> |
findSubordinateLocalNamingContextsForEntry(org.forgerock.opendj.ldap.DN entryDN)
Retrieves the set of local naming contexts that are subordinates of the naming context
that should be used to handle operations on the specified entry.
|
Set<org.forgerock.opendj.ldap.DN> |
findSubordinateLocalNamingContextsToSearchForEntry(org.forgerock.opendj.ldap.DN entryDN)
Retrieves the set of local naming contexts that are subordinates of the naming context
that should be used to handle search operation on the specified entry.
|
Set<Backend<?>> |
getAllBackends()
Returns the set of all backends.
|
LocalBackend<?> |
getLocalBackendById(String backendId)
Retrieves a local backend provided its identifier.
|
Set<LocalBackend<?>> |
getLocalBackends()
Returns the set of local backends.
|
LocalBackend<?> |
getLocalBackendWithBaseDN(org.forgerock.opendj.ldap.DN baseDN)
Retrieves the local backend with the specified base DN.
|
Set<org.forgerock.opendj.ldap.DN> |
getNamingContexts(BackendConfigManager.NamingContextFilter... filters)
Retrieves naming contexts corresponding to backends, filtered with the combination of
all provided filters.
|
org.forgerock.opendj.ldap.DN |
getParentDNInSuffix(org.forgerock.opendj.ldap.DN dn)
Retrieves the DN that is the immediate parent for this DN.
|
RootDSEBackend |
getRootDSEBackend()
Retrieves the Root DSE backend.
|
Set<Backend<?>> |
getSubordinateBackends(Backend<?> backend)
Retrieves the set of subordinate backends of the provided backend.
|
boolean |
hasLocalBackend(String backendID)
Indicates whether the local backend with the provided id exists.
|
void |
initializeBackendConfig(Collection<String> backendIDsToStart)
Initializes the configuration associated with the Directory Server
backends.
|
void |
initializeBackends(Collection<String> backendIDsToStart,
org.forgerock.opendj.server.config.server.RootCfg root)
Initializes specified backends.
|
boolean |
isConfigurationAddAcceptable(org.forgerock.opendj.server.config.server.BackendCfg configEntry,
List<org.forgerock.i18n.LocalizableMessage> unacceptableReason) |
boolean |
isConfigurationChangeAcceptable(org.forgerock.opendj.server.config.server.BackendCfg configEntry,
List<org.forgerock.i18n.LocalizableMessage> unacceptableReason) |
boolean |
isConfigurationDeleteAcceptable(org.forgerock.opendj.server.config.server.BackendCfg configEntry,
List<org.forgerock.i18n.LocalizableMessage> unacceptableReason) |
void |
registerBaseDN(org.forgerock.opendj.ldap.DN baseDN,
Backend<? extends org.forgerock.opendj.server.config.server.BackendCfg> backend,
boolean isPrivate)
Registers the provided base DN.
|
void |
registerLocalBackend(LocalBackend<?> backend)
Registers a local backend.
|
void |
registerLocalBackendInitializationListener(LocalBackendInitializationListener listener)
Registers a local backend initialization listener.
|
void |
shutdownLocalBackends()
Shutdown all local backends.
|
public BackendConfigManager(ServerContext serverContext)
serverContext - The server context.public void initializeBackendConfig(Collection<String> backendIDsToStart) throws org.forgerock.opendj.config.server.ConfigException, InitializationException
backendIDsToStart - The list of backendID to start. Everything will be started if empty.org.forgerock.opendj.config.server.ConfigException - If a critical configuration problem prevents the backend
initialization from succeeding.InitializationException - If a problem occurs while initializing the backends that is not
related to the server configuration.public void initializeBackends(Collection<String> backendIDsToStart, org.forgerock.opendj.server.config.server.RootCfg root) throws org.forgerock.opendj.config.server.ConfigException
backendIDsToStart - The list of backendID to start. Everything will be started if empty.root - The configuration of the server's Root backendorg.forgerock.opendj.config.server.ConfigException - If a critical configuration problem prevents the backend
initialization from succeeding.public Set<Backend<?>> getAllBackends()
public Set<LocalBackend<?>> getLocalBackends()
public LocalBackend<?> getLocalBackendWithBaseDN(org.forgerock.opendj.ldap.DN baseDN)
baseDN - The DN that is registered as one of the base DNs for the
backend to retrieve.null if there
is no local backend registered with the specified base DN.public RootDSEBackend getRootDSEBackend()
public org.forgerock.opendj.ldap.DN getParentDNInSuffix(org.forgerock.opendj.ldap.DN dn)
dn - thenull if this DN does not
have a parent (either because there is only a single RDN component or because this DN
is a suffix defined in the server).public Backend<?> findBackendForEntry(org.forgerock.opendj.ldap.DN entryDN)
entryDN - The DN of the entry for which to retrieve the corresponding backend.null if no appropriate backend
is registered with the server.public org.forgerock.opendj.ldap.DN findNamingContextForEntry(org.forgerock.opendj.ldap.DN entryDN)
entryDN - The DN of the entry for which to retrieve the corresponding naming context.null if no appropriate naming context
is registered with the server.public LocalBackend<?> findLocalBackendForEntry(org.forgerock.opendj.ldap.DN entryDN)
entryDN - The DN of the entry for which to retrieve the corresponding backend.null if no appropriate local backend
is registered with the server.public LocalBackend<?> getLocalBackendById(String backendId)
backendId - Identifier of the backendnull if there is no local backend registered with the
specified id.public boolean hasLocalBackend(String backendID)
backendID - The backend ID for which to make the determination.true if a backend with the specified backend ID exists, false otherwisepublic Set<Backend<?>> getSubordinateBackends(Backend<?> backend)
backend - The backend for which to retrieve the subordinates backends.nullpublic Set<org.forgerock.opendj.ldap.DN> findSubordinateLocalNamingContextsForEntry(org.forgerock.opendj.ldap.DN entryDN)
entryDN - The DN of the entry for which to retrieve the corresponding naming context.null if no appropriate naming context
is registered with the server.public Set<org.forgerock.opendj.ldap.DN> findSubordinateLocalNamingContextsToSearchForEntry(org.forgerock.opendj.ldap.DN entryDN)
The global option that restricts the subordinate DNs to search (when searching "") may apply if the provided set is not empty.
entryDN - The DN of the entry for which to retrieve the corresponding naming context.null if no appropriate naming context
is registered with the server.public Set<org.forgerock.opendj.ldap.DN> getNamingContexts(BackendConfigManager.NamingContextFilter... filters)
filters - filter the naming contextsBackendConfigManager.NamingContextpublic boolean containsLocalNamingContext(org.forgerock.opendj.ldap.DN dn)
dn - The DN for which to make the determination.true if the specified DN is a naming context in one
backend, or false if it is not.public void registerBaseDN(org.forgerock.opendj.ldap.DN baseDN,
Backend<? extends org.forgerock.opendj.server.config.server.BackendCfg> backend,
boolean isPrivate)
throws DirectoryException
baseDN - The base DN to register. It must not be null.backend - The backend responsible for the provided base DN. It must not be null.isPrivate - Indicates whether the base DN should be considered a private base DN. If the provided
base DN is a naming context, then this controls whether it is public or private.DirectoryException - If a problem occurs while attempting to register the provided base DN.public void registerLocalBackend(LocalBackend<?> backend) throws DirectoryException
backend - The backend to register with the server.
Neither the backend nor its backend ID may be null.DirectoryException - If the backend ID for the provided backend conflicts with the backend ID of an
existing backend.public void registerLocalBackendInitializationListener(LocalBackendInitializationListener listener)
listener - The listener to register.public void deregisterBaseDN(org.forgerock.opendj.ldap.DN baseDN)
throws DirectoryException
baseDN - The base DN to deregister. It must not be null.DirectoryException - If a problem occurs while attempting to deregister the provided base DN.public void deregisterLocalBackendInitializationListener(LocalBackendInitializationListener listener)
listener - The listener to deregister.public void deregisterLocalBackend(LocalBackend<?> backend)
backend - The backend to deregister with the server. It must not be null.public boolean isConfigurationChangeAcceptable(org.forgerock.opendj.server.config.server.BackendCfg configEntry,
List<org.forgerock.i18n.LocalizableMessage> unacceptableReason)
isConfigurationChangeAcceptable in interface org.forgerock.opendj.config.server.ConfigurationChangeListener<org.forgerock.opendj.server.config.server.BackendCfg>public org.forgerock.opendj.config.server.ConfigChangeResult applyConfigurationChange(org.forgerock.opendj.server.config.server.BackendCfg cfg)
applyConfigurationChange in interface org.forgerock.opendj.config.server.ConfigurationChangeListener<org.forgerock.opendj.server.config.server.BackendCfg>public boolean isConfigurationAddAcceptable(org.forgerock.opendj.server.config.server.BackendCfg configEntry,
List<org.forgerock.i18n.LocalizableMessage> unacceptableReason)
isConfigurationAddAcceptable in interface org.forgerock.opendj.config.server.ConfigurationAddListener<org.forgerock.opendj.server.config.server.BackendCfg>public org.forgerock.opendj.config.server.ConfigChangeResult applyConfigurationAdd(org.forgerock.opendj.server.config.server.BackendCfg cfg)
applyConfigurationAdd in interface org.forgerock.opendj.config.server.ConfigurationAddListener<org.forgerock.opendj.server.config.server.BackendCfg>public boolean isConfigurationDeleteAcceptable(org.forgerock.opendj.server.config.server.BackendCfg configEntry,
List<org.forgerock.i18n.LocalizableMessage> unacceptableReason)
isConfigurationDeleteAcceptable in interface org.forgerock.opendj.config.server.ConfigurationDeleteListener<org.forgerock.opendj.server.config.server.BackendCfg>public org.forgerock.opendj.config.server.ConfigChangeResult applyConfigurationDelete(org.forgerock.opendj.server.config.server.BackendCfg configEntry)
applyConfigurationDelete in interface org.forgerock.opendj.config.server.ConfigurationDeleteListener<org.forgerock.opendj.server.config.server.BackendCfg>public void shutdownLocalBackends()
Copyright © 2010-2020 Wren Security. All Rights Reserved.