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

All Superinterfaces:
SchemaObjectRegistry
All Known Implementing Classes:
DefaultAttributeTypeRegistry

public interface AttributeTypeRegistry
extends SchemaObjectRegistry

An AttributeType registry service interface.

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

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.Set<java.lang.String> getBinaryAttributes()
          Gets a set of Strings representing the aliases, and numeric identifiers of all binary attributes.
 java.util.Map<java.lang.String,org.apache.directory.shared.ldap.schema.OidNormalizer> getNormalizerMapping()
          Gets an oid/name to normalizer mapping used to normalize distinguished names.
 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.
 void register(org.apache.directory.shared.ldap.schema.AttributeType attributeType)
          Registers a new AttributeType with this registry.
 
Methods inherited from interface org.apache.directory.server.schema.registries.SchemaObjectRegistry
getSchemaName, unregister
 

Method Detail

register

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

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

getBinaryAttributes

java.util.Set<java.lang.String> getBinaryAttributes()
                                                    throws javax.naming.NamingException
Gets a set of Strings representing the aliases, and numeric identifiers of all binary attributes. The set will contain all the aliases for a binary attributeType (one whose syntax is not human readible) along with its numeric identifier.

Returns:
set of aliases and numeric ids for binary attributeTypes
Throws:
javax.naming.NamingException - if there are issues resolving type information

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

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

iterator

java.util.Iterator<org.apache.directory.shared.ldap.schema.AttributeType> iterator()
Gets an Iterator over the AttributeTypes within this registry.

Specified by:
iterator in interface SchemaObjectRegistry
Returns:
an iterator over all AttributeTypes in registry

getNormalizerMapping

java.util.Map<java.lang.String,org.apache.directory.shared.ldap.schema.OidNormalizer> getNormalizerMapping()
                                                                                                           throws javax.naming.NamingException
Gets an oid/name to normalizer mapping used to normalize distinguished names.

Returns:
a map of OID Strings to OidNormalizer instances
Throws:
javax.naming.NamingException - if for some reason this information cannot be returned

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<org.apache.directory.shared.ldap.schema.AttributeType> 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-2009 Apache Software Foundation. All Rights Reserved.