Author: akarasulu Date: Thu Oct 14 23:05:38 2004 New Revision: 54826 Added: incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/BootstrapRegistries.java (contents, props changed) incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/ComparatorFactory.java (contents, props changed) incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/MatchingRuleFactory.java (contents, props changed) incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/NormalizerFactory.java (contents, props changed) incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/SyntaxCheckerFactory.java (contents, props changed) Log: adding a few factory interfaces
Added: incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/BootstrapRegistries.java ============================================================================== --- (empty file) +++ incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/BootstrapRegistries.java Thu Oct 14 23:05:38 2004 @@ -0,0 +1,121 @@ +/* + * Copyright 2004 The Apache Software Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package org.apache.eve.schema.config; + + +import org.apache.eve.schema.*; + + +/** + * Document me. + * + * @author <a href="mailto:[EMAIL PROTECTED]">Apache Directory Project</a> + * @version $Rev$ + */ +public class BootstrapRegistries +{ + private AttributeTypeRegistry attributeTypeRegistry; + private ComparatorRegistry comparatorRegistry; + private DITContentRuleRegistry ditContentRuleRegistry; + private DITStructureRuleRegistry ditStructureRuleRegistry; + private MatchingRuleRegistry matchingRuleRegistry; + private MatchingRuleUseRegistry matchingRuleUseRegistry; + private NameFormRegistry nameFormRegistry; + private NormalizerRegistry normalizerRegistry; + private ObjectClassRegistry objectClassRegistry; + private OidRegistry oidRegistry; + private SyntaxCheckerRegistry syntaxCheckerRegistry; + private SyntaxRegistry syntaxRegistry; + + + public BootstrapRegistries() + { + oidRegistry = new DefaultOidRegistry(); + normalizerRegistry = new DefaultNormalizerRegistry(); + comparatorRegistry = new DefaultComparatorRegistry(); + syntaxCheckerRegistry = new DefaultSyntaxCheckerRegistry(); + syntaxRegistry = new DefaultSyntaxRegistry( getOidRegistry() ); + matchingRuleRegistry = new DefaultMatchingRuleRegistry( getOidRegistry() ); + attributeTypeRegistry = new DefaultAttributeTypeRegistry( getOidRegistry() ); + objectClassRegistry = new DefaultObjectClassRegistry( getOidRegistry() ); + ditContentRuleRegistry = new DefaultDITContentRuleRegistry( getOidRegistry() ); + ditStructureRuleRegistry = new DefaultDITStructureRuleRegistry( getOidRegistry() ); + matchingRuleUseRegistry = new DefaultMatchingRuleUseRegistry(); + nameFormRegistry = new DefaultNameFormRegistry( getOidRegistry() ); + } + + + public AttributeTypeRegistry getAttributeTypeRegistry() + { + return attributeTypeRegistry; + } + + public ComparatorRegistry getComparatorRegistry() + { + return comparatorRegistry; + } + + public DITContentRuleRegistry getDitContentRuleRegistry() + { + return ditContentRuleRegistry; + } + + public DITStructureRuleRegistry getDitStructureRuleRegistry() + { + return ditStructureRuleRegistry; + } + + public MatchingRuleRegistry getMatchingRuleRegistry() + { + return matchingRuleRegistry; + } + + public MatchingRuleUseRegistry getMatchingRuleUseRegistry() + { + return matchingRuleUseRegistry; + } + + public NameFormRegistry getNameFormRegistry() + { + return nameFormRegistry; + } + + public NormalizerRegistry getNormalizerRegistry() + { + return normalizerRegistry; + } + + public ObjectClassRegistry getObjectClassRegistry() + { + return objectClassRegistry; + } + + public OidRegistry getOidRegistry() + { + return oidRegistry; + } + + public SyntaxCheckerRegistry getSyntaxCheckerRegistry() + { + return syntaxCheckerRegistry; + } + + public SyntaxRegistry getSyntaxRegistry() + { + return syntaxRegistry; + } +} Added: incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/ComparatorFactory.java ============================================================================== --- (empty file) +++ incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/ComparatorFactory.java Thu Oct 14 23:05:38 2004 @@ -0,0 +1,37 @@ +/* + * Copyright 2004 The Apache Software Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package org.apache.eve.schema.config; + + +import java.util.Map; + + +/** + * A Factory for Comparator OID String to Comparator object mapping. + * + * @author <a href="mailto:[EMAIL PROTECTED]">Apache Directory Project</a> + * @version $Rev$ + */ +public interface ComparatorFactory +{ + /** + * Creates a Comparator OID String to Comparator object mapping. + * + * @return a Map of Comparator OID Strings to Comparator objects + */ + Map getComparators(); +} Added: incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/MatchingRuleFactory.java ============================================================================== --- (empty file) +++ incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/MatchingRuleFactory.java Thu Oct 14 23:05:38 2004 @@ -0,0 +1,41 @@ +/* + * Copyright 2004 The Apache Software Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package org.apache.eve.schema.config; + + +import org.apache.eve.schema.OidRegistry; +import org.apache.eve.schema.SyntaxRegistry; +import org.apache.eve.schema.NormalizerRegistry; +import org.apache.eve.schema.ComparatorRegistry; + +import java.util.Map; + + +/** + * A factory that creates a Map of MatchingRule OID Strings to MatchingRule + * objects. + * + * @author <a href="mailto:[EMAIL PROTECTED]">Apache Directory Project</a> + * @version $Rev$ + */ +public interface MatchingRuleFactory +{ + Map getMatchingRules( OidRegistry oidRegistry, + SyntaxRegistry syntaxRegistry, + NormalizerRegistry normalizerRegistry, + ComparatorRegistry comparatorRegistry ); +} Added: incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/NormalizerFactory.java ============================================================================== --- (empty file) +++ incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/NormalizerFactory.java Thu Oct 14 23:05:38 2004 @@ -0,0 +1,37 @@ +/* + * Copyright 2004 The Apache Software Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package org.apache.eve.schema.config; + + +import java.util.Map; + + +/** + * A factory which creates a Normalizer OID String to Normalizer object mapping. + * + * @author <a href="mailto:[EMAIL PROTECTED]">Apache Directory Project</a> + * @version $Rev$ + */ +public interface NormalizerFactory +{ + /** + * Creates a Normalizer OID String to Normalizer object mapping. + * + * @return a Map of Normalizer OID Strings to Normalizer objects + */ + Map getNormalizers(); +} Added: incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/SyntaxCheckerFactory.java ============================================================================== --- (empty file) +++ incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/SyntaxCheckerFactory.java Thu Oct 14 23:05:38 2004 @@ -0,0 +1,37 @@ +/* + * Copyright 2004 The Apache Software Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package org.apache.eve.schema.config; + + +import java.util.Map; + + +/** + * Factory that creates a SyntaxChecker OID String to SyntaxChecker mapping. + * + * @author <a href="mailto:[EMAIL PROTECTED]">Apache Directory Project</a> + * @version $Rev$ + */ +public interface SyntaxCheckerFactory +{ + /** + * Creates a SyntaxChecker OID String to SyntaxChecker mapping. + * + * @return a Map of SyntaxChecker OID Strings to SyntaxChecker objects + */ + Map getSyntaxCheckers(); +}
