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 import javax.naming.ldap.LdapContext;
22
23 import org.apache.ldap.server.jndi.ServerDirObjectFactory;
24
25
26 /***
27 * A registry used for looking up JNDI object factories based on meta data
28 * regarding the objectClass and Class associations with the object factory.
29 * Unlike other registries which often throw exceptions when they cannot find
30 * an object, this one does not. It returns null if an 'optional' object
31 * factory cannot be found.
32 *
33 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
34 * @version $Rev: 264732 $
35 */
36 public interface ObjectFactoryRegistry
37 {
38 /***
39 * Gets the list of ObjectFactories associated with an entry. Several object
40 * factories could be associated with an entry due to the presence of
41 * auxiliary objectClasses.
42 *
43 * @param ctx the context of the entry
44 * @return the ObjectFactories that could be used for the entry
45 */
46 ServerDirObjectFactory getObjectFactories( LdapContext ctx ) throws NamingException;
47
48 /***
49 * Registers a server-side object factory with this registry.
50 *
51 * @param factory the factory to register.
52 */
53 void register( ServerDirObjectFactory factory ) throws NamingException;
54 }