public class ConfigurationHandler extends Object implements ConfigurationRepository
| Constructor and Description |
|---|
ConfigurationHandler(ServerContext serverContext)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addEntry(org.forgerock.opendj.ldap.Entry entry)
Add a configuration entry
|
void |
deleteEntry(org.forgerock.opendj.ldap.DN dn)
Delete a configuration entry.
|
void |
deregisterAddListener(org.forgerock.opendj.ldap.DN dn,
ConfigAddListener listener) |
boolean |
deregisterChangeListener(org.forgerock.opendj.ldap.DN dn,
ConfigChangeListener listener) |
void |
deregisterDeleteListener(org.forgerock.opendj.ldap.DN dn,
ConfigDeleteListener listener) |
List<ConfigAddListener> |
getAddListeners(org.forgerock.opendj.ldap.DN dn) |
List<ConfigChangeListener> |
getChangeListeners(org.forgerock.opendj.ldap.DN dn) |
Set<org.forgerock.opendj.ldap.DN> |
getChildren(org.forgerock.opendj.ldap.DN dn) |
List<ConfigDeleteListener> |
getDeleteListeners(org.forgerock.opendj.ldap.DN dn) |
org.forgerock.opendj.ldap.Entry |
getEntry(org.forgerock.opendj.ldap.DN dn) |
org.forgerock.opendj.ldap.Entry |
getRootEntry()
Returns the configuration root entry.
|
boolean |
hasEntry(org.forgerock.opendj.ldap.DN dn) |
void |
initialize()
Initialize the configuration.
|
long |
numSubordinates(org.forgerock.opendj.ldap.DN entryDN,
boolean subtree)
Retrieves the number of subordinates for the requested entry.
|
void |
registerAddListener(org.forgerock.opendj.ldap.DN dn,
ConfigAddListener listener) |
void |
registerChangeListener(org.forgerock.opendj.ldap.DN dn,
ConfigChangeListener listener) |
void |
registerDeleteListener(org.forgerock.opendj.ldap.DN dn,
ConfigDeleteListener listener) |
void |
replaceEntry(org.forgerock.opendj.ldap.Entry oldEntry,
org.forgerock.opendj.ldap.Entry newEntry)
Replaces the old configuration entry with the new configuration entry
provided.
|
public ConfigurationHandler(ServerContext serverContext)
serverContext - The server context.public void initialize() throws InitializationException
InitializationException - If an error occurs during the initialization.public org.forgerock.opendj.ldap.Entry getRootEntry()
public org.forgerock.opendj.ldap.Entry getEntry(org.forgerock.opendj.ldap.DN dn) throws ConfigException
getEntry in interface ConfigurationRepositoryConfigExceptionpublic boolean hasEntry(org.forgerock.opendj.ldap.DN dn) throws ConfigException
hasEntry in interface ConfigurationRepositoryConfigExceptionpublic Set<org.forgerock.opendj.ldap.DN> getChildren(org.forgerock.opendj.ldap.DN dn) throws ConfigException
getChildren in interface ConfigurationRepositoryConfigExceptionpublic long numSubordinates(org.forgerock.opendj.ldap.DN entryDN, boolean subtree) throws ConfigException
entryDN - The distinguished name of the entry.subtree - true to include all entries from the requested entry
to the lowest level in the tree or false to only
include the entries immediately below the requested entry.ConfigException - If a problem occurs while trying to retrieve the entry.public void addEntry(org.forgerock.opendj.ldap.Entry entry) throws DirectoryException
The add is performed only if all Add listeners on the parent entry accept the changes. Once the change is accepted, entry is effectively added and all Add listeners are called again to apply the change resulting from this new entry.
entry - The configuration entry to add.DirectoryException - If an error occurs.public void deleteEntry(org.forgerock.opendj.ldap.DN dn) throws DirectoryException
The delete is performed only if all Delete listeners on the parent entry accept the changes. Once the change is accepted, entry is effectively deleted and all Delete listeners are called again to apply the change resulting from this deletion.
dn - DN of entry to delete.DirectoryException - If a problem occurs.public void replaceEntry(org.forgerock.opendj.ldap.Entry oldEntry, org.forgerock.opendj.ldap.Entry newEntry) throws DirectoryException
The replacement is performed only if all Change listeners on the entry accept the changes. Once the change is accepted, entry is effectively replaced and all Change listeners are called again to apply the change resulting from the replacement.
oldEntry - The original entry that is being replaced.newEntry - The new entry to use in place of the existing entry with the same
DN.DirectoryException - If a problem occurs while trying to replace the entry.public void registerAddListener(org.forgerock.opendj.ldap.DN dn, ConfigAddListener listener)
registerAddListener in interface ConfigurationRepositorypublic void registerDeleteListener(org.forgerock.opendj.ldap.DN dn, ConfigDeleteListener listener)
registerDeleteListener in interface ConfigurationRepositorypublic void registerChangeListener(org.forgerock.opendj.ldap.DN dn, ConfigChangeListener listener)
registerChangeListener in interface ConfigurationRepositorypublic void deregisterAddListener(org.forgerock.opendj.ldap.DN dn, ConfigAddListener listener)
deregisterAddListener in interface ConfigurationRepositorypublic void deregisterDeleteListener(org.forgerock.opendj.ldap.DN dn, ConfigDeleteListener listener)
deregisterDeleteListener in interface ConfigurationRepositorypublic boolean deregisterChangeListener(org.forgerock.opendj.ldap.DN dn, ConfigChangeListener listener)
deregisterChangeListener in interface ConfigurationRepositorypublic List<ConfigAddListener> getAddListeners(org.forgerock.opendj.ldap.DN dn)
getAddListeners in interface ConfigurationRepositorypublic List<ConfigDeleteListener> getDeleteListeners(org.forgerock.opendj.ldap.DN dn)
getDeleteListeners in interface ConfigurationRepositorypublic List<ConfigChangeListener> getChangeListeners(org.forgerock.opendj.ldap.DN dn)
getChangeListeners in interface ConfigurationRepositoryCopyright © 2010-2015 ForgeRock AS. All Rights Reserved.