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