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.List; 24 import java.util.Map; 25 import java.util.Properties; 26 27 import org.apache.directory.server.schema.bootstrap.Schema; 28 29 30 /** 31 * Document this class. 32 * 33 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a> 34 * @version $Rev: 658888 $ 35 */ 36 public interface Registries 37 { 38 String getName(); 39 40 Map<String,Schema> getLoadedSchemas(); 41 42 void load( String schemaName ) throws Exception; 43 44 void load( String schemaName, Properties props ) throws Exception; 45 46 void unload( String schemaName ) throws Exception; 47 48 SchemaLoader setSchemaLoader(); 49 50 AttributeTypeRegistry getAttributeTypeRegistry(); 51 52 ComparatorRegistry getComparatorRegistry(); 53 54 DITContentRuleRegistry getDitContentRuleRegistry(); 55 56 DITStructureRuleRegistry getDitStructureRuleRegistry(); 57 58 MatchingRuleRegistry getMatchingRuleRegistry(); 59 60 MatchingRuleUseRegistry getMatchingRuleUseRegistry(); 61 62 NameFormRegistry getNameFormRegistry(); 63 64 NormalizerRegistry getNormalizerRegistry(); 65 66 ObjectClassRegistry getObjectClassRegistry(); 67 68 OidRegistry getOidRegistry(); 69 70 SyntaxCheckerRegistry getSyntaxCheckerRegistry(); 71 72 SyntaxRegistry getSyntaxRegistry(); 73 74 List<Throwable> checkRefInteg(); 75 76 Schema getSchema( String schemaName ); 77 78 /** 79 * Removes a schema from the loaded set without unloading the schema. 80 * This should be used ONLY when an enabled schema is deleted. 81 * 82 * @param schemaName the name of the schema to remove 83 */ 84 void removeFromLoadedSet( String schemaName ); 85 86 /** 87 * Adds a schema to the loaded set but does not load the schema in 88 * question. This may be a temporary fix for new schemas being added 89 * which are enabled yet do not have any schema entities associated 90 * with them to load. In this case all objects added under this 91 * schema will load when added instead of in bulk. 92 * 93 * @param schema the schema object to add to the loaded set. 94 */ 95 void addToLoadedSet( Schema schema ); 96 }