org.apache.directory.shared.ldap.schema.registries
Interface ObjectClassRegistry

All Superinterfaces:
java.lang.Iterable<ObjectClass>, SchemaObjectRegistry<ObjectClass>
All Known Implementing Classes:
DefaultObjectClassRegistry, ImmutableObjectClassRegistry

public interface ObjectClassRegistry
extends SchemaObjectRegistry<ObjectClass>, java.lang.Iterable<ObjectClass>

ObjectClass registry service interface.

Version:
$Rev: 923524 $
Author:
Apache Directory Project

Method Summary
 ObjectClassRegistry copy()
          Copy the ObjectClassRegistry
 java.util.Iterator<ObjectClass> descendants(java.lang.String ancestorId)
          Get's an iterator over the set of descendant ObjectClasses for some ancestor's name alias or their OID.
 boolean hasDescendants(java.lang.String ancestorId)
          Quick lookup to see if an objectClass has descendants.
 void register(ObjectClass objectClass)
          Registers a new ObjectClass with this registry.
 void registerDescendants(ObjectClass objectClass, java.util.List<ObjectClass> ancestors)
          Store the ObjectClass into a map associating an ObjectClass to its descendants.
 ObjectClass unregister(java.lang.String numericOid)
          Removes the ObjectClass registered with this registry.
 void unregisterDescendants(ObjectClass attributeType, java.util.List<ObjectClass> ancestors)
          Remove the ObjectClass from the map associating an ObjectClass to its descendants.
 
Methods inherited from interface org.apache.directory.shared.ldap.schema.registries.SchemaObjectRegistry
clear, contains, get, getOidByName, getSchemaName, getType, iterator, lookup, oidsIterator, renameSchema, size, unregister, unregisterSchemaElements
 
Methods inherited from interface java.lang.Iterable
iterator
 

Method Detail

hasDescendants

boolean hasDescendants(java.lang.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

java.util.Iterator<ObjectClass> descendants(java.lang.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,
                         java.util.List<ObjectClass> ancestors)
                         throws LdapException
Store the ObjectClass into a map associating an ObjectClass to its descendants.

Parameters:
attributeType - The ObjectClass to register
Throws:
LdapException - If something went wrong

unregisterDescendants

void unregisterDescendants(ObjectClass attributeType,
                           java.util.List<ObjectClass> ancestors)
                           throws LdapException
Remove the ObjectClass from the map associating an ObjectClass to its descendants.

Parameters:
attributeType - The ObjectClass to unregister
ancestor - its ancestor
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(java.lang.String numericOid)
                       throws LdapException
Removes the ObjectClass registered with this registry.

Specified by:
unregister in interface SchemaObjectRegistry<ObjectClass>
Parameters:
numericOid - the numeric identifier
Throws:
LdapException - if the numeric identifier is invalid

copy

ObjectClassRegistry copy()
Copy the ObjectClassRegistry

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


Copyright © 2003-2011 Apache Software Foundation. All Rights Reserved.