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

All Known Implementing Classes:
BootstrapComparatorRegistry, GlobalComparatorRegistry

public interface ComparatorRegistry

Comparator registry component's service interface.

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

Method Summary
 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.
 void register(java.lang.String schema, java.lang.String oid, java.util.Comparator comparator)
          Registers a Comparator with this registry.
 

Method Detail

getSchemaName

public 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

public void register(java.lang.String schema,
                     java.lang.String oid,
                     java.util.Comparator comparator)
              throws javax.naming.NamingException
Registers a Comparator with this registry.

Parameters:
schema - the name of the schema the comparator is associated with
oid - the object identifier
comparator - the Comparator to register
Throws:
javax.naming.NamingException - if the Comparator is already registered or the registration operation is not supported

lookup

public 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

public 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