Interface ObjectClassRegistry
- All Superinterfaces:
Iterable<ObjectClass>, SchemaObjectRegistry<ObjectClass>
- All Known Implementing Classes:
DefaultObjectClassRegistry, ImmutableObjectClassRegistry
public interface ObjectClassRegistry
extends SchemaObjectRegistry<ObjectClass>, Iterable<ObjectClass>
ObjectClass registry service interface.
- Author:
- Apache Directory Project
-
Method Summary
Modifier and TypeMethodDescriptioncopy()Copy the ObjectClassRegistrydescendants(String ancestorId) Get's an iterator over the set of descendant ObjectClasses for some ancestor's name alias or their OID.booleanhasDescendants(String ancestorId) Quick lookup to see if an objectClass has descendants.voidregister(ObjectClass objectClass) Registers a new ObjectClass with this registry.voidregisterDescendants(ObjectClass objectClass, List<ObjectClass> ancestors) Store the ObjectClass into a map associating an ObjectClass to its descendants.unregister(String numericOid) Removes the ObjectClass registered with this registry.voidunregisterDescendants(ObjectClass attributeType, List<ObjectClass> ancestors) Remove the ObjectClass from the map associating an ObjectClass to its descendants.Methods inherited from interface Iterable
forEach, iterator, spliteratorMethods inherited from interface SchemaObjectRegistry
clear, contains, get, getOidByName, getSchemaName, getType, iterator, lookup, oidsIterator, renameSchema, size, unregister, unregisterSchemaElements
-
Method Details
-
hasDescendants
Quick lookup to see if an objectClass has descendants.- Parameters:
ancestorId- the name alias or OID for an ObjectClass- Returns:
- an Iterator over the ObjectClasses which have the ancestor within their superior chain to the top
- Throws:
LdapException- if the ancestor ObjectClass cannot be discerned from the ancestorId supplied
-
descendants
Get's an iterator over the set of descendant ObjectClasses for some ancestor's name alias or their OID.- Parameters:
ancestorId- the name alias or OID for an ObjectClass- Returns:
- an Iterator over the ObjectClasses which have the ancestor within their superior chain to the top
- Throws:
LdapException- if the ancestor ObjectClass cannot be discerned from the ancestorId supplied
-
registerDescendants
Store the ObjectClass into a map associating an ObjectClass to its descendants.- Parameters:
objectClass- The ObjectClass to registerancestors- Its ancestors- Throws:
LdapException- If something went wrong
-
unregisterDescendants
void unregisterDescendants(ObjectClass attributeType, List<ObjectClass> ancestors) throws LdapException Remove the ObjectClass from the map associating an ObjectClass to its descendants.- Parameters:
attributeType- The ObjectClass to unregisterancestors- its ancestors- Throws:
LdapException- If something went wrong
-
register
Registers a new ObjectClass with this registry.- Specified by:
registerin interfaceSchemaObjectRegistry<ObjectClass>- Parameters:
objectClass- the ObjectClass to register- Throws:
LdapException- if the ObjectClass is already registered or the registration operation is not supported
-
unregister
Removes the ObjectClass registered with this registry.- Specified by:
unregisterin interfaceSchemaObjectRegistry<ObjectClass>- Parameters:
numericOid- the numeric identifier- Returns:
- The unregistred schema object
- Throws:
LdapException- if the numeric identifier is invalid
-
copy
ObjectClassRegistry copy()Copy the ObjectClassRegistry- Specified by:
copyin interfaceSchemaObjectRegistry<ObjectClass>- Returns:
- The copied registry
-