KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > ldap > server > schema > DITContentRuleRegistry


1 /*
2  * Copyright 2004 The Apache Software Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */

17 package org.apache.ldap.server.schema;
18
19
20 import org.apache.ldap.common.schema.DITContentRule;
21
22 import javax.naming.NamingException JavaDoc;
23 import java.util.Iterator JavaDoc;
24
25
26 /**
27  * An DITContentRule registry's service interface.
28  *
29  * @author <a HREF="mailto:dev@directory.apache.org">Apache Directory Project</a>
30  * @version $Rev: 169198 $
31  */

32 public interface DITContentRuleRegistry
33 {
34     /**
35      * Registers a DITContentRule with this registry.
36      *
37      * @param schema the name of the schema the DITContentRule is associated with
38      * @param dITContentRule the DITContentRule to register
39      * @throws NamingException if the DITContentRule is already registered or
40      * the registration operation is not supported
41      */

42     void register( String JavaDoc schema, DITContentRule dITContentRule ) throws NamingException JavaDoc;
43     
44     /**
45      * Looks up a DITContentRule by its object identifier or by its name.
46      *
47      * @param id the object identifier or name of the DITContentRule
48      * @return the DITContentRule instance for the id
49      * @throws NamingException if the DITContentRule does not exist
50      */

51     DITContentRule lookup( String JavaDoc id ) throws NamingException JavaDoc;
52
53     /**
54      * Gets the name of the schema this schema object is associated with.
55      *
56      * @param id the object identifier or the name
57      * @return the schema name
58      * @throws NamingException if the schema object does not exist
59      */

60     String JavaDoc getSchemaName( String JavaDoc id ) throws NamingException JavaDoc;
61
62     /**
63      * Checks to see if a DITContentRule exists.
64      *
65      * @param id the object identifier or name of the DITContentRule
66      * @return true if a DITContentRule definition exists for the id, false
67      * otherwise
68      */

69     boolean hasDITContentRule( String JavaDoc id );
70
71     /**
72      * Lists all the DITContentRules within this registry.
73      *
74      * @return Iterator over all the DITContentRules within this registry
75      */

76     Iterator JavaDoc list();
77 }
78
Popular Tags