|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.directory.server.schema.registries.DefaultAttributeTypeRegistry
public class DefaultAttributeTypeRegistry
A plain old java object implementation of an AttributeTypeRegistry.
| Constructor Summary | |
|---|---|
DefaultAttributeTypeRegistry(OidRegistry oidRegistry)
Creates an empty DefaultAttributeTypeRegistry. |
|
| Method Summary | |
|---|---|
java.util.Iterator<org.apache.directory.shared.ldap.schema.AttributeType> |
descendants(java.lang.String ancestorId)
Get's an iterator over the set of descendant attributeTypes for some ancestor's name alias or their OID. |
java.util.Map<java.lang.String,org.apache.directory.shared.ldap.schema.normalizers.OidNormalizer> |
getNormalizerMapping()
Gets an oid/name to normalizer mapping used to normalize distinguished names. |
java.lang.String |
getSchemaName(java.lang.String id)
Gets the name of the schema this schema object is associated with. |
boolean |
hasAttributeType(java.lang.String id)
Checks to see if an AttributeType exists. |
boolean |
hasDescendants(java.lang.String ancestorId)
Quick lookup to see if an attribute has descendants. |
java.util.Iterator<org.apache.directory.shared.ldap.schema.AttributeType> |
iterator()
Gets an Iterator over the AttributeTypes within this registry. |
org.apache.directory.shared.ldap.schema.AttributeType |
lookup(java.lang.String id)
Looks up an AttributeType by its unique Object Identifier or by its unique name. |
protected void |
onRegisterAddToAncestorDescendants(org.apache.directory.shared.ldap.schema.AttributeType newType,
org.apache.directory.shared.ldap.schema.AttributeType ancestor)
Recursively adds a new attributeType to the descendant's list of all ancestors until top is reached. |
void |
register(org.apache.directory.shared.ldap.schema.AttributeType attributeType)
Registers a new AttributeType with this registry. |
void |
registerDescendants(org.apache.directory.shared.ldap.schema.AttributeType attributeType)
Store the AttributeType into a map associating an AttributeType to its descendants. |
java.lang.String |
toString()
|
void |
unregister(java.lang.String numericOid)
Removes the SchemaObject registered with this registry. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultAttributeTypeRegistry(OidRegistry oidRegistry)
oidRegistry - used by this registry for OID to name resolution of
dependencies and to automatically register and unregister it's aliases and OIDs| Method Detail |
|---|
public void register(org.apache.directory.shared.ldap.schema.AttributeType attributeType)
throws javax.naming.NamingException
register in interface AttributeTypeRegistryattributeType - the AttributeType to register
javax.naming.NamingException - if the AttributeType is already registered or
the registration operation is not supported
public void registerDescendants(org.apache.directory.shared.ldap.schema.AttributeType attributeType)
throws javax.naming.NamingException
attributeType - The attributeType to register
javax.naming.NamingException - If something went wrong
protected void onRegisterAddToAncestorDescendants(org.apache.directory.shared.ldap.schema.AttributeType newType,
org.apache.directory.shared.ldap.schema.AttributeType ancestor)
throws javax.naming.NamingException
newType - the new attributeType being addedancestor - some ancestor from superior up to and including top
javax.naming.NamingException - if there are resolution failures
public org.apache.directory.shared.ldap.schema.AttributeType lookup(java.lang.String id)
throws javax.naming.NamingException
lookup in interface AttributeTypeRegistryid - the object identifier or name of the AttributeType
javax.naming.NamingException - if the AttributeType does not existpublic boolean hasAttributeType(java.lang.String id)
hasAttributeType in interface AttributeTypeRegistryid - the object identifier or name of the AttributeType
public java.lang.String getSchemaName(java.lang.String id)
throws javax.naming.NamingException
getSchemaName in interface SchemaObjectRegistryid - the object identifier or the name
javax.naming.NamingException - if the schema object does not exist
public java.util.Map<java.lang.String,org.apache.directory.shared.ldap.schema.normalizers.OidNormalizer> getNormalizerMapping()
throws javax.naming.NamingException
getNormalizerMapping in interface AttributeTypeRegistryjavax.naming.NamingException - if for some reason this information cannot be returned
public java.util.Iterator<org.apache.directory.shared.ldap.schema.AttributeType> descendants(java.lang.String ancestorId)
throws javax.naming.NamingException
descendants in interface AttributeTypeRegistryancestorId - the name alias or OID for an attributeType
javax.naming.NamingException - if the ancestor attributeType cannot be
discerned from the ancestorId supplied
public boolean hasDescendants(java.lang.String ancestorId)
throws javax.naming.NamingException
hasDescendants in interface AttributeTypeRegistryancestorId - the name alias or OID for an attributeType
javax.naming.NamingException - if the ancestor attributeType cannot be
discerned from the ancestorId suppliedpublic java.util.Iterator<org.apache.directory.shared.ldap.schema.AttributeType> iterator()
iterator in interface java.lang.Iterable<org.apache.directory.shared.ldap.schema.AttributeType>iterator in interface AttributeTypeRegistryiterator in interface SchemaObjectRegistry
public void unregister(java.lang.String numericOid)
throws javax.naming.NamingException
unregister in interface SchemaObjectRegistrynumericOid - the numeric identifier
javax.naming.NamingException - if the numeric identifier is invalidpublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||