Author: akarasulu
Date: Fri Oct 15 15:11:06 2004
New Revision: 54880
Added:
incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/bootstrap/BootstrapProducer.java
(contents, props changed)
incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/bootstrap/ProducerCallback.java
(contents, props changed)
incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/bootstrap/ProducerTypeEnum.java
(contents, props changed)
Removed:
incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/bootstrap/AttributeTypeFactory.java
incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/bootstrap/ComparatorFactory.java
incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/bootstrap/MatchingRuleFactory.java
incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/bootstrap/NormalizerFactory.java
incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/bootstrap/SyntaxCheckerFactory.java
incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/bootstrap/SyntaxFactory.java
Modified:
incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/bootstrap/BootstrapSchemaLoader.java
incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/bootstrap/CoreSyntaxFactory.java
Log:
Commit changes ...
o removed all factory interfaces in favor of producers that announce each
schema object created as they are created
o modified any factory implementations to now fit the producer cb model
o drastically simplified the BootstrapSchemaLoader using new producer cb model
o added a type safe enumeration for ProducerTypes
Conclusions ...
o the cb based producers have resulted in much less and cleaner code without
all those darn factories
o the cb model solves several issues with schema objects that depend on other
schema objects of the same type
- ObjectClasses depend on other ObjectClasses and hence there is potential
for an ObjectClass definition a schema to be reused by another ObjectClass
definition in the same schema; this presents a problem with the bulk load
approach which does not update the registry as we go
- AttributeTypes also depend on other superior AttributeTypes and hence have
the same issues as ObjectClasses
Added:
incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/bootstrap/BootstrapProducer.java
==============================================================================
--- (empty file)
+++
incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/bootstrap/BootstrapProducer.java
Fri Oct 15 15:11:06 2004
@@ -0,0 +1,52 @@
+/*
+ * 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.bootstrap;
+
+
+import javax.naming.NamingException;
+
+
+/**
+ * A schema object producer which uses a callback to announce object creation
+ * rather than completely returning objects in bulk. This way registries can
+ * be populated while the producer is doing is creating schema objects.
+ *
+ * @author <a href="mailto:[EMAIL PROTECTED]">Apache Directory Project</a>
+ * @version $Rev$
+ */
+public interface BootstrapProducer
+{
+ /**
+ * Gets the type of producer this is.
+ *
+ * @return the type of the BootstrapProducer as a enum
+ */
+ ProducerTypeEnum getType();
+
+ /**
+ * Produces schema objects announcing each one after creation via the
+ * callback before continuing on to create more objects.
+ *
+ * @param registries the registry set used by this producer
+ * @param cb the producer's callback
+ * @throws NamingException callbacks often operate upon registries and can
+ * throw these exceptions so we must throw this as well since
+ * implementations will have to call the callback methods
+ */
+ void produce( BootstrapRegistries registries, ProducerCallback cb )
+ throws NamingException;
+}
Modified:
incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/bootstrap/BootstrapSchemaLoader.java
==============================================================================
---
incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/bootstrap/BootstrapSchemaLoader.java
(original)
+++
incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/bootstrap/BootstrapSchemaLoader.java
Fri Oct 15 15:11:06 2004
@@ -17,14 +17,14 @@
package org.apache.eve.schema.bootstrap;
-import org.apache.eve.schema.*;
-import org.apache.ldap.common.schema.*;
-
-import java.util.Map;
-import java.util.Iterator;
+import java.util.List;
import java.util.Comparator;
+
import javax.naming.NamingException;
+import org.apache.eve.schema.*;
+import org.apache.ldap.common.schema.*;
+
/**
* Class which handles bootstrap schema class file loading.
@@ -34,172 +34,151 @@
*/
public class BootstrapSchemaLoader
{
- public final void load( BootstrapSchema schema, BootstrapRegistries
registries )
- throws NamingException
+ private ThreadLocal schemas;
+ private ThreadLocal registries;
+ private final ProducerCallback cb = new ProducerCallback()
{
- // Note that the first registry argument is the one being loaded
- load( schema, registries.getNormalizerRegistry() );
- load( schema, registries.getComparatorRegistry() );
- load( schema, registries.getSyntaxCheckerRegistry() );
- load( schema, registries.getSyntaxRegistry(),
registries.getSyntaxCheckerRegistry() );
- load( schema,
- registries.getMatchingRuleRegistry(),
- registries.getSyntaxRegistry(),
- registries.getNormalizerRegistry(),
- registries.getComparatorRegistry() );
- load( schema,
- registries.getAttributeTypeRegistry(),
- registries.getSyntaxRegistry(),
- registries.getMatchingRuleRegistry() );
- }
-
-
- // ------------------------------------------------------------------------
- // Utility Methods
- // ------------------------------------------------------------------------
-
-
- private void load( BootstrapSchema schema,
- AttributeTypeRegistry attributeTypeRegistry,
- SyntaxRegistry syntaxRegistry,
- MatchingRuleRegistry matchingRuleRegistry )
- throws NamingException
- {
- AttributeTypeFactory factory;
- factory = ( AttributeTypeFactory ) getFactory( schema,
"AttributeTypeFactory" );
-
- Map attributeTypes = factory.getAttributeTypes( syntaxRegistry,
- matchingRuleRegistry, attributeTypeRegistry );
- Iterator list = attributeTypes.values().iterator();
- while ( list.hasNext() )
+ public void schemaObjectProduced( BootstrapProducer producer,
+ String registryKey,
+ Object schemaObject )
+ throws NamingException
{
- AttributeType attributeType = ( AttributeType ) list.next();
- attributeTypeRegistry.register( schema.getSchemaName(),
attributeType );
+ register( producer.getType(), registryKey, schemaObject );
}
- }
+ };
- private void load( BootstrapSchema schema,
- MatchingRuleRegistry matchingRuleRegistry,
- SyntaxRegistry syntaxRegistry,
- NormalizerRegistry normalizerRegistry,
- ComparatorRegistry comparatorRegistry )
- throws NamingException
+ public BootstrapSchemaLoader()
{
- MatchingRuleFactory factory;
- factory = ( MatchingRuleFactory ) getFactory( schema,
"MatchingRuleFactory" );
-
- Map matchingRules = factory.getMatchingRules(syntaxRegistry,
- normalizerRegistry, comparatorRegistry );
- Iterator list = matchingRules.values().iterator();
- while ( list.hasNext() )
- {
- MatchingRule matchingRule = ( MatchingRule ) list.next();
- matchingRuleRegistry.register( schema.getSchemaName(),
matchingRule );
- }
+ schemas = new ThreadLocal();
+ registries = new ThreadLocal();
}
- private void load( BootstrapSchema schema,
- SyntaxRegistry syntaxRegistry,
- SyntaxCheckerRegistry syntaxCheckerRegistry )
+ public final void loadProducers( BootstrapSchema schema,
BootstrapRegistries registries )
throws NamingException
{
- SyntaxFactory factory;
- factory = ( SyntaxFactory ) getFactory( schema, "SyntaxFactory" );
+ this.registries.set( registries );
+ this.schemas.set( schema );
- Map syntaxes = factory.getSyntaxes( syntaxCheckerRegistry );
- Iterator list = syntaxes.values().iterator();
- while ( list.hasNext() )
+ List producers = ProducerTypeEnum.list();
+ for ( int ii = 0; ii < producers.size(); ii++ )
{
- Syntax syntax = ( Syntax ) list.next();
- syntaxRegistry.register( schema.getSchemaName(), syntax );
- }
- }
-
-
- private void load( BootstrapSchema schema, SyntaxCheckerRegistry registry )
- throws NamingException
- {
- SyntaxCheckerFactory factory;
- factory = ( SyntaxCheckerFactory ) getFactory( schema,
"SyntaxCheckerFactory" );
-
- Map syntaxCheckers = factory.getSyntaxCheckers();
- Iterator oidList = syntaxCheckers.keySet().iterator();
- while ( oidList.hasNext() )
- {
- String oid = ( String ) oidList.next();
- SyntaxChecker syntaxChecker = ( SyntaxChecker )
syntaxCheckers.get( oid );
- registry.register( schema.getSchemaName(), oid, syntaxChecker );
+ ProducerTypeEnum producerType = ( ProducerTypeEnum )
producers.get( ii );
+ BootstrapProducer producer = getProducer( schema,
producerType.getName() );
+ producer.produce( registries, cb );
}
}
- /**
- * Attempts first to try to load the target class for the
NormalizerFactory,
- * then tries for the default if the target load fails.
- *
- * @param schema the bootstrap schema
- * @param registry the registry to load Normalizers into
- * @throws NamingException if there are failures loading classes
- */
- private void load( BootstrapSchema schema, NormalizerRegistry registry )
- throws NamingException
- {
- NormalizerFactory factory;
- factory = ( NormalizerFactory ) getFactory( schema,
"NormalizerFactory" );
-
- Map normalizers = factory.getNormalizers();
- Iterator oidList = normalizers.keySet().iterator();
- while ( oidList.hasNext() )
- {
- String oid = ( String ) oidList.next();
- Normalizer normalizer = ( Normalizer ) normalizers.get( oid );
- registry.register( schema.getSchemaName(), oid, normalizer );
- }
- }
+ // ------------------------------------------------------------------------
+ // Utility Methods
+ // ------------------------------------------------------------------------
/**
- * Attempts first to try to load the target class for the
ComparatorFactory,
- * then tries for the default if the target load fails.
+ * Registers objects
*
- * @param schema the bootstrap schema
- * @param registry the registry to registry to load Normalizers into
- * @throws NamingException if there are failures loading classes
+ * @param type the type of the producer which determines the type of
object produced
+ * @param id the primary key identifying the created object in a registry
+ * @param schemaObject the object being registered
+ * @throws NamingException if there are problems when registering the
object
+ * in any of the registries
*/
- private void load( BootstrapSchema schema, ComparatorRegistry registry )
- throws NamingException
+ private void register( ProducerTypeEnum type, String id,
+ Object schemaObject ) throws NamingException
{
- ComparatorFactory factory;
- factory = ( ComparatorFactory ) getFactory( schema,
"ComparatorFactory" );
+ BootstrapSchema schema = ( BootstrapSchema ) this.schemas.get();
+ BootstrapRegistries registries = ( BootstrapRegistries )
this.registries.get();
- Map comparators = factory.getComparators();
- Iterator oidList = comparators.keySet().iterator();
- while ( oidList.hasNext() )
- {
- String oid = ( String ) oidList.next();
- Comparator comparator = ( Comparator ) comparators.get( oid );
- registry.register( schema.getSchemaName(), oid, comparator );
+ switch( type.getValue() )
+ {
+ case( ProducerTypeEnum.NORMALIZER_PRODUCER_VAL ):
+ Normalizer normalizer = ( Normalizer ) schemaObject;
+ NormalizerRegistry normalizerRegistry;
+ normalizerRegistry = registries.getNormalizerRegistry();
+ normalizerRegistry.register( schema.getSchemaName(), id,
normalizer );
+ break;
+ case( ProducerTypeEnum.COMPARATOR_PRODUCER_VAL ):
+ Comparator comparator = ( Comparator ) schemaObject;
+ ComparatorRegistry comparatorRegistry;
+ comparatorRegistry = registries.getComparatorRegistry();
+ comparatorRegistry.register( schema.getSchemaName(), id,
comparator );
+ break;
+ case( ProducerTypeEnum.SYNTAX_CHECKER_PRODUCER_VAL ):
+ SyntaxChecker syntaxChecker = ( SyntaxChecker ) schemaObject;
+ SyntaxCheckerRegistry syntaxCheckerRegistry;
+ syntaxCheckerRegistry = registries.getSyntaxCheckerRegistry();
+ syntaxCheckerRegistry.register( schema.getSchemaName(), id,
syntaxChecker );
+ break;
+ case( ProducerTypeEnum.SYNTAX_PRODUCER_VAL ):
+ Syntax syntax = ( Syntax ) schemaObject;
+ SyntaxRegistry syntaxRegistry = registries.getSyntaxRegistry();
+ syntaxRegistry.register( schema.getSchemaName(), syntax );
+ break;
+ case( ProducerTypeEnum.MATCHING_RULE_PRODUCER_VAL ):
+ MatchingRule matchingRule = ( MatchingRule ) schemaObject;
+ MatchingRuleRegistry matchingRuleRegistry;
+ matchingRuleRegistry = registries.getMatchingRuleRegistry();
+ matchingRuleRegistry.register( schema.getSchemaName(),
matchingRule );
+ break;
+ case( ProducerTypeEnum.ATTRIBUTE_TYPE_PRODUCER_VAL ):
+ AttributeType attributeType = ( AttributeType ) schemaObject;
+ AttributeTypeRegistry attributeTypeRegistry;
+ attributeTypeRegistry = registries.getAttributeTypeRegistry();
+ attributeTypeRegistry.register( schema.getSchemaName(),
attributeType );
+ break;
+ case( ProducerTypeEnum.OBJECT_CLASS_PRODUCER_VAL ):
+ ObjectClass objectClass = ( ObjectClass ) schemaObject;
+ ObjectClassRegistry objectClassRegistry;
+ objectClassRegistry = registries.getObjectClassRegistry();
+ objectClassRegistry.register( schema.getSchemaName(),
objectClass );
+ break;
+ case( ProducerTypeEnum.MATCHING_RULE_USE_PRODUCER_VAL ):
+ MatchingRuleUse matchingRuleUse = ( MatchingRuleUse )
schemaObject;
+ MatchingRuleUseRegistry matchingRuleUseRegistry;
+ matchingRuleUseRegistry =
registries.getMatchingRuleUseRegistry();
+ matchingRuleUseRegistry.register( schema.getSchemaName(),
matchingRuleUse );
+ break;
+ case( ProducerTypeEnum.DIT_CONTENT_RULE_PRODUCER_VAL ):
+ DITContentRule ditContentRule = ( DITContentRule )
schemaObject;
+ DITContentRuleRegistry ditContentRuleRegistry;
+ ditContentRuleRegistry =
registries.getDitContentRuleRegistry();
+ ditContentRuleRegistry.register( schema.getSchemaName(),
ditContentRule );
+ break;
+ case( ProducerTypeEnum.NAME_FORM_PRODUCER_VAL ):
+ NameForm nameForm = ( NameForm ) schemaObject;
+ NameFormRegistry nameFormRegistry;
+ nameFormRegistry = registries.getNameFormRegistry();
+ nameFormRegistry.register( schema.getSchemaName(), nameForm );
+ break;
+ case( ProducerTypeEnum.DIT_STRUCTURE_RULE_PRODUCER_VAL ):
+ DITStructureRule ditStructureRule = ( DITStructureRule )
schemaObject;
+ DITStructureRuleRegistry ditStructureRuleRegistry;
+ ditStructureRuleRegistry =
registries.getDitStructureRuleRegistry();
+ ditStructureRuleRegistry.register( schema.getSchemaName(),
ditStructureRule );
+ break;
+ default:
+ throw new IllegalStateException( "ProducerTypeEnum is broke!"
);
}
}
/**
- * Attempts first to try to load the target class for the Factory,
+ * Attempts first to try to load the target class for the Producer,
* then tries for the default if the target load fails.
*
* @param schema the bootstrap schema
- * @param factoryBase the factory base name
+ * @param producerBase the producer's base name
* @throws NamingException if there are failures loading classes
*/
- private Object getFactory( BootstrapSchema schema, String factoryBase )
+ private BootstrapProducer getProducer( BootstrapSchema schema, String
producerBase )
throws NamingException
{
Class clazz = null;
boolean failedTargetLoad = false;
String defaultClassName;
- String targetClassName = schema.getBaseClassName() + factoryBase;
+ String targetClassName = schema.getBaseClassName() + producerBase;
try
{
@@ -214,7 +193,7 @@
if ( failedTargetLoad )
{
- defaultClassName = schema.getDefaultBaseClassName() + factoryBase;
+ defaultClassName = schema.getDefaultBaseClassName() + producerBase;
try
{
@@ -223,7 +202,7 @@
catch ( ClassNotFoundException e )
{
NamingException ne = new NamingException( "Failed to load " +
- factoryBase + " for " + schema.getSchemaName()
+ producerBase + " for " + schema.getSchemaName()
+ " schema using following classes: " + targetClassName
+ ", " + defaultClassName );
ne.setRootCause( e );
@@ -233,7 +212,7 @@
try
{
- return clazz.newInstance();
+ return ( BootstrapProducer ) clazz.newInstance();
}
catch ( IllegalAccessException e )
{
Modified:
incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/bootstrap/CoreSyntaxFactory.java
==============================================================================
---
incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/bootstrap/CoreSyntaxFactory.java
(original)
+++
incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/bootstrap/CoreSyntaxFactory.java
Fri Oct 15 15:11:06 2004
@@ -20,6 +20,7 @@
import org.apache.ldap.common.schema.BaseSyntax;
import org.apache.eve.schema.SyntaxCheckerRegistry;
+import javax.naming.NamingException;
import java.util.Map;
import java.util.HashMap;
@@ -96,18 +97,24 @@
* @author <a href="mailto:[EMAIL PROTECTED]">Apache Directory Project</a>
* @version $Rev$
*/
-public class CoreSyntaxFactory implements SyntaxFactory
+public class CoreSyntaxFactory implements BootstrapProducer
{
// ------------------------------------------------------------------------
- // Syntax Factory Method
+ // BootstrapProducer Methods
// ------------------------------------------------------------------------
- public Map getSyntaxes( SyntaxCheckerRegistry registry )
+ public ProducerTypeEnum getType()
+ {
+ return ProducerTypeEnum.SYNTAX_PRODUCER;
+ }
+
+
+ public void produce( BootstrapRegistries registries, ProducerCallback cb )
+ throws NamingException
{
MutableSyntax syntax;
- Map syntaxes = new HashMap( 54 );
/*
* From RFC 2252 Section 4.3.2. on Syntax Object Identifiers
@@ -130,52 +137,52 @@
syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.1" );
syntax.setName( "ACI Item" );
syntax.setHumanReadible( false );
- syntaxes.put( syntax.getOid(), syntax );
+ cb.schemaObjectProduced( this, syntax.getOid(), syntax );
syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.2" );
syntax.setName( "Access Point" );
syntax.setHumanReadible( true );
- syntaxes.put( syntax.getOid(), syntax );
+ cb.schemaObjectProduced( this, syntax.getOid(), syntax );
syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.3" );
syntax.setName( "Attribute Type Description" );
syntax.setHumanReadible( true );
- syntaxes.put( syntax.getOid(), syntax );
+ cb.schemaObjectProduced( this, syntax.getOid(), syntax );
syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.4" );
syntax.setName( "Audio" );
syntax.setHumanReadible( false );
- syntaxes.put( syntax.getOid(), syntax );
+ cb.schemaObjectProduced( this, syntax.getOid(), syntax );
syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.5" );
syntax.setName( "Binary" );
syntax.setHumanReadible( false );
- syntaxes.put( syntax.getOid(), syntax );
+ cb.schemaObjectProduced( this, syntax.getOid(), syntax );
syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.6" );
syntax.setName( "Bit String" );
syntax.setHumanReadible( true );
- syntaxes.put( syntax.getOid(), syntax );
+ cb.schemaObjectProduced( this, syntax.getOid(), syntax );
syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.7" );
syntax.setName( "Boolean" );
syntax.setHumanReadible( true );
- syntaxes.put( syntax.getOid(), syntax );
+ cb.schemaObjectProduced( this, syntax.getOid(), syntax );
syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.8" );
syntax.setName( "Certificate" );
syntax.setHumanReadible( false );
- syntaxes.put( syntax.getOid(), syntax );
+ cb.schemaObjectProduced( this, syntax.getOid(), syntax );
syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.9" );
syntax.setName( "Certificate List" );
syntax.setHumanReadible( false );
- syntaxes.put( syntax.getOid(), syntax );
+ cb.schemaObjectProduced( this, syntax.getOid(), syntax );
syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.10" );
syntax.setName( "Certificate Pair" );
syntax.setHumanReadible( false );
- syntaxes.put( syntax.getOid(), syntax );
+ cb.schemaObjectProduced( this, syntax.getOid(), syntax );
/*
* Value being represented H-R OBJECT IDENTIFIER
@@ -194,52 +201,52 @@
syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.11" );
syntax.setName( "Country String" );
syntax.setHumanReadible( true );
- syntaxes.put( syntax.getOid(), syntax );
+ cb.schemaObjectProduced( this, syntax.getOid(), syntax );
syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.12" );
syntax.setName( "DN" );
syntax.setHumanReadible( true );
- syntaxes.put( syntax.getOid(), syntax );
+ cb.schemaObjectProduced( this, syntax.getOid(), syntax );
syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.13" );
syntax.setName( "Data Quality Syntax" );
syntax.setHumanReadible( true );
- syntaxes.put( syntax.getOid(), syntax );
+ cb.schemaObjectProduced( this, syntax.getOid(), syntax );
syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.14" );
syntax.setName( "Delivery Method" );
syntax.setHumanReadible( true );
- syntaxes.put( syntax.getOid(), syntax );
+ cb.schemaObjectProduced( this, syntax.getOid(), syntax );
syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.15" );
syntax.setName( "Directory String" );
syntax.setHumanReadible( true );
- syntaxes.put( syntax.getOid(), syntax );
+ cb.schemaObjectProduced( this, syntax.getOid(), syntax );
syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.16" );
syntax.setName( "DIT Content Rule Description" );
syntax.setHumanReadible( true );
- syntaxes.put( syntax.getOid(), syntax );
+ cb.schemaObjectProduced( this, syntax.getOid(), syntax );
syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.17" );
syntax.setName( "DIT Structure Rule Description" );
syntax.setHumanReadible( true );
- syntaxes.put( syntax.getOid(), syntax );
+ cb.schemaObjectProduced( this, syntax.getOid(), syntax );
syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.18" );
syntax.setName( "DL Submit Permission" );
syntax.setHumanReadible( true );
- syntaxes.put( syntax.getOid(), syntax );
+ cb.schemaObjectProduced( this, syntax.getOid(), syntax );
syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.19" );
syntax.setName( "DSA Quality Syntax" );
syntax.setHumanReadible( true );
- syntaxes.put( syntax.getOid(), syntax );
+ cb.schemaObjectProduced( this, syntax.getOid(), syntax );
syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.20" );
syntax.setName( "DSE Type" );
syntax.setHumanReadible( true );
- syntaxes.put( syntax.getOid(), syntax );
+ cb.schemaObjectProduced( this, syntax.getOid(), syntax );
/*
* Value being represented H-R OBJECT IDENTIFIER
@@ -258,52 +265,52 @@
syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.21" );
syntax.setName( "Enhanced Guide" );
syntax.setHumanReadible( true );
- syntaxes.put( syntax.getOid(), syntax );
+ cb.schemaObjectProduced( this, syntax.getOid(), syntax );
syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.22" );
syntax.setName( "Facsimile Telephone Number" );
syntax.setHumanReadible( true );
- syntaxes.put( syntax.getOid(), syntax );
+ cb.schemaObjectProduced( this, syntax.getOid(), syntax );
syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.23" );
syntax.setName( "Fax" );
syntax.setHumanReadible( false );
- syntaxes.put( syntax.getOid(), syntax );
+ cb.schemaObjectProduced( this, syntax.getOid(), syntax );
syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.24" );
syntax.setName( "Generalized Time" );
syntax.setHumanReadible( true );
- syntaxes.put( syntax.getOid(), syntax );
+ cb.schemaObjectProduced( this, syntax.getOid(), syntax );
syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.25" );
syntax.setName( "Guide" );
syntax.setHumanReadible( true );
- syntaxes.put( syntax.getOid(), syntax );
+ cb.schemaObjectProduced( this, syntax.getOid(), syntax );
syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.26" );
syntax.setName( "IA5 String" );
syntax.setHumanReadible( true );
- syntaxes.put( syntax.getOid(), syntax );
+ cb.schemaObjectProduced( this, syntax.getOid(), syntax );
syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.27" );
syntax.setName( "INTEGER" );
syntax.setHumanReadible( true );
- syntaxes.put( syntax.getOid(), syntax );
+ cb.schemaObjectProduced( this, syntax.getOid(), syntax );
syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.28" );
syntax.setName( "JPEG" );
syntax.setHumanReadible( false );
- syntaxes.put( syntax.getOid(), syntax );
+ cb.schemaObjectProduced( this, syntax.getOid(), syntax );
syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.29" );
syntax.setName( "Master And Shadow Access Points" );
syntax.setHumanReadible( true );
- syntaxes.put( syntax.getOid(), syntax );
+ cb.schemaObjectProduced( this, syntax.getOid(), syntax );
syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.30" );
syntax.setName( "Matching Rule Description" );
syntax.setHumanReadible( true );
- syntaxes.put( syntax.getOid(), syntax );
+ cb.schemaObjectProduced( this, syntax.getOid(), syntax );
/*
* Value being represented H-R OBJECT IDENTIFIER
@@ -322,52 +329,52 @@
syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.31" );
syntax.setName( "Matching Rule Use Description" );
syntax.setHumanReadible( true );
- syntaxes.put( syntax.getOid(), syntax );
+ cb.schemaObjectProduced( this, syntax.getOid(), syntax );
syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.32" );
syntax.setName( "Mail Preference" );
syntax.setHumanReadible( true );
- syntaxes.put( syntax.getOid(), syntax );
+ cb.schemaObjectProduced( this, syntax.getOid(), syntax );
syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.33" );
syntax.setName( "MHS OR Address" );
syntax.setHumanReadible( true );
- syntaxes.put( syntax.getOid(), syntax );
+ cb.schemaObjectProduced( this, syntax.getOid(), syntax );
syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.34" );
syntax.setName( "Name And Optional UID" );
syntax.setHumanReadible( true );
- syntaxes.put( syntax.getOid(), syntax );
+ cb.schemaObjectProduced( this, syntax.getOid(), syntax );
syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.35" );
syntax.setName( "Name Form Description" );
syntax.setHumanReadible( true );
- syntaxes.put( syntax.getOid(), syntax );
+ cb.schemaObjectProduced( this, syntax.getOid(), syntax );
syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.36" );
syntax.setName( "Numeric String" );
syntax.setHumanReadible( true );
- syntaxes.put( syntax.getOid(), syntax );
+ cb.schemaObjectProduced( this, syntax.getOid(), syntax );
syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.37" );
syntax.setName( "Object Class Description" );
syntax.setHumanReadible( true );
- syntaxes.put( syntax.getOid(), syntax );
+ cb.schemaObjectProduced( this, syntax.getOid(), syntax );
syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.38" );
syntax.setName( "OID" );
syntax.setHumanReadible( true );
- syntaxes.put( syntax.getOid(), syntax );
+ cb.schemaObjectProduced( this, syntax.getOid(), syntax );
syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.39" );
syntax.setName( "Other Mailbox" );
syntax.setHumanReadible( true );
- syntaxes.put( syntax.getOid(), syntax );
+ cb.schemaObjectProduced( this, syntax.getOid(), syntax );
syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.40" );
syntax.setName( "Octet String" );
syntax.setHumanReadible( true );
- syntaxes.put( syntax.getOid(), syntax );
+ cb.schemaObjectProduced( this, syntax.getOid(), syntax );
/*
* Value being represented H-R OBJECT IDENTIFIER
@@ -386,52 +393,52 @@
syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.41" );
syntax.setName( "Postal Address" );
syntax.setHumanReadible( true );
- syntaxes.put( syntax.getOid(), syntax );
+ cb.schemaObjectProduced( this, syntax.getOid(), syntax );
syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.42" );
syntax.setName( "Protocol Information" );
syntax.setHumanReadible( true );
- syntaxes.put( syntax.getOid(), syntax );
+ cb.schemaObjectProduced( this, syntax.getOid(), syntax );
syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.43" );
syntax.setName( "Presentation Address" );
syntax.setHumanReadible( true );
- syntaxes.put( syntax.getOid(), syntax );
+ cb.schemaObjectProduced( this, syntax.getOid(), syntax );
syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.44" );
syntax.setName( "Printable String" );
syntax.setHumanReadible( true );
- syntaxes.put( syntax.getOid(), syntax );
+ cb.schemaObjectProduced( this, syntax.getOid(), syntax );
syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.45" );
syntax.setName( "Subtree Specification" );
syntax.setHumanReadible( true );
- syntaxes.put( syntax.getOid(), syntax );
+ cb.schemaObjectProduced( this, syntax.getOid(), syntax );
syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.46" );
syntax.setName( "Supplier Information" );
syntax.setHumanReadible( true );
- syntaxes.put( syntax.getOid(), syntax );
+ cb.schemaObjectProduced( this, syntax.getOid(), syntax );
syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.47" );
syntax.setName( "Supplier Or Consumer" );
syntax.setHumanReadible( true );
- syntaxes.put( syntax.getOid(), syntax );
+ cb.schemaObjectProduced( this, syntax.getOid(), syntax );
syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.48" );
syntax.setName( "Supplier And Consumer" );
syntax.setHumanReadible( true );
- syntaxes.put( syntax.getOid(), syntax );
+ cb.schemaObjectProduced( this, syntax.getOid(), syntax );
syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.49" );
syntax.setName( "Supported Algorithm" );
syntax.setHumanReadible( false );
- syntaxes.put( syntax.getOid(), syntax );
+ cb.schemaObjectProduced( this, syntax.getOid(), syntax );
syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.50" );
syntax.setName( "Telephone Number" );
syntax.setHumanReadible( true );
- syntaxes.put( syntax.getOid(), syntax );
+ cb.schemaObjectProduced( this, syntax.getOid(), syntax );
/*
* Value being represented H-R OBJECT IDENTIFIER
@@ -448,44 +455,42 @@
syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.51" );
syntax.setName( "Teletex Terminal Identifier" );
syntax.setHumanReadible( true );
- syntaxes.put( syntax.getOid(), syntax );
+ cb.schemaObjectProduced( this, syntax.getOid(), syntax );
syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.52" );
syntax.setName( "Telex Number" );
syntax.setHumanReadible( true );
- syntaxes.put( syntax.getOid(), syntax );
+ cb.schemaObjectProduced( this, syntax.getOid(), syntax );
syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.53" );
syntax.setName( "UTC Time" );
syntax.setHumanReadible( true );
- syntaxes.put( syntax.getOid(), syntax );
+ cb.schemaObjectProduced( this, syntax.getOid(), syntax );
syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.54" );
syntax.setName( "LDAP Syntax Description" );
syntax.setHumanReadible( true );
- syntaxes.put( syntax.getOid(), syntax );
+ cb.schemaObjectProduced( this, syntax.getOid(), syntax );
syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.55" );
syntax.setName( "Modify Rights" );
syntax.setHumanReadible( true );
- syntaxes.put( syntax.getOid(), syntax );
+ cb.schemaObjectProduced( this, syntax.getOid(), syntax );
syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.56" );
syntax.setName( "LDAP BootstrapSchema Definition" );
syntax.setHumanReadible( true );
- syntaxes.put( syntax.getOid(), syntax );
+ cb.schemaObjectProduced( this, syntax.getOid(), syntax );
syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.57" );
syntax.setName( "LDAP BootstrapSchema Description" );
syntax.setHumanReadible( true );
- syntaxes.put( syntax.getOid(), syntax );
+ cb.schemaObjectProduced( this, syntax.getOid(), syntax );
syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.58" );
syntax.setName( "Substring Assertion" );
syntax.setHumanReadible( true );
- syntaxes.put( syntax.getOid(), syntax );
-
- return syntaxes;
+ cb.schemaObjectProduced( this, syntax.getOid(), syntax );
}
Added:
incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/bootstrap/ProducerCallback.java
==============================================================================
--- (empty file)
+++
incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/bootstrap/ProducerCallback.java
Fri Oct 15 15:11:06 2004
@@ -0,0 +1,43 @@
+/*
+ * 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.bootstrap;
+
+
+import javax.naming.NamingException;
+
+
+/**
+ * A BootstrapProducer's callback used to announce object creation.
+ *
+ * @author <a href="mailto:[EMAIL PROTECTED]">Apache Directory Project</a>
+ * @version $Rev$
+ */
+public interface ProducerCallback
+{
+ /**
+ * Called to announce the creation of a new schema object by a producer.
+ *
+ * @param producer the producer which created the object
+ * @param registryKey used to uniquely identify the object in registries
+ * @param schemaObject the object that was created by the producer
+ * @throws NamingException if there are problems registering these objects
+ * with bootstrap registries
+ */
+ void schemaObjectProduced( BootstrapProducer producer,
+ String registryKey, Object schemaObject )
+ throws NamingException;
+}
Added:
incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/bootstrap/ProducerTypeEnum.java
==============================================================================
--- (empty file)
+++
incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/bootstrap/ProducerTypeEnum.java
Fri Oct 15 15:11:06 2004
@@ -0,0 +1,207 @@
+/*
+ * 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.bootstrap;
+
+
+import java.util.Map;
+import java.util.List;
+
+import org.apache.ldap.common.util.EnumUtils;
+import org.apache.ldap.common.util.ValuedEnum;
+
+
+/**
+ * Type safe enum for an BootstrapProducer tyoes. This can be take one of the
+ * following values:
+ * <ul>
+ * <li>NormalizerProducer</li>
+ * <li>ComparatorProducer</li>
+ * <li>SyntaxCheckerProducer</li>
+ * <li>SyntaxProducer</li>
+ * <li>MatchingRuleProducer</li>
+ * <li>AttributeTypeProducer</li>
+ * <li>ObjectClassProducer</li>
+ * <li>MatchingRuleUseProducer</li>
+ * <li>DitContentRuleProducer</li>
+ * <li>NameFormProducer</li>
+ * <li>DitStructureRuleProducer</li>
+ * </ul>
+ *
+ * @author <a href="mailto:[EMAIL PROTECTED]">Apache Directory Project</a>
+ * @version $Rev$
+ */
+public class ProducerTypeEnum extends ValuedEnum
+{
+ private static final String[] producers = {
+ "NormalizerProducer", "ComparatorProducer", "SyntaxCheckerProducer",
+ "SyntaxProducer", "MatchingRuleProducer", "AttributeTypeProducer",
+ "ObjectClassProducer", "MatchingRuleUseProducer",
"DitContentRuleProducer",
+ "NameFormProducer", "DitStructureRuleProducer"
+ };
+
+ /** value for Normalizer BootstrapProducers */
+ public static final int NORMALIZER_PRODUCER_VAL = 0;
+ /** value for Comparator BootstrapProducers */
+ public static final int COMPARATOR_PRODUCER_VAL = 1;
+ /** value for SyntaxChecker BootstrapProducers */
+ public static final int SYNTAX_CHECKER_PRODUCER_VAL = 2;
+ /** value for Syntax BootstrapProducers */
+ public static final int SYNTAX_PRODUCER_VAL = 3;
+ /** value for MatchingRule BootstrapProducers */
+ public static final int MATCHING_RULE_PRODUCER_VAL = 4;
+ /** value for AttributeType BootstrapProducers */
+ public static final int ATTRIBUTE_TYPE_PRODUCER_VAL = 5;
+ /** value for ObjectClass BootstrapProducers */
+ public static final int OBJECT_CLASS_PRODUCER_VAL = 6;
+ /** value for MatchingRuleUse BootstrapProducers */
+ public static final int MATCHING_RULE_USE_PRODUCER_VAL = 7;
+ /** value for DitContentRule BootstrapProducers */
+ public static final int DIT_CONTENT_RULE_PRODUCER_VAL = 8;
+ /** value for NameForm BootstrapProducers */
+ public static final int NAME_FORM_PRODUCER_VAL = 9;
+ /** value for DitStructureRule BootstrapProducers */
+ public static final int DIT_STRUCTURE_RULE_PRODUCER_VAL = 10;
+
+
+ /** enum for BootstrapProducers of Normalizer schema objects */
+ public static final ProducerTypeEnum NORMALIZER_PRODUCER =
+ new ProducerTypeEnum( producers[0], NORMALIZER_PRODUCER_VAL );
+ /** enum for BootstrapProducers of Comparator schema objects */
+ public static final ProducerTypeEnum COMPARATOR_PRODUCER =
+ new ProducerTypeEnum( producers[1], COMPARATOR_PRODUCER_VAL );
+ /** enum for BootstrapProducers of SyntaxChecker schema objects */
+ public static final ProducerTypeEnum SYNTAX_CHECKER_PRODUCER =
+ new ProducerTypeEnum( producers[2], SYNTAX_CHECKER_PRODUCER_VAL );
+ /** enum for BootstrapProducers of Syntax schema objects */
+ public static final ProducerTypeEnum SYNTAX_PRODUCER =
+ new ProducerTypeEnum( producers[3], SYNTAX_PRODUCER_VAL );
+ /** enum for BootstrapProducers of MatchingRule schema objects */
+ public static final ProducerTypeEnum MATCHING_RULE_PRODUCER =
+ new ProducerTypeEnum( producers[4], MATCHING_RULE_PRODUCER_VAL );
+ /** enum for BootstrapProducers of AttributeType schema objects */
+ public static final ProducerTypeEnum ATTRIBUTE_TYPE_PRODUCER =
+ new ProducerTypeEnum( producers[5], ATTRIBUTE_TYPE_PRODUCER_VAL );
+ /** enum for BootstrapProducers of ObjectClass schema objects */
+ public static final ProducerTypeEnum OBJECT_CLASS_PRODUCER =
+ new ProducerTypeEnum( producers[6], OBJECT_CLASS_PRODUCER_VAL );
+ /** enum for BootstrapProducers of MatchingRule schema objects */
+ public static final ProducerTypeEnum MATCHING_RULE_USE_PRODUCER =
+ new ProducerTypeEnum( producers[7], MATCHING_RULE_USE_PRODUCER_VAL );
+ /** enum for BootstrapProducers of DitContentRule schema objects */
+ public static final ProducerTypeEnum DIT_CONTENT_RULE_PRODUCER =
+ new ProducerTypeEnum( producers[8], DIT_CONTENT_RULE_PRODUCER_VAL );
+ /** enum for BootstrapProducers of NameForm schema objects */
+ public static final ProducerTypeEnum NAME_FORM_PRODUCER =
+ new ProducerTypeEnum( producers[9], NAME_FORM_PRODUCER_VAL );
+ /** enum for BootstrapProducers of DitStructureRule schema objects */
+ public static final ProducerTypeEnum DIT_STRUCTURE_RULE_PRODUCER =
+ new ProducerTypeEnum( producers[10], DIT_STRUCTURE_RULE_PRODUCER_VAL );
+
+
+ /**
+ * Private construct so no other instances can be created other than the
+ * public static constants in this class.
+ *
+ * @param name a string name for the enumeration value.
+ * @param value the integer value of the enumeration.
+ */
+ private ProducerTypeEnum( final String name, final int value )
+ {
+ super( name, value );
+ }
+
+
+ /**
+ * Gets the enumeration type for the attributeType producerType string
regardless
+ * of case.
+ *
+ * @param producerType the producerType string
+ * @return the producerType enumeration type
+ */
+ public static ProducerTypeEnum getProducerType( String producerType )
+ {
+ if ( producerType.equalsIgnoreCase(
ProducerTypeEnum.NORMALIZER_PRODUCER.getName() ) )
+ {
+ return ProducerTypeEnum.NORMALIZER_PRODUCER;
+ }
+ if ( producerType.equalsIgnoreCase(
ProducerTypeEnum.COMPARATOR_PRODUCER.getName() ) )
+ {
+ return ProducerTypeEnum.COMPARATOR_PRODUCER;
+ }
+ if ( producerType.equalsIgnoreCase(
ProducerTypeEnum.SYNTAX_CHECKER_PRODUCER.getName() ) )
+ {
+ return ProducerTypeEnum.SYNTAX_CHECKER_PRODUCER;
+ }
+ if ( producerType.equalsIgnoreCase(
ProducerTypeEnum.SYNTAX_PRODUCER.getName() ) )
+ {
+ return ProducerTypeEnum.SYNTAX_PRODUCER;
+ }
+ if ( producerType.equalsIgnoreCase(
ProducerTypeEnum.MATCHING_RULE_PRODUCER.getName() ) )
+ {
+ return ProducerTypeEnum.MATCHING_RULE_PRODUCER;
+ }
+ if ( producerType.equalsIgnoreCase(
ProducerTypeEnum.ATTRIBUTE_TYPE_PRODUCER.getName() ) )
+ {
+ return ProducerTypeEnum.ATTRIBUTE_TYPE_PRODUCER;
+ }
+ if ( producerType.equalsIgnoreCase(
ProducerTypeEnum.OBJECT_CLASS_PRODUCER.getName() ) )
+ {
+ return ProducerTypeEnum.OBJECT_CLASS_PRODUCER;
+ }
+ if ( producerType.equalsIgnoreCase(
ProducerTypeEnum.MATCHING_RULE_USE_PRODUCER.getName() ) )
+ {
+ return ProducerTypeEnum.MATCHING_RULE_USE_PRODUCER;
+ }
+ if ( producerType.equalsIgnoreCase(
ProducerTypeEnum.DIT_CONTENT_RULE_PRODUCER.getName() ) )
+ {
+ return ProducerTypeEnum.DIT_CONTENT_RULE_PRODUCER;
+ }
+ if ( producerType.equalsIgnoreCase(
ProducerTypeEnum.NAME_FORM_PRODUCER.getName() ) )
+ {
+ return ProducerTypeEnum.NAME_FORM_PRODUCER;
+ }
+ if ( producerType.equalsIgnoreCase(
ProducerTypeEnum.DIT_STRUCTURE_RULE_PRODUCER.getName() ) )
+ {
+ return ProducerTypeEnum.DIT_STRUCTURE_RULE_PRODUCER;
+ }
+
+ throw new IllegalArgumentException( "Unknown ProducerTypeEnum string"
+ + producerType );
+ }
+
+
+ /**
+ * Gets a List of the enumerations.
+ *
+ * @return the List of enumerations in creation order for ProducerTypes
+ */
+ public static List list()
+ {
+ return EnumUtils.getEnumList( ProducerTypeEnum.class );
+ }
+
+
+ /**
+ * Gets the Map of ProducerTypeEnum objects by name.
+ *
+ * @return the Map by name of ProducerTypeEnum
+ */
+ public static Map map()
+ {
+ return EnumUtils.getEnumMap( ProducerTypeEnum.class );
+ }
+}