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.
- Author:
- Apache Directory Project
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddMappingFor(AttributeType attributeType) Add a new Oid/Normalizer couple in the OidNormalizer mapcopy()Copy the AttributeTypeRegistrydescendants(String ancestorId) Get's an iterator over the set of descendant attributeTypes for some ancestor's name alias or their OID.descendants(AttributeType ancestor) Get's an iterator over the set of descendant attributeTypes for some ancestor's name alias or their OID.Gets an oid/name to normalizer mapping used to normalize distinguished names.booleanhasDescendants(String ancestorId) Quick lookup to see if an attribute has descendants.booleanhasDescendants(AttributeType ancestor) Quick lookup to see if an attribute has descendants.voidregisterDescendants(AttributeType attributeType, AttributeType ancestor) Store the AttributeType into a map associating an AttributeType to its descendants.voidremoveMappingFor(AttributeType attributeType) Remove a new Oid/Normalizer couple in the OidNormalizer mapvoidunregisterDescendants(AttributeType attributeType, AttributeType ancestor) Remove the AttributeType from the map associating an AttributeType to its descendants.Methods inherited from interface Iterable
forEach, iterator, spliteratorMethods inherited from interface SchemaObjectRegistry
clear, contains, get, getOidByName, getSchemaName, getType, iterator, lookup, oidsIterator, register, renameSchema, size, unregister, unregister, unregisterSchemaElements
-
Method Details
-
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
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:
LdapException- if the ancestor attributeType cannot be discerned from the ancestorId supplied
-
hasDescendants
Quick lookup to see if an attribute has descendants.- Parameters:
ancestor- the attributeType we are looking for- Returns:
- an Iterator over the AttributeTypes which have the ancestor within their superior chain to the top
- Throws:
LdapException- if the ancestor attributeType cannot be discerned from the ancestorId supplied
-
descendants
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:
LdapException- if the ancestor attributeType cannot be discerned from the ancestorId supplied
-
descendants
Get's an iterator over the set of descendant attributeTypes for some ancestor's name alias or their OID.- Parameters:
ancestor- the AttributeType we are looking for- Returns:
- an Iterator over the AttributeTypes which have the ancestor within their superior chain to the top
- Throws:
LdapException- if the ancestor attributeType cannot be discerned from the ancestorId supplied
-
registerDescendants
Store the AttributeType into a map associating an AttributeType to its descendants.- Parameters:
attributeType- The attributeType to registerancestor- The attributeType's parent- Throws:
LdapException- If something went wrong
-
unregisterDescendants
void unregisterDescendants(AttributeType attributeType, AttributeType ancestor) throws LdapException Remove the AttributeType from the map associating an AttributeType to its descendants.- Parameters:
attributeType- The attributeType to unregisterancestor- its ancestor- Throws:
LdapException- If something went wrong
-
addMappingFor
Add a new Oid/Normalizer couple in the OidNormalizer map- Parameters:
attributeType- The AttributeType to add- Throws:
LdapException- If something went wrong
-
removeMappingFor
Remove a new Oid/Normalizer couple in the OidNormalizer map- Parameters:
attributeType- The AttributeType to remove- Throws:
LdapException- If something went wrong
-
copy
AttributeTypeRegistry copy()Copy the AttributeTypeRegistry- Specified by:
copyin interfaceSchemaObjectRegistry<AttributeType>- Returns:
- The copied AttributeTypeRegistry
-