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
22 import org.apache.ldap.common.schema.SyntaxChecker;
23
24
25 /***
26 * SyntaxChecker 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 SyntaxCheckerRegistry
32 {
33 /***
34 * Registers a SyntaxChecker with this registry.
35 *
36 * @param schema the name of the schema the SyntaxChecker is associated with
37 * @param syntaxChecker the SyntaxChecker to register
38 * @throws NamingException if the SyntaxChecker is already registered or the
39 * registration operation is not supported
40 */
41 void register( String schema, String oid, SyntaxChecker syntaxChecker )
42 throws NamingException;
43
44 /***
45 * Looks up a SyntaxChecker by its unique Object Identifier.
46 *
47 * @param oid the object identifier
48 * @return the SyntaxChecker for the oid
49 * @throws NamingException if there is a backing store failure or the
50 * SyntaxChecker does not exist.
51 */
52 SyntaxChecker lookup( String oid ) throws NamingException;
53
54 /***
55 * Gets the name of the schema this schema object is associated with.
56 *
57 * @param oid the object identifier
58 * @return the schema name
59 * @throws NamingException if the schema object does not exist
60 */
61 String getSchemaName( String oid ) throws NamingException;
62
63 /***
64 * Checks to see if a SyntaxChecker exists. Backing store failures simply
65 * return false.
66 *
67 * @param oid the object identifier
68 * @return true if a SyntaxChecker definition exists for the oid, false
69 * otherwise
70 */
71 boolean hasSyntaxChecker( String oid );
72 }