View Javadoc

1   /*
2    *  Licensed to the Apache Software Foundation (ASF) under one
3    *  or more contributor license agreements.  See the NOTICE file
4    *  distributed with this work for additional information
5    *  regarding copyright ownership.  The ASF licenses this file
6    *  to you under the Apache License, Version 2.0 (the
7    *  "License"); you may not use this file except in compliance
8    *  with the License.  You may obtain a copy of the License at
9    *  
10   *    http://www.apache.org/licenses/LICENSE-2.0
11   *  
12   *  Unless required by applicable law or agreed to in writing,
13   *  software distributed under the License is distributed on an
14   *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   *  KIND, either express or implied.  See the License for the
16   *  specific language governing permissions and limitations
17   *  under the License. 
18   *  
19   */
20  package org.apache.directory.server.schema.registries;
21  
22  
23  import java.util.Iterator;
24  
25  import javax.naming.NamingException;
26  
27  import org.apache.directory.shared.ldap.schema.MatchingRuleUse;
28  
29  
30  /**
31   * A MatchingRuleUse registry service interface.  MatchingRuleUse objects are
32   * special in that they do not have unique OID's specifically assigned to them.
33   * Their OID is really the OID of the MatchingRule they refer to.
34   *
35   * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
36   * @version $Rev: 499844 $
37   */
38  public interface MatchingRuleUseRegistry extends SchemaObjectRegistry
39  {
40      /**
41       * Registers a MatchingRuleUse with this registry.
42       *
43       * @param matchingRuleUse the matchingRuleUse to register
44       * @throws NamingException if the MatchingRuleUse is already registered or
45       * the registration operation is not supported
46       */
47      void register( MatchingRuleUse matchingRuleUse ) throws NamingException;
48  
49  
50      /**
51       * Looks up an matchingRuleUse by its name.
52       * 
53       * @param name the name of the matchingRuleUse
54       * @return the MatchingRuleUse instance for the name
55       * @throws NamingException if the MatchingRuleUse does not exist
56       */
57      MatchingRuleUse lookup( String name ) throws NamingException;
58  
59      
60      /**
61       * Checks to see if an matchingRuleUse exists.
62       * 
63       * @param name the name of the matchingRuleUse
64       * @return true if an matchingRuleUse definition exists for the name, false
65       * otherwise
66       */
67      boolean hasMatchingRuleUse( String name );
68  
69  
70      /**
71       * Lists all the MatchingRuleUses within this registry.
72       *
73       * @return an Iterator over all the MatchingRuleUses within this registry
74       */
75      Iterator<MatchingRuleUse> iterator();
76  }