public class DefaultObjectClassRegistry extends DefaultSchemaObjectRegistry<ObjectClass> implements ObjectClassRegistry
Constructor and Description |
---|
DefaultObjectClassRegistry()
Creates a new default ObjectClassRegistry instance.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clear the registry from all its content
|
DefaultObjectClassRegistry |
copy()
Copy the ObjectClassRegistry
|
Iterator<ObjectClass> |
descendants(String ancestorId)
Get's an iterator over the set of descendant ObjectClasses for
some ancestor's name alias or their OID.
|
boolean |
hasDescendants(String ancestorId)
Quick lookup to see if an objectClass has descendants.
|
void |
registerDescendants(ObjectClass objectClass,
List<ObjectClass> ancestors)
Store the ObjectClass into a map associating an ObjectClass to its
descendants.
|
ObjectClass |
unregister(String numericOid)
Removes the SchemaObject registered with this registry, using its
numeric OID.
|
void |
unregisterDescendants(ObjectClass attributeType,
List<ObjectClass> ancestors)
Remove the ObjectClass from the map associating an ObjectClass to its
descendants.
|
contains, copy, get, getErrorHandler, getOidByName, getSchemaName, getType, isRelaxed, isStrict, iterator, lookup, oidsIterator, register, renameSchema, setErrorHandler, setRelaxed, setStrict, size, toString, unregister, unregisterSchemaElements
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
register
contains, get, getOidByName, getSchemaName, getType, iterator, lookup, oidsIterator, renameSchema, size, unregister, unregisterSchemaElements
forEach, iterator, spliterator
public DefaultObjectClassRegistry()
public boolean hasDescendants(String ancestorId) throws LdapException
hasDescendants
in interface ObjectClassRegistry
ancestorId
- the name alias or OID for an ObjectClassLdapException
- if the ancestor ObjectClass cannot be
discerned from the ancestorId suppliedpublic Iterator<ObjectClass> descendants(String ancestorId) throws LdapException
descendants
in interface ObjectClassRegistry
ancestorId
- the name alias or OID for an ObjectClassLdapException
- if the ancestor ObjectClass cannot be
discerned from the ancestorId suppliedpublic void registerDescendants(ObjectClass objectClass, List<ObjectClass> ancestors) throws LdapException
registerDescendants
in interface ObjectClassRegistry
objectClass
- The ObjectClass to registerancestors
- Its ancestorsLdapException
- If something went wrongpublic void unregisterDescendants(ObjectClass attributeType, List<ObjectClass> ancestors) throws LdapException
unregisterDescendants
in interface ObjectClassRegistry
attributeType
- The ObjectClass to unregisterancestors
- its ancestorsLdapException
- If something went wrongpublic ObjectClass unregister(String numericOid) throws LdapException
unregister
in interface ObjectClassRegistry
unregister
in interface SchemaObjectRegistry<ObjectClass>
unregister
in class DefaultSchemaObjectRegistry<ObjectClass>
numericOid
- the numeric identifierLdapException
- if the numeric identifier is invalidpublic DefaultObjectClassRegistry copy()
copy
in interface ObjectClassRegistry
copy
in interface SchemaObjectRegistry<ObjectClass>
public void clear()
clear
in interface SchemaObjectRegistry<ObjectClass>
clear
in class DefaultSchemaObjectRegistry<ObjectClass>
Copyright © 2003–2020 The Apache Software Foundation. All rights reserved.