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.AttributeType;
25
26
27 /***
28 * An AttributeType registry service interface.
29 *
30 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
31 * @version $Rev: 264732 $
32 */
33 public interface AttributeTypeRegistry
34 {
35 /***
36 * Registers a new AttributeType with this registry.
37 *
38 * @param schema the name of the schema the AttributeType is associated with
39 * @param attributeType the AttributeType to register
40 * @throws NamingException if the AttributeType is already registered or
41 * the registration operation is not supported
42 */
43 void register( String schema, AttributeType attributeType ) throws NamingException;
44
45 /***
46 * Looks up an AttributeType by its unique Object Identifier or by its
47 * unique name.
48 *
49 * @param id the object identifier or name of the AttributeType
50 * @return the AttributeType instance for the oid
51 * @throws NamingException if the AttributeType does not exist
52 */
53 AttributeType lookup( String id ) throws NamingException;
54
55 /***
56 * Gets the name of the schema this schema object is associated with.
57 *
58 * @param id the object identifier or the name
59 * @return the schema name
60 * @throws NamingException if the schema object does not exist
61 */
62 String getSchemaName( String id ) throws NamingException;
63
64 /***
65 * Checks to see if an AttributeType exists.
66 *
67 * @param id the object identifier or name of the AttributeType
68 * @return true if an AttributeType definition exists for the oid, false
69 * otherwise
70 */
71 boolean hasAttributeType( String id );
72
73 /***
74 * Gets an Iterator over the AttributeTypes within this registry.
75 *
76 * @return an iterator over all AttributeTypes in registry
77 */
78 Iterator list();
79 }