|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.directory.api.ldap.model.schema.registries.ImmutableAttributeTypeRegistry
public class ImmutableAttributeTypeRegistry
An immutable wrapper of the AttributeType registry.
| Constructor Summary | |
|---|---|
ImmutableAttributeTypeRegistry(AttributeTypeRegistry attributeTypeRegistry)
Creates a new instance of ImmutableAttributeTypeRegistry. |
|
| Method Summary | |
|---|---|
void |
addMappingFor(AttributeType attributeType)
Add a new Oid/Normalizer couple in the OidNormalizer map |
void |
clear()
Clear the registry from all its content |
boolean |
contains(String oid)
Checks to see if an SchemaObject exists in the registry, by its OID or name. |
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. |
AttributeType |
get(String oid)
Gets the SchemaObject associated with a given OID. |
Map<String,OidNormalizer> |
getNormalizerMapping()
Gets an oid/name to normalizer mapping used to normalize distinguished names. |
String |
getOidByName(String name)
Gets the numericOid for a name/alias if one is associated. |
String |
getSchemaName(String oid)
Gets the name of the schema this schema object is associated with. |
SchemaObjectType |
getType()
|
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. |
Iterator<AttributeType> |
iterator()
Gets an iterator over the registered schema objects in the registry. |
AttributeType |
lookup(String oid)
Looks up a SchemaObject by its unique Object Identifier or by name. |
Iterator<String> |
oidsIterator()
Gets an iterator over the registered schema objects'OID in the registry. |
void |
register(AttributeType attributeType)
Registers a new SchemaObject with this registry. |
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 |
renameSchema(String originalSchemaName,
String newSchemaName)
Modify all the SchemaObject using a schemaName when this name changes. |
int |
size()
|
String |
toString()
|
AttributeType |
unregister(AttributeType schemaObject)
Removes the SchemaObject registered with this registry. |
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. |
void |
unregisterSchemaElements(String schemaName)
Unregisters all SchemaObjects defined for a specific schema from this registry. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ImmutableAttributeTypeRegistry(AttributeTypeRegistry attributeTypeRegistry)
attributeTypeRegistry - The wrapped AttributeType registry| Method Detail |
|---|
public Map<String,OidNormalizer> getNormalizerMapping()
getNormalizerMapping in interface AttributeTypeRegistry
public boolean hasDescendants(String ancestorId)
throws LdapException
hasDescendants in interface AttributeTypeRegistryancestorId - the name alias or OID for an attributeType
LdapException - if the ancestor attributeType cannot be
discerned from the ancestorId supplied
public boolean hasDescendants(AttributeType ancestor)
throws LdapException
hasDescendants in interface AttributeTypeRegistryancestor - the attributeType we are looking for
LdapException - if the ancestor attributeType cannot be
discerned from the ancestorId supplied
public Iterator<AttributeType> descendants(String ancestorId)
throws LdapException
descendants in interface AttributeTypeRegistryancestorId - the name alias or OID for an attributeType
LdapException - if the ancestor attributeType cannot be
discerned from the ancestorId supplied
public Iterator<AttributeType> descendants(AttributeType ancestor)
throws LdapException
descendants in interface AttributeTypeRegistryancestor - the AttributeType we are looking for
LdapException - if the ancestor attributeType cannot be
discerned from the ancestorId supplied
public void register(AttributeType attributeType)
throws LdapException
register in interface SchemaObjectRegistry<AttributeType>attributeType - the SchemaObject to register
LdapException - if the SchemaObject is already registered or
the registration operation is not supported
public void registerDescendants(AttributeType attributeType,
AttributeType ancestor)
throws LdapException
registerDescendants in interface AttributeTypeRegistryattributeType - The attributeType to register
LdapException - If something went wrong
public void unregisterDescendants(AttributeType attributeType,
AttributeType ancestor)
throws LdapException
unregisterDescendants in interface AttributeTypeRegistryattributeType - The attributeType to unregisterancestor - its ancestor
LdapException - If something went wrong
public AttributeType unregister(String numericOid)
throws LdapException
unregister in interface SchemaObjectRegistry<AttributeType>numericOid - the numeric identifier
LdapException - if the numeric identifier is invalid
public void addMappingFor(AttributeType attributeType)
throws LdapException
addMappingFor in interface AttributeTypeRegistryLdapException
public void removeMappingFor(AttributeType attributeType)
throws LdapException
removeMappingFor in interface AttributeTypeRegistryLdapException
public AttributeType lookup(String oid)
throws LdapException
lookup in interface SchemaObjectRegistry<AttributeType>oid - the object identifier or name
LdapException - if the SchemaObject does not existpublic String toString()
toString in class Objectpublic AttributeTypeRegistry copy()
copy in interface AttributeTypeRegistrycopy in interface SchemaObjectRegistry<AttributeType>public int size()
size in interface SchemaObjectRegistry<AttributeType>public Iterator<AttributeType> iterator()
iterator in interface Iterable<AttributeType>iterator in interface SchemaObjectRegistry<AttributeType>public Iterator<String> oidsIterator()
oidsIterator in interface SchemaObjectRegistry<AttributeType>public boolean contains(String oid)
contains in interface SchemaObjectRegistry<AttributeType>oid - the object identifier or name of the SchemaObject
public String getOidByName(String name)
throws LdapException
getOidByName in interface SchemaObjectRegistry<AttributeType>name - The name we are looking the oid for
LdapException - If the OID can't be found
public String getSchemaName(String oid)
throws LdapException
getSchemaName in interface SchemaObjectRegistry<AttributeType>oid - the object identifier or the name
LdapException - if the schema object does not existpublic SchemaObjectType getType()
getType in interface SchemaObjectRegistry<AttributeType>
public void renameSchema(String originalSchemaName,
String newSchemaName)
renameSchema in interface SchemaObjectRegistry<AttributeType>originalSchemaName - The original Schema namenewSchemaName - The new Schema name
public void unregisterSchemaElements(String schemaName)
throws LdapException
unregisterSchemaElements in interface SchemaObjectRegistry<AttributeType>schemaName - the name of the schema whose SchemaObjects will be removed from
LdapExceptionpublic AttributeType get(String oid)
get in interface SchemaObjectRegistry<AttributeType>oid - The SchemaObject's OID we are looking for
public void clear()
throws LdapException
clear in interface SchemaObjectRegistry<AttributeType>LdapException
public AttributeType unregister(AttributeType schemaObject)
throws LdapException
unregister in interface SchemaObjectRegistry<AttributeType>schemaObject - the schemaObject to unregister
LdapException - if the schemaObject can't be unregistered is invalid
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||