Interface ConfigurationRepository
-
- All Known Implementing Classes:
ConfigurationHandler
public interface ConfigurationRepository
Provides configuration entries and listener registration on the entries.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
deregisterAddListener(Dn dn, ConfigAddListener listener)
Deregisters the provided add listener so that it will no longer be notified if any new entries are added immediately below the entry corresponding to the provided DN.boolean
deregisterChangeListener(Dn dn, ConfigChangeListener listener)
Attempts to deregister the provided change listener with the provided DN.void
deregisterDeleteListener(Dn dn, ConfigDeleteListener listener)
Deregisters the provided delete listener so that it will no longer be notified if any entries are deleted immediately below the entry corresponding to the provided DN.List<ConfigAddListener>
getAddListeners(Dn dn)
Retrieves the add listeners that have been registered with the provided DN.List<ConfigChangeListener>
getChangeListeners(Dn dn)
Retrieves the change listeners that have been registered with the provided DN.Set<Dn>
getChildren(Dn dn)
Returns the set of DNs of children of the entry corresponding to the provided DN.List<ConfigDeleteListener>
getDeleteListeners(Dn dn)
Retrieves the delete listeners that have been registered with the provided DN.Entry
getEntry(Dn dn)
Returns the configuration entry for the provided DN.boolean
hasEntry(Dn dn)
Checks if the provided DN corresponds to a configuration entry.void
registerAddListener(Dn dn, ConfigAddListener listener)
Registers the provided add listener so that it will be notified if any new entries are added immediately below the entry corresponding to the provided DN.void
registerChangeListener(Dn dn, ConfigChangeListener listener)
Registers the provided change listener so that it will be notified of any changes to the entry corrresponding to provided DN.void
registerDeleteListener(Dn dn, ConfigDeleteListener listener)
Registers the provided delete listener so that it will be notified if any entries are deleted immediately below the entry corresponding to the provided DN.
-
-
-
Method Detail
-
getChildren
Set<Dn> getChildren(Dn dn) throws ConfigException
Returns the set of DNs of children of the entry corresponding to the provided DN. .- Parameters:
dn
- DN of a configuration entry.- Returns:
- the set of DN of children of the corresponding entry
- Throws:
ConfigException
- If a problem occurs during retrieval.
-
getEntry
Entry getEntry(Dn dn)
Returns the configuration entry for the provided DN.- Parameters:
dn
- DN of the configuration entry- Returns:
- the config entry
-
hasEntry
boolean hasEntry(Dn dn)
Checks if the provided DN corresponds to a configuration entry.- Parameters:
dn
- DN of the configuration entry- Returns:
true
if and only if there is a configuration entry with this DN
-
registerAddListener
void registerAddListener(Dn dn, ConfigAddListener listener)
Registers the provided add listener so that it will be notified if any new entries are added immediately below the entry corresponding to the provided DN.- Parameters:
dn
- The DN of the configuration entry.listener
- The add listener that should be registered.
-
registerDeleteListener
void registerDeleteListener(Dn dn, ConfigDeleteListener listener)
Registers the provided delete listener so that it will be notified if any entries are deleted immediately below the entry corresponding to the provided DN.- Parameters:
dn
- The DN of the configuration entry.listener
- The delete listener that should be registered.
-
registerChangeListener
void registerChangeListener(Dn dn, ConfigChangeListener listener)
Registers the provided change listener so that it will be notified of any changes to the entry corrresponding to provided DN. No check will be made to determine whether the provided listener is already registered.- Parameters:
dn
- The DN of the configuration entry.listener
- The change listener that should be registered.
-
deregisterAddListener
void deregisterAddListener(Dn dn, ConfigAddListener listener)
Deregisters the provided add listener so that it will no longer be notified if any new entries are added immediately below the entry corresponding to the provided DN.- Parameters:
dn
- The DN of the configuration entry.listener
- The add listener that should be deregistered.
-
deregisterDeleteListener
void deregisterDeleteListener(Dn dn, ConfigDeleteListener listener)
Deregisters the provided delete listener so that it will no longer be notified if any entries are deleted immediately below the entry corresponding to the provided DN.- Parameters:
dn
- The DN of the configuration entry.listener
- The delete listener that should be deregistered.
-
deregisterChangeListener
boolean deregisterChangeListener(Dn dn, ConfigChangeListener listener)
Attempts to deregister the provided change listener with the provided DN.- Parameters:
dn
- The DN of the configuration entry.listener
- The change listener to deregister with this DN.- Returns:
true
if the specified listener was deregistered, orfalse
if it was not.
-
getAddListeners
List<ConfigAddListener> getAddListeners(Dn dn)
Retrieves the add listeners that have been registered with the provided DN.- Parameters:
dn
- The DN of the configuration entry.- Returns:
- The list of add listeners.
-
getDeleteListeners
List<ConfigDeleteListener> getDeleteListeners(Dn dn)
Retrieves the delete listeners that have been registered with the provided DN.- Parameters:
dn
- The DN of the configuration entry.- Returns:
- The list of delete listeners.
-
getChangeListeners
List<ConfigChangeListener> getChangeListeners(Dn dn)
Retrieves the change listeners that have been registered with the provided DN.- Parameters:
dn
- The DN of the configuration entry.- Returns:
- The list of change listeners.
-
-