public class DefaultAttributeTypeRegistry extends DefaultSchemaObjectRegistry<AttributeType> implements AttributeTypeRegistry
byName, oidRegistry, schemaObjectType
Constructor and Description |
---|
DefaultAttributeTypeRegistry()
Creates a new default AttributeTypeRegistry instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addMappingFor(AttributeType attributeType)
Add a new Oid/Normalizer couple in the OidNormalizer map
|
void |
clear()
Clear the registry from all its content
|
AttributeTypeRegistry |
copy()
Copy the AttributeTypeRegistry
|
Iterator<AttributeType> |
descendants(AttributeType ancestor)
Get's an iterator over the set of descendant attributeTypes for
some ancestor's name alias or their OID.
|
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(AttributeType ancestor)
Quick lookup to see if an attribute has descendants.
|
boolean |
hasDescendants(String ancestorId)
Quick lookup to see if an attribute has descendants.
|
AttributeType |
lookup(String oid)
Looks up a SchemaObject by its unique Object Identifier or by name.
|
void |
registerDescendants(AttributeType attributeType,
AttributeType ancestor)
Store the AttributeType into a map associating an AttributeType to its
descendants.
|
void |
removeMappingFor(AttributeType attributeType)
Remove the AttributeType normalizer from the OidNormalizer map
|
AttributeType |
unregister(String numericOid)
Removes the SchemaObject registered with this registry, using its
numeric OID.
|
void |
unregisterDescendants(AttributeType attributeType,
AttributeType ancestor)
Remove the AttributeType from the map associating an AttributeType to its
descendants.
|
contains, copy, get, getOidByName, getSchemaName, getType, iterator, oidsIterator, register, renameSchema, size, toString, unregister, unregisterSchemaElements
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
contains, get, getOidByName, getSchemaName, getType, iterator, oidsIterator, register, renameSchema, size, unregister, unregisterSchemaElements
public DefaultAttributeTypeRegistry()
public Map<String,OidNormalizer> getNormalizerMapping()
getNormalizerMapping
in interface AttributeTypeRegistry
public boolean hasDescendants(String ancestorId) throws LdapException
hasDescendants
in interface AttributeTypeRegistry
ancestorId
- the name alias or OID for an attributeTypeLdapException
- if the ancestor attributeType cannot be
discerned from the ancestorId suppliedpublic boolean hasDescendants(AttributeType ancestor) throws LdapException
hasDescendants
in interface AttributeTypeRegistry
ancestor
- the attributeType we are looking forLdapException
- if the ancestor attributeType cannot be
discerned from the ancestorId suppliedpublic Iterator<AttributeType> descendants(String ancestorId) throws LdapException
descendants
in interface AttributeTypeRegistry
ancestorId
- the name alias or OID for an attributeTypeLdapException
- if the ancestor attributeType cannot be
discerned from the ancestorId suppliedpublic Iterator<AttributeType> descendants(AttributeType ancestor) throws LdapException
descendants
in interface AttributeTypeRegistry
ancestor
- the AttributeType we are looking forLdapException
- if the ancestor attributeType cannot be
discerned from the ancestorId suppliedpublic void registerDescendants(AttributeType attributeType, AttributeType ancestor) throws LdapException
registerDescendants
in interface AttributeTypeRegistry
attributeType
- The attributeType to registerLdapException
- If something went wrongpublic void unregisterDescendants(AttributeType attributeType, AttributeType ancestor) throws LdapException
unregisterDescendants
in interface AttributeTypeRegistry
attributeType
- The attributeType to unregisterancestor
- its ancestorLdapException
- If something went wrongpublic AttributeType unregister(String numericOid) throws LdapException
unregister
in interface SchemaObjectRegistry<AttributeType>
unregister
in class DefaultSchemaObjectRegistry<AttributeType>
numericOid
- the numeric identifierLdapException
- if the numeric identifier is invalidpublic void addMappingFor(AttributeType attributeType) throws LdapException
addMappingFor
in interface AttributeTypeRegistry
LdapException
public void removeMappingFor(AttributeType attributeType) throws LdapException
removeMappingFor
in interface AttributeTypeRegistry
LdapException
public AttributeType lookup(String oid) throws LdapException
lookup
in interface SchemaObjectRegistry<AttributeType>
lookup
in class DefaultSchemaObjectRegistry<AttributeType>
oid
- the object identifier or nameLdapException
- if the SchemaObject does not existpublic AttributeTypeRegistry copy()
copy
in interface AttributeTypeRegistry
copy
in interface SchemaObjectRegistry<AttributeType>
public void clear()
clear
in interface SchemaObjectRegistry<AttributeType>
clear
in class DefaultSchemaObjectRegistry<AttributeType>
Copyright © 2003-2014 The Apache Software Foundation. All Rights Reserved.