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