KickJava   Java API By Example, From Geeks To Geeks.

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


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.Normalizer;
21
22 import javax.naming.NamingException JavaDoc;
23
24
25 /**
26  * Normalizer registry service interface.
27  *
28  * @author <a HREF="mailto:dev@directory.apache.org">Apache Directory Project</a>
29  * @version $Rev: 169198 $
30  */

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

41     void register( String JavaDoc schema, String JavaDoc oid, Normalizer normalizer ) throws NamingException JavaDoc;
42     
43     /**
44      * Looks up a Normalizer by its unique Object Identifier.
45      *
46      * @param oid the object identifier
47      * @return the Normalizer for the oid
48      * @throws NamingException if there is a backing store failure or the
49      * Normalizer does not exist.
50      */

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

60     String JavaDoc getSchemaName( String JavaDoc oid ) throws NamingException JavaDoc;
61
62     /**
63      * Checks to see if a Normalizer exists. Backing store failures simply
64      * return false.
65      *
66      * @param oid the object identifier
67      * @return true if a Normalizer definition exists for the oid, false
68      * otherwise
69      */

70     boolean hasNormalizer( String JavaDoc oid );
71 }
72
Popular Tags