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.Iterator;
21
22 import javax.naming.NamingException;
23
24 import org.apache.ldap.common.schema.MatchingRuleUse;
25
26
27 /***
28 * A MatchingRuleUse registry service interface. MatchingRuleUse objects are
29 * special in that they do not have unique OID's specifically assigned to them.
30 * Their OID is really the OID of the MatchingRule they refer to.
31 *
32 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
33 * @version $Rev: 264732 $
34 */
35 public interface MatchingRuleUseRegistry
36 {
37 /***
38 * Registers a MatchingRuleUse with this registry.
39 *
40 * @param schema the name of the schema the MatchingRuleUse is associated with
41 * @param matchingRuleUse the matchingRuleUse to register
42 * @throws NamingException if the MatchingRuleUse is already registered or
43 * the registration operation is not supported
44 */
45 void register( String schema, MatchingRuleUse matchingRuleUse ) throws NamingException;
46
47 /***
48 * Looks up an matchingRuleUse by its name.
49 *
50 * @param name the name of the matchingRuleUse
51 * @return the MatchingRuleUse instance for the name
52 * @throws NamingException if the MatchingRuleUse does not exist
53 */
54 MatchingRuleUse lookup( String name ) throws NamingException;
55
56 /***
57 * Gets the name of the schema this schema object is associated with.
58 *
59 * @param name the name String
60 * @return the schema name
61 * @throws NamingException if the schema object does not exist
62 */
63 String getSchemaName( String name ) throws NamingException;
64
65 /***
66 * Checks to see if an matchingRuleUse exists.
67 *
68 * @param name the name of the matchingRuleUse
69 * @return true if an matchingRuleUse definition exists for the name, false
70 * otherwise
71 */
72 boolean hasMatchingRuleUse( String name );
73
74 /***
75 * Lists all the MatchingRuleUses within this registry.
76 *
77 * @return an Iterator over all the MatchingRuleUses within this registry
78 */
79 Iterator list();
80 }