org.apache.directory.server.core.schema
Interface AttributeTypeRegistry

All Known Implementing Classes:
BootstrapAttributeTypeRegistry, GlobalAttributeTypeRegistry

public interface AttributeTypeRegistry

An AttributeType registry service interface.

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

Method Summary
 java.util.Iterator 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 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 list()
          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.
 void register(java.lang.String schema, org.apache.directory.shared.ldap.schema.AttributeType attributeType)
          Registers a new AttributeType with this registry.
 

Method Detail

register

void register(java.lang.String schema,
              org.apache.directory.shared.ldap.schema.AttributeType attributeType)
              throws javax.naming.NamingException
Registers a new AttributeType with this registry.

Parameters:
schema - the name of the schema the AttributeType is associated with
attributeType - the AttributeType to register
Throws:
javax.naming.NamingException - if the AttributeType is already registered or the registration operation is not supported

lookup

org.apache.directory.shared.ldap.schema.AttributeType lookup(java.lang.String id)
                                                             throws javax.naming.NamingException
Looks up an AttributeType by its unique Object Identifier or by its unique name.

Parameters:
id - the object identifier or name of the AttributeType
Returns:
the AttributeType instance for the oid
Throws:
javax.naming.NamingException - if the AttributeType does not exist

getSchemaName

java.lang.String getSchemaName(java.lang.String id)
                               throws javax.naming.NamingException
Gets the name of the schema this schema object is associated with.

Parameters:
id - the object identifier or the name
Returns:
the schema name
Throws:
javax.naming.NamingException - if the schema object does not exist

hasAttributeType

boolean hasAttributeType(java.lang.String id)
Checks to see if an AttributeType exists.

Parameters:
id - the object identifier or name of the AttributeType
Returns:
true if an AttributeType definition exists for the oid, false otherwise

list

java.util.Iterator list()
Gets an Iterator over the AttributeTypes within this registry.

Returns:
an iterator over all AttributeTypes in registry

getNormalizerMapping

java.util.Map getNormalizerMapping()
                                   throws javax.naming.NamingException
Gets an oid/name to normalizer mapping used to normalize distinguished names.

Throws:
javax.naming.NamingException

hasDescendants

boolean hasDescendants(java.lang.String ancestorId)
                       throws javax.naming.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:
javax.naming.NamingException - if the ancestor attributeType cannot be discerned from the ancestorId supplied

descendants

java.util.Iterator descendants(java.lang.String ancestorId)
                               throws javax.naming.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:
javax.naming.NamingException - if the ancestor attributeType cannot be discerned from the ancestorId supplied


Copyright © 2003-2010 Apache Software Foundation. All Rights Reserved.