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.DITContentRule; 28 29 30 /** 31 * An DITContentRule registry's service interface. 32 * 33 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a> 34 * @version $Rev: 499844 $ 35 */ 36 public interface DITContentRuleRegistry extends SchemaObjectRegistry 37 { 38 /** 39 * Registers a DITContentRule with this registry. 40 * 41 * @param dITContentRule the DITContentRule to register 42 * @throws NamingException if the DITContentRule is already registered or 43 * the registration operation is not supported 44 */ 45 void register( DITContentRule dITContentRule ) throws NamingException; 46 47 48 /** 49 * Looks up a DITContentRule by its object identifier or by its name. 50 * 51 * @param id the object identifier or name of the DITContentRule 52 * @return the DITContentRule instance for the id 53 * @throws NamingException if the DITContentRule does not exist 54 */ 55 DITContentRule lookup( String id ) throws NamingException; 56 57 58 /** 59 * Checks to see if a DITContentRule exists. 60 * 61 * @param id the object identifier or name of the DITContentRule 62 * @return true if a DITContentRule definition exists for the id, false 63 * otherwise 64 */ 65 boolean hasDITContentRule( String id ); 66 67 /** 68 * Lists the DITContentRules registered in this registry. 69 * 70 * @return an Iterator of DITContentRules 71 */ 72 Iterator<DITContentRule> iterator(); 73 }