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 Details

    • 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 register
      ancestors - 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 unregister
      ancestors - its ancestors
      Throws:
      LdapException - If something went wrong
    • register

      void register(ObjectClass objectClass) throws LdapException
      Registers a new ObjectClass with this registry.
      Specified by:
      register in interface SchemaObjectRegistry<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:
      unregister in interface SchemaObjectRegistry<ObjectClass>
      Parameters:
      numericOid - the numeric identifier
      Returns:
      The unregistred schema object
      Throws:
      LdapException - if the numeric identifier is invalid
    • copy

      Copy the ObjectClassRegistry
      Specified by:
      copy in interface SchemaObjectRegistry<ObjectClass>
      Returns:
      The copied registry