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

All Known Implementing Classes:
DefaultComparatorRegistry

public interface ComparatorRegistry

Comparator registry component's service interface.

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

Method Summary
 java.util.Iterator<org.apache.directory.shared.ldap.schema.syntax.ComparatorDescription> comparatorDescriptionIterator()
          Iterates over the numeric OID strings of this registry.
 java.lang.String getSchemaName(java.lang.String oid)
          Gets the name of the schema this schema object is associated with.
 boolean hasComparator(java.lang.String oid)
          Checks to see if a Comparator exists.
 java.util.Comparator lookup(java.lang.String oid)
          Looks up a Comparator by its unique Object Identifier.
 java.util.Iterator<java.lang.String> oidIterator()
          Iterates over the numeric OID strings of this registry.
 void register(org.apache.directory.shared.ldap.schema.syntax.ComparatorDescription description, java.util.Comparator comparator)
          Registers a Comparator with this registry.
 void renameSchema(java.lang.String originalSchemaName, java.lang.String newSchemaName)
          Renames the schemaName associated with entities within this registry to a new schema name.
 void unregister(java.lang.String oid)
          Removes a registered comparator from this registry.
 void unregisterSchemaElements(java.lang.String schemaName)
          Unregisters comparators from this registry associated with a schema.
 

Method Detail

getSchemaName

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

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

register

void register(org.apache.directory.shared.ldap.schema.syntax.ComparatorDescription description,
              java.util.Comparator comparator)
              throws javax.naming.NamingException
Registers a Comparator with this registry.

Parameters:
description - the comparatorDescription for the comparator to register
comparator - the Comparator to register
Throws:
javax.naming.NamingException - if the Comparator is already registered or the registration operation is not supported

lookup

java.util.Comparator lookup(java.lang.String oid)
                            throws javax.naming.NamingException
Looks up a Comparator by its unique Object Identifier.

Parameters:
oid - the object identifier
Returns:
the Comparator for the oid
Throws:
javax.naming.NamingException - if there is a backing store failure or the Comparator does not exist.

hasComparator

boolean hasComparator(java.lang.String oid)
Checks to see if a Comparator exists. Backing store failures simply return false.

Parameters:
oid - the object identifier
Returns:
true if a Comparator definition exists for the oid, false otherwise

oidIterator

java.util.Iterator<java.lang.String> oidIterator()
Iterates over the numeric OID strings of this registry.

Returns:
Iterator of numeric OID strings

comparatorDescriptionIterator

java.util.Iterator<org.apache.directory.shared.ldap.schema.syntax.ComparatorDescription> comparatorDescriptionIterator()
Iterates over the numeric OID strings of this registry.

Returns:
Iterator of numeric OID strings

unregister

void unregister(java.lang.String oid)
                throws javax.naming.NamingException
Removes a registered comparator from this registry.

Parameters:
oid - the numeric oid of the comparator to remove.
Throws:
javax.naming.NamingException - if the oid is not a numeric id

unregisterSchemaElements

void unregisterSchemaElements(java.lang.String schemaName)
Unregisters comparators from this registry associated with a schema.

Parameters:
schemaName - the name of the schema whose comparators are removed from this registry

renameSchema

void renameSchema(java.lang.String originalSchemaName,
                  java.lang.String newSchemaName)
Renames the schemaName associated with entities within this registry to a new schema name.

Parameters:
originalSchemaName - the original schema name
newSchemaName - the new name to give to the schema


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