| | |
| | | */ |
| | | public ConfigEntry(Entry entry, ConfigEntry parent) |
| | | { |
| | | |
| | | this.entry = entry; |
| | | this.parent = parent; |
| | | |
| | |
| | | */ |
| | | public Entry getEntry() |
| | | { |
| | | |
| | | return entry; |
| | | } |
| | | |
| | |
| | | */ |
| | | public void setEntry(Entry entry) |
| | | { |
| | | |
| | | entryLock.lock(); |
| | | |
| | | try |
| | |
| | | */ |
| | | public DN getDN() |
| | | { |
| | | |
| | | return entry.getDN(); |
| | | } |
| | | |
| | |
| | | */ |
| | | public boolean hasObjectClass(String name) |
| | | { |
| | | |
| | | ObjectClass oc = DirectoryServer.getObjectClass(name.toLowerCase()); |
| | | if (oc == null) |
| | | { |
| | |
| | | public ConfigAttribute getConfigAttribute(ConfigAttribute stub) |
| | | throws ConfigException |
| | | { |
| | | |
| | | String attrName = stub.getName(); |
| | | AttributeType attrType = |
| | | DirectoryServer.getAttributeType(attrName.toLowerCase()); |
| | |
| | | */ |
| | | public void putConfigAttribute(ConfigAttribute attribute) |
| | | { |
| | | |
| | | String name = attribute.getName(); |
| | | AttributeType attrType = |
| | | DirectoryServer.getAttributeType(name.toLowerCase()); |
| | |
| | | */ |
| | | public boolean removeConfigAttribute(String lowerName) |
| | | { |
| | | |
| | | for (AttributeType t : entry.getUserAttributes().keySet()) |
| | | { |
| | | if (t.hasNameOrOID(lowerName)) |
| | |
| | | */ |
| | | public ConfigEntry getParent() |
| | | { |
| | | |
| | | return parent; |
| | | } |
| | | |
| | |
| | | */ |
| | | public ConcurrentHashMap<DN,ConfigEntry> getChildren() |
| | | { |
| | | |
| | | return children; |
| | | } |
| | | |
| | |
| | | */ |
| | | public boolean hasChildren() |
| | | { |
| | | |
| | | return (! children.isEmpty()); |
| | | } |
| | | |
| | |
| | | public void addChild(ConfigEntry childEntry) |
| | | throws ConfigException |
| | | { |
| | | |
| | | |
| | | ConfigEntry conflictingChild; |
| | | |
| | | entryLock.lock(); |
| | |
| | | public ConfigEntry removeChild(DN childDN) |
| | | throws ConfigException |
| | | { |
| | | |
| | | entryLock.lock(); |
| | | |
| | | try |
| | |
| | | */ |
| | | public ConfigEntry duplicate() |
| | | { |
| | | |
| | | return new ConfigEntry(entry.duplicate(), parent); |
| | | } |
| | | |
| | |
| | | */ |
| | | public CopyOnWriteArrayList<ConfigChangeListener> getChangeListeners() |
| | | { |
| | | |
| | | return changeListeners; |
| | | } |
| | | |
| | |
| | | */ |
| | | public void registerChangeListener(ConfigChangeListener listener) |
| | | { |
| | | |
| | | changeListeners.add(listener); |
| | | } |
| | | |
| | |
| | | */ |
| | | public boolean deregisterChangeListener(ConfigChangeListener listener) |
| | | { |
| | | |
| | | return changeListeners.remove(listener); |
| | | } |
| | | |
| | |
| | | */ |
| | | public CopyOnWriteArrayList<ConfigAddListener> getAddListeners() |
| | | { |
| | | |
| | | return addListeners; |
| | | } |
| | | |
| | |
| | | */ |
| | | public void registerAddListener(ConfigAddListener listener) |
| | | { |
| | | |
| | | addListeners.addIfAbsent(listener); |
| | | } |
| | | |
| | |
| | | */ |
| | | public void deregisterAddListener(ConfigAddListener listener) |
| | | { |
| | | |
| | | addListeners.remove(listener); |
| | | } |
| | | |
| | |
| | | */ |
| | | public CopyOnWriteArrayList<ConfigDeleteListener> getDeleteListeners() |
| | | { |
| | | |
| | | return deleteListeners; |
| | | } |
| | | |
| | |
| | | */ |
| | | public void registerDeleteListener(ConfigDeleteListener listener) |
| | | { |
| | | |
| | | deleteListeners.addIfAbsent(listener); |
| | | } |
| | | |
| | |
| | | */ |
| | | public void deregisterDeleteListener(ConfigDeleteListener listener) |
| | | { |
| | | |
| | | deleteListeners.remove(listener); |
| | | } |
| | | } |