@PublicAPI(stability=VOLATILE, mayInstantiate=true, mayExtend=false, mayInvoke=true) public final class ConfigEntry extends Object
Constructor and Description |
---|
ConfigEntry(Entry entry,
ConfigEntry parent)
Creates a new config entry with the provided information.
|
Modifier and Type | Method and Description |
---|---|
void |
addChild(ConfigEntry childEntry)
Adds the specified entry as a child of this configuration entry.
|
void |
deregisterAddListener(ConfigAddListener listener)
Deregisters the provided add listener so that it will no longer be
notified if any new entries are added immediately below this configuration
entry.
|
boolean |
deregisterChangeListener(ConfigChangeListener listener)
Attempts to deregister the provided change listener with this configuration
entry.
|
void |
deregisterDeleteListener(ConfigDeleteListener listener)
Deregisters the provided delete listener so that it will no longer be
notified if any new are removed immediately below this configuration entry.
|
ConfigEntry |
duplicate()
Creates a duplicate of this configuration entry that should be used when
making changes to this entry.
|
CopyOnWriteArrayList<ConfigAddListener> |
getAddListeners()
Retrieves the set of config add listeners that have been registered for
this entry.
|
CopyOnWriteArrayList<ConfigChangeListener> |
getChangeListeners()
Retrieves the set of change listeners that have been registered with this
configuration entry.
|
ConcurrentMap<DN,ConfigEntry> |
getChildren()
Retrieves the set of children associated with this configuration entry.
|
ConfigAttribute |
getConfigAttribute(ConfigAttribute stub)
Retrieves the specified configuration attribute from this configuration
entry.
|
CopyOnWriteArrayList<ConfigDeleteListener> |
getDeleteListeners()
Retrieves the set of config delete listeners that have been registered for
this entry.
|
DN |
getDN()
Retrieves the DN for this configuration entry.
|
Entry |
getEntry()
Retrieves the actual entry wrapped by this configuration entry.
|
ConfigEntry |
getParent()
Retrieves the configuration entry that is the immediate parent for this
configuration entry.
|
boolean |
hasChildren()
Indicates whether this entry has any children.
|
boolean |
hasObjectClass(String name)
Indicates whether this configuration entry contains the specified
objectclass.
|
void |
putConfigAttribute(ConfigAttribute attribute)
Puts the provided configuration attribute in this entry (adding a new
attribute if one doesn't exist, or replacing it if one does).
|
void |
registerAddListener(ConfigAddListener listener)
Registers the provided add listener so that it will be notified if any new
entries are added immediately below this configuration entry.
|
void |
registerChangeListener(ConfigChangeListener listener)
Registers the provided change listener so that it will be notified of any
changes to this configuration entry.
|
void |
registerDeleteListener(ConfigDeleteListener listener)
Registers the provided delete listener so that it will be notified if any
entries are deleted immediately below this configuration entry.
|
ConfigEntry |
removeChild(DN childDN)
Attempts to remove the child entry with the specified DN.
|
boolean |
removeConfigAttribute(String lowerName)
Removes the specified configuration attribute from the entry.
|
void |
setEntry(Entry entry)
Replaces the actual entry wrapped by this configuration entry with the
provided entry.
|
String |
toString() |
public ConfigEntry(Entry entry, ConfigEntry parent)
entry
- The entry that will be encapsulated by this config entry.parent
- The configuration entry that is the immediate parent for
this configuration entry. It may be null
if
this entry is the configuration root.public Entry getEntry()
public void setEntry(Entry entry)
entry
- The new entry to store in this config entry.public DN getDN()
public boolean hasObjectClass(String name)
name
- The name of the objectclass for which to make the
determination.true
if this configuration entry contains the
specified objectclass, or false
if not.public ConfigAttribute getConfigAttribute(ConfigAttribute stub) throws ConfigException
stub
- The stub to use to format the returned configuration
attribute.null
if no such attribute is present in
this entry.ConfigException
- If the specified attribute exists but cannot be
interpreted as the specified type of
configuration attribute.public void putConfigAttribute(ConfigAttribute attribute)
attribute
- The configuration attribute to use.public boolean removeConfigAttribute(String lowerName)
lowerName
- The name of the configuration attribute to remove from
the entry, formatted in all lowercase characters.true
if the requested attribute was found and
removed, or false
if not.public ConfigEntry getParent()
null
if this entry is
the configuration root.public ConcurrentMap<DN,ConfigEntry> getChildren()
public boolean hasChildren()
true
if this entry has one or more children, or
false
if not.public void addChild(ConfigEntry childEntry) throws ConfigException
childEntry
- The entry to add as a child of this configuration
entry.ConfigException
- If the provided entry could not be added as a
child of this configuration entry (e.g., because
another entry already exists with the same DN).public ConfigEntry removeChild(DN childDN) throws ConfigException
childDN
- The DN of the child entry to remove from this config
entry.ConfigException
- If the specified child entry did not exist or if
it had children of its own.public ConfigEntry duplicate()
public CopyOnWriteArrayList<ConfigChangeListener> getChangeListeners()
public void registerChangeListener(ConfigChangeListener listener)
listener
- The change listener to register with this config entry.public boolean deregisterChangeListener(ConfigChangeListener listener)
listener
- The change listener to deregister with this config entry.true
if the specified listener was deregistered, or
false
if it was not.public CopyOnWriteArrayList<ConfigAddListener> getAddListeners()
public void registerAddListener(ConfigAddListener listener)
listener
- The add listener that should be registered.public void deregisterAddListener(ConfigAddListener listener)
listener
- The add listener that should be deregistered.public CopyOnWriteArrayList<ConfigDeleteListener> getDeleteListeners()
public void registerDeleteListener(ConfigDeleteListener listener)
listener
- The delete listener that should be registered.public void deregisterDeleteListener(ConfigDeleteListener listener)
listener
- The delete listener that should be deregistered.Copyright © 2010-2016 ForgeRock AS. All Rights Reserved.