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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ObjectClassRegistrycopy()Copy the ObjectClassRegistryIterator<ObjectClass>descendants(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.ObjectClassunregister(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 java.lang.Iterable
forEach, iterator, spliterator
-
Methods inherited from interface org.apache.directory.api.ldap.model.schema.registries.SchemaObjectRegistry
clear, contains, get, getOidByName, getSchemaName, getType, iterator, lookup, oidsIterator, renameSchema, size, unregister, unregisterSchemaElements
-
-
-
-
Method Detail
-
hasDescendants
boolean hasDescendants(String ancestorId) throws LdapException
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
Iterator<ObjectClass> descendants(String ancestorId) throws LdapException
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
void registerDescendants(ObjectClass objectClass, List<ObjectClass> ancestors) throws LdapException
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
void register(ObjectClass objectClass) throws LdapException
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
ObjectClass unregister(String numericOid) throws LdapException
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
-
-