1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.ldap.server.schema;
18
19
20 import javax.naming.NamingException;
21 import java.util.Comparator;
22
23
24 /***
25 * Comparator registry component's service interface.
26 *
27 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
28 * @version $Rev: 159259 $
29 */
30 public interface ComparatorRegistry
31 {
32 /***
33 * Gets the name of the schema this schema object is associated with.
34 *
35 * @param oid the object identifier
36 * @return the schema name
37 * @throws NamingException if the schema object does not exist
38 */
39 String getSchemaName( String oid ) throws NamingException;
40
41 /***
42 * Registers a Comparator with this registry.
43 *
44 * @param schema the name of the schema the comparator is associated with
45 * @param oid the object identifier
46 * @param comparator the Comparator to register
47 * @throws NamingException if the Comparator is already registered or the
48 * registration operation is not supported
49 */
50 void register( String schema, String oid, Comparator comparator ) throws NamingException;
51
52 /***
53 * Looks up a Comparator by its unique Object Identifier.
54 *
55 * @param oid the object identifier
56 * @return the Comparator for the oid
57 * @throws NamingException if there is a backing store failure or the
58 * Comparator does not exist.
59 */
60 Comparator lookup( String oid ) throws NamingException;
61
62 /***
63 * Checks to see if a Comparator exists. Backing store failures simply
64 * return false.
65 *
66 * @param oid the object identifier
67 * @return true if a Comparator definition exists for the oid, false
68 * otherwise
69 */
70 boolean hasComparator( String oid );
71 }