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

All Superinterfaces:
Iterable<AttributeType>, SchemaObjectRegistry<AttributeType>
All Known Implementing Classes:
DefaultAttributeTypeRegistry, ImmutableAttributeTypeRegistry

public interface AttributeTypeRegistry
extends SchemaObjectRegistry<AttributeType>, Iterable<AttributeType>

An AttributeType registry service interface.

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

Method Summary
 void addMappingFor(AttributeType attributeType)
          Add a new Oid/Normalizer couple in the OidNormalizer map
 AttributeTypeRegistry copy()
          Copy the AttributeTypeRegistry
 Iterator<AttributeType> descendants(String ancestorId)
          Get's an iterator over the set of descendant attributeTypes for some ancestor's name alias or their OID.
 Map<String,OidNormalizer> getNormalizerMapping()
          Gets an oid/name to normalizer mapping used to normalize distinguished names.
 boolean hasDescendants(String ancestorId)
          Quick lookup to see if an attribute has descendants.
 void registerDescendants(AttributeType attributeType, AttributeType ancestor)
          Store the AttributeType into a map associating an AttributeType to its descendants.
 void removeMappingFor(AttributeType attributeType)
          Remove a new Oid/Normalizer couple in the OidNormalizer map
 void unregisterDescendants(AttributeType attributeType, AttributeType ancestor)
          Remove the AttributeType from the map associating an AttributeType to its descendants.
 
Methods inherited from interface org.apache.directory.shared.ldap.schema.registries.SchemaObjectRegistry
clear, contains, get, getOidByName, getSchemaName, getType, iterator, lookup, oidsIterator, register, renameSchema, size, unregister, unregister, unregisterSchemaElements
 
Methods inherited from interface java.lang.Iterable
iterator
 

Method Detail

getNormalizerMapping

Map<String,OidNormalizer> getNormalizerMapping()
Gets an oid/name to normalizer mapping used to normalize distinguished names.

Returns:
a map of OID Strings to OidNormalizer instances

hasDescendants

boolean hasDescendants(String ancestorId)
                       throws NamingException
Quick lookup to see if an attribute has descendants.

Parameters:
ancestorId - the name alias or OID for an attributeType
Returns:
an Iterator over the AttributeTypes which have the ancestor within their superior chain to the top
Throws:
NamingException - if the ancestor attributeType cannot be discerned from the ancestorId supplied

descendants

Iterator<AttributeType> descendants(String ancestorId)
                                    throws NamingException
Get's an iterator over the set of descendant attributeTypes for some ancestor's name alias or their OID.

Parameters:
ancestorId - the name alias or OID for an attributeType
Returns:
an Iterator over the AttributeTypes which have the ancestor within their superior chain to the top
Throws:
NamingException - if the ancestor attributeType cannot be discerned from the ancestorId supplied

registerDescendants

void registerDescendants(AttributeType attributeType,
                         AttributeType ancestor)
                         throws NamingException
Store the AttributeType into a map associating an AttributeType to its descendants.

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

unregisterDescendants

void unregisterDescendants(AttributeType attributeType,
                           AttributeType ancestor)
                           throws NamingException
Remove the AttributeType from the map associating an AttributeType to its descendants.

Parameters:
attributeType - The attributeType to unregister
ancestor - its ancestor
Throws:
NamingException - If something went wrong

addMappingFor

void addMappingFor(AttributeType attributeType)
                   throws NamingException
Add a new Oid/Normalizer couple in the OidNormalizer map

Throws:
NamingException

removeMappingFor

void removeMappingFor(AttributeType attributeType)
                      throws NamingException
Remove a new Oid/Normalizer couple in the OidNormalizer map

Throws:
NamingException

copy

AttributeTypeRegistry copy()
Copy the AttributeTypeRegistry

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


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.