You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by nh...@apache.org on 2006/11/10 05:49:23 UTC
svn commit: r473187 - in /directory/branches/apacheds-schema:
apacheds/core/src/main/java/org/apache/directory/server/core/
apacheds/core/src/main/java/org/apache/directory/server/core/configuration/
apacheds/core/src/main/java/org/apache/directory/ser...
Author: nhope
Date: Thu Nov 9 20:49:21 2006
New Revision: 473187
URL: http://svn.apache.org/viewvc?view=rev&rev=473187
Log:
* second patch from http://issues.apache.org/jira/browse/DIRSERVER-760 , update to coding standards and use some JDK1.5 language features
* svn cp'd .schema files from core schema to numeric prefixed names in apacheds/server-main/conf (temporary measure until have feedback and add proper maven support)
Added:
directory/branches/apacheds-schema/apacheds/server-main/apacheds.bat
directory/branches/apacheds-schema/apacheds/server-main/conf/
directory/branches/apacheds-schema/apacheds/server-main/conf/00_system.schema
- copied unchanged from r473176, directory/branches/apacheds-schema/apacheds/core/src/main/schema/system.schema
directory/branches/apacheds-schema/apacheds/server-main/conf/01_apache.schema
- copied unchanged from r473176, directory/branches/apacheds-schema/apacheds/core/src/main/schema/apache.schema
directory/branches/apacheds-schema/apacheds/server-main/conf/01_core.schema
- copied unchanged from r473176, directory/branches/apacheds-schema/apacheds/core/src/main/schema/core.schema
directory/branches/apacheds-schema/apacheds/server-main/conf/02_apachedns.schema
- copied unchanged from r473176, directory/branches/apacheds-schema/apacheds/core/src/main/schema/apachedns.schema
directory/branches/apacheds-schema/apacheds/server-main/conf/02_collective.schema
- copied unchanged from r473176, directory/branches/apacheds-schema/apacheds/core/src/main/schema/collective.schema
directory/branches/apacheds-schema/apacheds/server-main/conf/02_corba.schema
- copied unchanged from r473176, directory/branches/apacheds-schema/apacheds/core/src/main/schema/corba.schema
directory/branches/apacheds-schema/apacheds/server-main/conf/02_cosine.schema
- copied unchanged from r473176, directory/branches/apacheds-schema/apacheds/core/src/main/schema/cosine.schema
directory/branches/apacheds-schema/apacheds/server-main/conf/02_dhcp.schema
- copied unchanged from r473176, directory/branches/apacheds-schema/apacheds/core/src/main/schema/dhcp.schema
directory/branches/apacheds-schema/apacheds/server-main/conf/02_java.schema
- copied unchanged from r473176, directory/branches/apacheds-schema/apacheds/core/src/main/schema/java.schema
directory/branches/apacheds-schema/apacheds/server-main/conf/02_krb5kdc.schema
- copied unchanged from r473176, directory/branches/apacheds-schema/apacheds/core/src/main/schema/krb5kdc.schema
directory/branches/apacheds-schema/apacheds/server-main/conf/03_autofs.schema
- copied unchanged from r473176, directory/branches/apacheds-schema/apacheds/core/src/main/schema/autofs.schema
directory/branches/apacheds-schema/apacheds/server-main/conf/03_inetorgperson.schema
- copied unchanged from r473176, directory/branches/apacheds-schema/apacheds/core/src/main/schema/inetorgperson.schema
directory/branches/apacheds-schema/apacheds/server-main/conf/03_nis.schema
- copied unchanged from r473176, directory/branches/apacheds-schema/apacheds/core/src/main/schema/nis.schema
directory/branches/apacheds-schema/apacheds/server-main/conf/04_mozilla.schema
- copied unchanged from r473176, directory/branches/apacheds-schema/apacheds/core/src/main/schema/mozilla.schema
directory/branches/apacheds-schema/apacheds/server-main/conf/04_samba.schema
- copied unchanged from r473176, directory/branches/apacheds-schema/apacheds/core/src/main/schema/samba.schema
Modified:
directory/branches/apacheds-schema/apacheds/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
directory/branches/apacheds-schema/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/SchemaLoader.java
directory/branches/apacheds-schema/apacheds/core/src/main/java/org/apache/directory/server/core/schema/FileSystemSchemaLoader.java
directory/branches/apacheds-schema/apacheds/core/src/main/java/org/apache/directory/server/core/schema/RegistrySchemaProducer.java
directory/branches/apacheds-schema/apacheds/core/src/main/java/org/apache/directory/server/core/schema/SchemaProducer.java
directory/branches/apacheds-schema/apacheds/server-installers/src/main/installers/server.xml
directory/branches/apacheds-schema/apacheds/server-main/log4j.properties
directory/branches/apacheds-schema/apacheds/server-main/server.xml
directory/branches/apacheds-schema/apacheds/server-main/src/main/java/org/apache/directory/server/UberjarMain.java
directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/util/DNUtils.java
Modified: directory/branches/apacheds-schema/apacheds/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds-schema/apacheds/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java?view=diff&rev=473187&r1=473186&r2=473187
==============================================================================
--- directory/branches/apacheds-schema/apacheds/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java (original)
+++ directory/branches/apacheds-schema/apacheds/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java Thu Nov 9 20:49:21 2006
@@ -1,6 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.directory.server.core;
-import org.apache.directory.server.core.DefaultDirectoryService;
import org.apache.directory.server.core.authz.AuthorizationService;
import org.apache.directory.server.core.jndi.DeadContext;
import org.apache.directory.server.core.jndi.PropertyKeys;
@@ -718,12 +736,12 @@
// loader.load( startupConfiguration.getBootstrapSchemas(), bootstrapRegistries );
if (startupConfiguration.getSchemaLoaders() != null)
{
- for (Iterator it = startupConfiguration.getSchemaLoaders().iterator(); it.hasNext();)
+ for ( SchemaLoader schemaLoader1 : startupConfiguration.getSchemaLoaders() )
{
- final SchemaLoader schemaLoader;
+ SchemaLoader schemaLoader;
- schemaLoader = (SchemaLoader) it.next();
- schemaLoader.loadSchemas(startupConfiguration, bootstrapRegistries);
+ schemaLoader = schemaLoader1;
+ schemaLoader.loadSchemas( startupConfiguration, bootstrapRegistries );
}
}
Modified: directory/branches/apacheds-schema/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/SchemaLoader.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds-schema/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/SchemaLoader.java?view=diff&rev=473187&r1=473186&r2=473187
==============================================================================
--- directory/branches/apacheds-schema/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/SchemaLoader.java (original)
+++ directory/branches/apacheds-schema/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/SchemaLoader.java Thu Nov 9 20:49:21 2006
@@ -1,20 +1,40 @@
-package org.apache.directory.server.core.configuration;
-
-import org.apache.directory.server.core.schema.bootstrap.BootstrapRegistries;
-import org.apache.directory.server.core.schema.Registries;
-
-import java.util.Collection;
-
-
-/**
- * Can be implemented by classes wishing to load schemas dynamically at server startup (refer to
- * {@link org.apache.directory.server.core.configuration.StartupConfiguration#getSchemaLoaders()}).
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- * @version $Rev: 437012 $, $Date: 2006-08-26 09:25:30 +1000 (Sat, 26 Aug 2006) $
- */
-public interface SchemaLoader
-{
- /** Load schemas into provided registries, and then return them. */
- public Collection loadSchemas(final StartupConfiguration startupConfiguration, final Registries registries);
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.directory.server.core.configuration;
+
+import org.apache.directory.server.core.schema.bootstrap.BootstrapRegistries;
+import org.apache.directory.server.core.schema.SchemaProducer;
+
+import java.util.Collection;
+
+/**
+ * Can be implemented by classes wishing to load schemas dynamically at server startup (refer to
+ * {@link org.apache.directory.server.core.configuration.StartupConfiguration#getSchemaLoaders()}).
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev: 437012 $, $Date: 2006-08-26 09:25:30 +1000 (Sat, 26 Aug 2006) $
+ */
+public interface SchemaLoader
+{
+ /**
+ * Load schemas into provided registries, and then return them.
+ */
+ public Collection<SchemaProducer> loadSchemas( StartupConfiguration startupConfiguration, BootstrapRegistries registries );
+}
Modified: directory/branches/apacheds-schema/apacheds/core/src/main/java/org/apache/directory/server/core/schema/FileSystemSchemaLoader.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds-schema/apacheds/core/src/main/java/org/apache/directory/server/core/schema/FileSystemSchemaLoader.java?view=diff&rev=473187&r1=473186&r2=473187
==============================================================================
--- directory/branches/apacheds-schema/apacheds/core/src/main/java/org/apache/directory/server/core/schema/FileSystemSchemaLoader.java (original)
+++ directory/branches/apacheds-schema/apacheds/core/src/main/java/org/apache/directory/server/core/schema/FileSystemSchemaLoader.java Thu Nov 9 20:49:21 2006
@@ -80,18 +80,18 @@
return directoryName;
}
- public Collection<File> loadSchemas( final StartupConfiguration startupConfiguration, final BootstrapRegistries registries)
+ public Collection<SchemaProducer> loadSchemas( final StartupConfiguration startupConfiguration, final BootstrapRegistries registries)
{
if ( directoryName == null )
{
return null;
}
- File schemaDir = new File( directoryName );;
- File[] schemaFiles;
- List<File> files;
- Collection<File> schemas;
- final Pattern pattern;
+ File schemaDir = new File( directoryName );
+ File[] schemaFiles;
+ List<File> files;
+ Collection<SchemaProducer> schemas;
+ final Pattern pattern;
if ( !schemaDir.isDirectory() )
{
@@ -140,7 +140,7 @@
log.info("about to read {} schema files", files.size() );
}
- schemas = new ArrayList<File>( files.size() );
+ schemas = new ArrayList<SchemaProducer>( files.size() );
for ( File schemaFile:files )
{
@@ -169,7 +169,7 @@
log.info( "read schema from '{}'", schemaFile );
}
- schemas.add( schemaFile );
+ schemas.add( schema );
}
catch (Exception e)
{
Modified: directory/branches/apacheds-schema/apacheds/core/src/main/java/org/apache/directory/server/core/schema/RegistrySchemaProducer.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds-schema/apacheds/core/src/main/java/org/apache/directory/server/core/schema/RegistrySchemaProducer.java?view=diff&rev=473187&r1=473186&r2=473187
==============================================================================
--- directory/branches/apacheds-schema/apacheds/core/src/main/java/org/apache/directory/server/core/schema/RegistrySchemaProducer.java (original)
+++ directory/branches/apacheds-schema/apacheds/core/src/main/java/org/apache/directory/server/core/schema/RegistrySchemaProducer.java Thu Nov 9 20:49:21 2006
@@ -1,456 +1,479 @@
-package org.apache.directory.server.core.schema;
-
-import org.apache.directory.shared.ldap.schema.*;
-
-import javax.naming.NamingException;
-import java.util.Comparator;
-
-/**
- * An abstract producer implementation which doesn't make explicit reference
- * to "bootstrap".
- * todo: Based on org.apache.ldap.server.schema.bootstrap.AbstractBootstrapProducer
- * rev 226451 which should be recoded to use this more generic class.
- */
-public abstract class RegistrySchemaProducer
-{
- /** a reused empty String array */
- protected static final String[] EMPTY = new String[0];
-
- protected RegistrySchemaProducer()
- {
- }
-
- protected static RegistrySchemaProducer.ConceteSchemaSyntax
- newSyntax( String oid, Registries registries )
- {
- return new RegistrySchemaProducer.ConceteSchemaSyntax( oid, registries.getSyntaxCheckerRegistry() );
- }
-
- protected static RegistrySchemaProducer.ConcreteSchemaAttributeType
- newAttributeType( String oid, Registries registries )
- {
- return new RegistrySchemaProducer.ConcreteSchemaAttributeType( oid, registries );
- }
-
- protected static RegistrySchemaProducer.ConcreteSchemaObjectClass
- newObjectClass( String oid, Registries registries )
- {
- return new RegistrySchemaProducer.ConcreteSchemaObjectClass( oid, registries );
- }
-
- protected static RegistrySchemaProducer.ConcreteSchemaMatchingRule
- newMatchingRule( String oid, Registries registries )
- {
- return new RegistrySchemaProducer.ConcreteSchemaMatchingRule( oid, registries );
- }
-
-
- /**
- * A mutable Syntax for the bootstrap phase that uses the
- * syntaxCheckerRegistry to dynamically resolve syntax checkers.
- */
- public static class ConceteSchemaSyntax extends AbstractSyntax
- {
- final SyntaxCheckerRegistry registry;
-
-
- protected ConceteSchemaSyntax( String oid, SyntaxCheckerRegistry registry )
- {
- super( oid );
- this.registry = registry;
- }
-
-
- public void setDescription( String description )
- {
- super.setDescription( description );
- }
-
-
- public void setHumanReadible( boolean isHumanReadible )
- {
- super.setHumanReadible( isHumanReadible );
- }
-
-
- public void setNames( String[] names )
- {
- super.setNames( names );
- }
-
-
- public SyntaxChecker getSyntaxChecker( ) throws NamingException
- {
- return registry.lookup( getOid() );
- }
-
-
- public boolean isObsolete()
- {
- return false;
- }
- }
-
-
- public static class ConcreteSchemaMatchingRule extends AbstractMatchingRule
- {
- final SyntaxRegistry syntaxRegistry;
- final NormalizerRegistry normalizerRegistry;
- final ComparatorRegistry comparatorRegistry;
- String syntaxOid;
-
-
- protected ConcreteSchemaMatchingRule( String oid, Registries registries )
- {
- super( oid );
- this.syntaxRegistry = registries.getSyntaxRegistry();
- this.normalizerRegistry = registries.getNormalizerRegistry();
- this.comparatorRegistry = registries.getComparatorRegistry();
- }
-
-
- public void setNames( String[] names )
- {
- super.setNames( names );
- }
-
- public void setSyntaxOid( String syntaxOid )
- {
- this.syntaxOid = syntaxOid;
- }
-
- public void setDescription( String description )
- {
- super.setDescription( description );
- }
-
- public void setObsolete( boolean isObsolete )
- {
- super.setObsolete( isObsolete );
- }
-
-
- // accessors
-
-
- public Syntax getSyntax() throws NamingException
- {
- return syntaxRegistry.lookup( syntaxOid );
- }
-
- public Comparator getComparator() throws NamingException
- {
- return comparatorRegistry.lookup( getOid() );
- }
-
- public Normalizer getNormalizer() throws NamingException
- {
- return normalizerRegistry.lookup( getOid() );
- }
- }
-
-
- /**
- * A concrete mutable attributeType implementation for bootstrapping which
- * uses registries for dynamically resolving dependent objects.
- */
- public static class ConcreteSchemaAttributeType extends AbstractAttributeType
- {
- private static final long serialVersionUID = 4050205236738471984L;
-
- private final SyntaxRegistry syntaxRegistry;
- private final MatchingRuleRegistry matchingRuleRegistry;
- private final AttributeTypeRegistry attributeTypeRegistry;
- private String superiorId;
- private String equalityId;
- private String substrId;
- private String orderingId;
- private String syntaxId;
-
-
- protected ConcreteSchemaAttributeType( String oid, Registries registries )
- {
- super( oid );
-
- syntaxRegistry = registries.getSyntaxRegistry();
- matchingRuleRegistry = registries.getMatchingRuleRegistry();
- attributeTypeRegistry = registries.getAttributeTypeRegistry();
- }
-
- public void setSuperiorId( String superiorId )
- {
- this.superiorId = superiorId;
- }
-
- public AttributeType getSuperior() throws NamingException
- {
- if ( superiorId == null )
- {
- return null;
- }
-
- return this.attributeTypeRegistry.lookup( superiorId );
- }
-
- public void setNames( String[] names )
- {
- super.setNames( names );
- }
-
- public MatchingRule getEquality() throws NamingException
- {
- if ( equalityId != null )
- {
- return this.matchingRuleRegistry.lookup( equalityId );
- }
-
- if ( superiorId != null )
- {
- return getSuperior().getEquality();
- }
-
- return null;
- }
-
- public void setEqualityId( String equalityId )
- {
- this.equalityId = equalityId;
- }
-
- public MatchingRule getSubstr() throws NamingException
- {
- if ( substrId != null )
- {
- return this.matchingRuleRegistry.lookup( substrId );
- }
-
- if ( superiorId != null )
- {
- return getSuperior().getSubstr();
- }
-
- return null;
- }
-
- public void setSubstrId( String substrId )
- {
- this.substrId = substrId;
- }
-
- public MatchingRule getOrdering() throws NamingException
- {
- if ( orderingId != null )
- {
- return this.matchingRuleRegistry.lookup( orderingId );
- }
-
- if ( superiorId != null )
- {
- return getSuperior().getOrdering();
- }
-
- return null;
- }
-
- public void setOrderingId( String orderingId )
- {
- this.orderingId = orderingId;
- }
-
- public void setSyntaxId( String syntaxId )
- {
- this.syntaxId = syntaxId;
- }
-
- public Syntax getSyntax() throws NamingException
- {
- if ( syntaxId != null )
- {
- return this.syntaxRegistry.lookup( syntaxId );
- }
-
- if ( superiorId != null )
- {
- return getSuperior().getSyntax();
- }
-
- return null;
- }
-
- public void setSingleValue( boolean singleValue )
- {
- super.setSingleValue( singleValue );
- }
-
- public void setCollective( boolean collective )
- {
- super.setCollective( collective );
- }
-
- public void setCanUserModify( boolean canUserModify )
- {
- super.setCanUserModify( canUserModify );
- }
-
- public void setObsolete( boolean obsolete )
- {
- super.setObsolete( obsolete );
- }
-
- public void setDescription( String description )
- {
- super.setDescription( description );
- }
-
- public void setUsage( UsageEnum usage )
- {
- super.setUsage( usage );
- }
-
- public void setLength( int length )
- {
- super.setLength( length );
- }
- }
-
-
- /**
- * A concrete mutable objectClass implementation for bootstrapping which
- * uses registries for dynamically resolving dependent objects.
- */
- public static class ConcreteSchemaObjectClass extends AbstractSchemaObject
- implements ObjectClass
- {
- private final ObjectClassRegistry objectClassRegistry;
- private final AttributeTypeRegistry attributeTypeRegistry;
-
- private String[] superClassIds = RegistrySchemaProducer.EMPTY;
- private ObjectClass[] superClasses;
- private ObjectClassTypeEnum type = ObjectClassTypeEnum.STRUCTURAL;
-
- private String[] mayListIds = RegistrySchemaProducer.EMPTY;
- private AttributeType[] mayList;
-
- private String[] mustListIds = RegistrySchemaProducer.EMPTY;
- private AttributeType[] mustList;
-
-
- /**
- * Creates a mutable ObjectClass for the bootstrap process.
- *
- * @param oid the OID of the new objectClass
- * @param registries the bootstrap registries to use for resolving dependent objects
- */
- protected ConcreteSchemaObjectClass( String oid, Registries registries )
- {
- super( oid );
-
- objectClassRegistry = registries.getObjectClassRegistry();
- attributeTypeRegistry = registries.getAttributeTypeRegistry();
- }
-
-
- // --------------------------------------------------------------------
- // ObjectClass Accessors
- // --------------------------------------------------------------------
-
-
- public ObjectClass[] getSuperClasses() throws NamingException
- {
- if ( superClasses == null )
- {
- superClasses = new ObjectClass[superClassIds.length];
- }
-
- for( int ii = 0; ii < superClassIds.length; ii++ )
- {
- superClasses[ii] = objectClassRegistry.lookup( superClassIds[ii] );
- }
-
- return superClasses;
- }
-
-
- public void setSuperClassIds( String[] superClassIds )
- {
- this.superClassIds = superClassIds;
- }
-
-
- public ObjectClassTypeEnum getType()
- {
- return type;
- }
-
-
- public void setType( ObjectClassTypeEnum type )
- {
- this.type = type;
- }
-
-
- public AttributeType[] getMustList() throws NamingException
- {
- if ( mustList == null )
- {
- mustList = new AttributeType[mustListIds.length];
- }
-
- for( int ii = 0; ii < mustListIds.length; ii++ )
- {
- mustList[ii] = attributeTypeRegistry.lookup( mustListIds[ii] );
- }
-
- return mustList;
- }
-
-
- public void setMustListIds( String[] mustListIds )
- {
- this.mustListIds = mustListIds;
- }
-
-
- public AttributeType[] getMayList() throws NamingException
- {
- if ( mayList == null )
- {
- mayList = new AttributeType[mayListIds.length];
- }
-
- for( int ii = 0; ii < mayListIds.length; ii++ )
- {
- mayList[ii] = attributeTypeRegistry.lookup( mayListIds[ii] );
- }
-
- return mayList;
- }
-
-
- public void setMayListIds( String[] mayListIds )
- {
- this.mayListIds = mayListIds;
- }
-
-
- // --------------------------------------------------------------------
- // SchemaObject Mutators
- // --------------------------------------------------------------------
-
-
- public void setObsolete( boolean obsolete )
- {
- super.setObsolete( obsolete );
- }
-
- public void setNames( String[] names )
- {
- super.setNames( names );
- }
-
- public void setDescription( String description )
- {
- super.setDescription( description );
- }
- }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.directory.server.core.schema;
+
+import org.apache.directory.shared.ldap.schema.*;
+
+import javax.naming.NamingException;
+import java.util.Comparator;
+
+/**
+ * An abstract producer implementation which doesn't make explicit reference
+ * to "bootstrap".
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev: 437012 $, $Date: 2006-08-26 09:25:30 +1000 (Sat, 26 Aug 2006) $
+ */
+public abstract class RegistrySchemaProducer
+{
+ // todo: Based on org.apache.ldap.server.schema.bootstrap.AbstractBootstrapProducer
+ // rev 226451 which should be recoded to use this more generic class.
+
+ /** a reused empty String array */
+ protected static final String[] EMPTY = new String[0];
+
+ protected RegistrySchemaProducer()
+ {
+ }
+
+ protected static RegistrySchemaProducer.ConceteSchemaSyntax
+ newSyntax( String oid, Registries registries )
+ {
+ return new RegistrySchemaProducer.ConceteSchemaSyntax( oid, registries.getSyntaxCheckerRegistry() );
+ }
+
+ protected static RegistrySchemaProducer.ConcreteSchemaAttributeType
+ newAttributeType( String oid, Registries registries )
+ {
+ return new RegistrySchemaProducer.ConcreteSchemaAttributeType( oid, registries );
+ }
+
+ protected static RegistrySchemaProducer.ConcreteSchemaObjectClass
+ newObjectClass( String oid, Registries registries )
+ {
+ return new RegistrySchemaProducer.ConcreteSchemaObjectClass( oid, registries );
+ }
+
+ protected static RegistrySchemaProducer.ConcreteSchemaMatchingRule
+ newMatchingRule( String oid, Registries registries )
+ {
+ return new RegistrySchemaProducer.ConcreteSchemaMatchingRule( oid, registries );
+ }
+
+
+ /**
+ * A mutable Syntax for the bootstrap phase that uses the
+ * syntaxCheckerRegistry to dynamically resolve syntax checkers.
+ */
+ public static class ConceteSchemaSyntax extends AbstractSyntax
+ {
+ final SyntaxCheckerRegistry registry;
+
+
+ protected ConceteSchemaSyntax( String oid, SyntaxCheckerRegistry registry )
+ {
+ super( oid );
+ this.registry = registry;
+ }
+
+
+ public void setDescription( String description )
+ {
+ super.setDescription( description );
+ }
+
+
+ public void setHumanReadible( boolean isHumanReadible )
+ {
+ super.setHumanReadible( isHumanReadible );
+ }
+
+
+ public void setNames( String[] names )
+ {
+ super.setNames( names );
+ }
+
+
+ public SyntaxChecker getSyntaxChecker( ) throws NamingException
+ {
+ return registry.lookup( getOid() );
+ }
+
+
+ public boolean isObsolete()
+ {
+ return false;
+ }
+ }
+
+
+ public static class ConcreteSchemaMatchingRule extends AbstractMatchingRule
+ {
+ final SyntaxRegistry syntaxRegistry;
+ final NormalizerRegistry normalizerRegistry;
+ final ComparatorRegistry comparatorRegistry;
+ String syntaxOid;
+
+
+ protected ConcreteSchemaMatchingRule( String oid, Registries registries )
+ {
+ super( oid );
+ this.syntaxRegistry = registries.getSyntaxRegistry();
+ this.normalizerRegistry = registries.getNormalizerRegistry();
+ this.comparatorRegistry = registries.getComparatorRegistry();
+ }
+
+
+ public void setNames( String[] names )
+ {
+ super.setNames( names );
+ }
+
+ public void setSyntaxOid( String syntaxOid )
+ {
+ this.syntaxOid = syntaxOid;
+ }
+
+ public void setDescription( String description )
+ {
+ super.setDescription( description );
+ }
+
+ public void setObsolete( boolean isObsolete )
+ {
+ super.setObsolete( isObsolete );
+ }
+
+
+ // accessors
+
+
+ public Syntax getSyntax() throws NamingException
+ {
+ return syntaxRegistry.lookup( syntaxOid );
+ }
+
+ public Comparator getComparator() throws NamingException
+ {
+ return comparatorRegistry.lookup( getOid() );
+ }
+
+ public Normalizer getNormalizer() throws NamingException
+ {
+ return normalizerRegistry.lookup( getOid() );
+ }
+ }
+
+
+ /**
+ * A concrete mutable attributeType implementation for bootstrapping which
+ * uses registries for dynamically resolving dependent objects.
+ */
+ public static class ConcreteSchemaAttributeType extends AbstractAttributeType
+ {
+ private static final long serialVersionUID = 4050205236738471984L;
+
+ private final SyntaxRegistry syntaxRegistry;
+ private final MatchingRuleRegistry matchingRuleRegistry;
+ private final AttributeTypeRegistry attributeTypeRegistry;
+ private String superiorId;
+ private String equalityId;
+ private String substrId;
+ private String orderingId;
+ private String syntaxId;
+
+
+ protected ConcreteSchemaAttributeType( String oid, Registries registries )
+ {
+ super( oid );
+
+ syntaxRegistry = registries.getSyntaxRegistry();
+ matchingRuleRegistry = registries.getMatchingRuleRegistry();
+ attributeTypeRegistry = registries.getAttributeTypeRegistry();
+ }
+
+ public void setSuperiorId( String superiorId )
+ {
+ this.superiorId = superiorId;
+ }
+
+ public AttributeType getSuperior() throws NamingException
+ {
+ if ( superiorId == null )
+ {
+ return null;
+ }
+
+ return this.attributeTypeRegistry.lookup( superiorId );
+ }
+
+ public void setNames( String[] names )
+ {
+ super.setNames( names );
+ }
+
+ public MatchingRule getEquality() throws NamingException
+ {
+ if ( equalityId != null )
+ {
+ return this.matchingRuleRegistry.lookup( equalityId );
+ }
+
+ if ( superiorId != null )
+ {
+ return getSuperior().getEquality();
+ }
+
+ return null;
+ }
+
+ public void setEqualityId( String equalityId )
+ {
+ this.equalityId = equalityId;
+ }
+
+ public MatchingRule getSubstr() throws NamingException
+ {
+ if ( substrId != null )
+ {
+ return this.matchingRuleRegistry.lookup( substrId );
+ }
+
+ if ( superiorId != null )
+ {
+ return getSuperior().getSubstr();
+ }
+
+ return null;
+ }
+
+ public void setSubstrId( String substrId )
+ {
+ this.substrId = substrId;
+ }
+
+ public MatchingRule getOrdering() throws NamingException
+ {
+ if ( orderingId != null )
+ {
+ return this.matchingRuleRegistry.lookup( orderingId );
+ }
+
+ if ( superiorId != null )
+ {
+ return getSuperior().getOrdering();
+ }
+
+ return null;
+ }
+
+ public void setOrderingId( String orderingId )
+ {
+ this.orderingId = orderingId;
+ }
+
+ public void setSyntaxId( String syntaxId )
+ {
+ this.syntaxId = syntaxId;
+ }
+
+ public Syntax getSyntax() throws NamingException
+ {
+ if ( syntaxId != null )
+ {
+ return this.syntaxRegistry.lookup( syntaxId );
+ }
+
+ if ( superiorId != null )
+ {
+ return getSuperior().getSyntax();
+ }
+
+ return null;
+ }
+
+ public void setSingleValue( boolean singleValue )
+ {
+ super.setSingleValue( singleValue );
+ }
+
+ public void setCollective( boolean collective )
+ {
+ super.setCollective( collective );
+ }
+
+ public void setCanUserModify( boolean canUserModify )
+ {
+ super.setCanUserModify( canUserModify );
+ }
+
+ public void setObsolete( boolean obsolete )
+ {
+ super.setObsolete( obsolete );
+ }
+
+ public void setDescription( String description )
+ {
+ super.setDescription( description );
+ }
+
+ public void setUsage( UsageEnum usage )
+ {
+ super.setUsage( usage );
+ }
+
+ public void setLength( int length )
+ {
+ super.setLength( length );
+ }
+ }
+
+
+ /**
+ * A concrete mutable objectClass implementation for bootstrapping which
+ * uses registries for dynamically resolving dependent objects.
+ */
+ public static class ConcreteSchemaObjectClass extends AbstractSchemaObject
+ implements ObjectClass
+ {
+ private final ObjectClassRegistry objectClassRegistry;
+ private final AttributeTypeRegistry attributeTypeRegistry;
+
+ private String[] superClassIds = RegistrySchemaProducer.EMPTY;
+ private ObjectClass[] superClasses;
+ private ObjectClassTypeEnum type = ObjectClassTypeEnum.STRUCTURAL;
+
+ private String[] mayListIds = RegistrySchemaProducer.EMPTY;
+ private AttributeType[] mayList;
+
+ private String[] mustListIds = RegistrySchemaProducer.EMPTY;
+ private AttributeType[] mustList;
+
+
+ /**
+ * Creates a mutable ObjectClass for the bootstrap process.
+ *
+ * @param oid the OID of the new objectClass
+ * @param registries the bootstrap registries to use for resolving dependent objects
+ */
+ protected ConcreteSchemaObjectClass( String oid, Registries registries )
+ {
+ super( oid );
+
+ objectClassRegistry = registries.getObjectClassRegistry();
+ attributeTypeRegistry = registries.getAttributeTypeRegistry();
+ }
+
+
+ // --------------------------------------------------------------------
+ // ObjectClass Accessors
+ // --------------------------------------------------------------------
+
+
+ public ObjectClass[] getSuperClasses() throws NamingException
+ {
+ if ( superClasses == null )
+ {
+ superClasses = new ObjectClass[superClassIds.length];
+ }
+
+ for( int ii = 0; ii < superClassIds.length; ii++ )
+ {
+ superClasses[ii] = objectClassRegistry.lookup( superClassIds[ii] );
+ }
+
+ return superClasses;
+ }
+
+
+ public void setSuperClassIds( String[] superClassIds )
+ {
+ this.superClassIds = superClassIds;
+ }
+
+
+ public ObjectClassTypeEnum getType()
+ {
+ return type;
+ }
+
+
+ public void setType( ObjectClassTypeEnum type )
+ {
+ this.type = type;
+ }
+
+
+ public AttributeType[] getMustList() throws NamingException
+ {
+ if ( mustList == null )
+ {
+ mustList = new AttributeType[mustListIds.length];
+ }
+
+ for( int ii = 0; ii < mustListIds.length; ii++ )
+ {
+ mustList[ii] = attributeTypeRegistry.lookup( mustListIds[ii] );
+ }
+
+ return mustList;
+ }
+
+
+ public void setMustListIds( String[] mustListIds )
+ {
+ this.mustListIds = mustListIds;
+ }
+
+
+ public AttributeType[] getMayList() throws NamingException
+ {
+ if ( mayList == null )
+ {
+ mayList = new AttributeType[mayListIds.length];
+ }
+
+ for( int ii = 0; ii < mayListIds.length; ii++ )
+ {
+ mayList[ii] = attributeTypeRegistry.lookup( mayListIds[ii] );
+ }
+
+ return mayList;
+ }
+
+
+ public void setMayListIds( String[] mayListIds )
+ {
+ this.mayListIds = mayListIds;
+ }
+
+
+ // --------------------------------------------------------------------
+ // SchemaObject Mutators
+ // --------------------------------------------------------------------
+
+
+ public void setObsolete( boolean obsolete )
+ {
+ super.setObsolete( obsolete );
+ }
+
+ public void setNames( String[] names )
+ {
+ super.setNames( names );
+ }
+
+ public void setDescription( String description )
+ {
+ super.setDescription( description );
+ }
+ }
+}
Modified: directory/branches/apacheds-schema/apacheds/core/src/main/java/org/apache/directory/server/core/schema/SchemaProducer.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds-schema/apacheds/core/src/main/java/org/apache/directory/server/core/schema/SchemaProducer.java?view=diff&rev=473187&r1=473186&r2=473187
==============================================================================
--- directory/branches/apacheds-schema/apacheds/core/src/main/java/org/apache/directory/server/core/schema/SchemaProducer.java (original)
+++ directory/branches/apacheds-schema/apacheds/core/src/main/java/org/apache/directory/server/core/schema/SchemaProducer.java Thu Nov 9 20:49:21 2006
@@ -1,473 +1,475 @@
-/*
- * 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.directory.server.core.schema;
-
-
-import org.apache.directory.shared.ldap.schema.*;
-
-import javax.naming.NamingException;
-import java.util.Comparator;
-
-/**
- * An abstract producer implementation which doesn't make explicit reference
- * to "bootstrap".
- * todo: Based on org.apache.ldap.server.schema.bootstrap.AbstractBootstrapProducer
- * rev 226451 which should be recoded to use this more generic class.
- */
-public abstract class SchemaProducer
-{
- /** a reused empty String array */
- protected static final String[] EMPTY = new String[0];
-
- protected SchemaProducer()
- {
- }
-
- protected static ConceteSchemaSyntax
- newSyntax( String oid, Registries registries )
- {
- return new ConceteSchemaSyntax( oid, registries.getSyntaxCheckerRegistry() );
- }
-
- protected static ConcreteSchemaAttributeType
- newAttributeType( String oid, Registries registries )
- {
- return new ConcreteSchemaAttributeType( oid, registries );
- }
-
- protected static ConcreteSchemaObjectClass
- newObjectClass( String oid, Registries registries )
- {
- return new ConcreteSchemaObjectClass( oid, registries );
- }
-
- protected static ConcreteSchemaMatchingRule
- newMatchingRule( String oid, Registries registries )
- {
- return new ConcreteSchemaMatchingRule( oid, registries );
- }
-
-
- /**
- * A mutable Syntax for the bootstrap phase that uses the
- * syntaxCheckerRegistry to dynamically resolve syntax checkers.
- */
- public static class ConceteSchemaSyntax extends AbstractSyntax
- {
- final SyntaxCheckerRegistry registry;
-
-
- protected ConceteSchemaSyntax( String oid, SyntaxCheckerRegistry registry )
- {
- super( oid );
- this.registry = registry;
- }
-
-
- public void setDescription( String description )
- {
- super.setDescription( description );
- }
-
-
- public void setHumanReadible( boolean isHumanReadible )
- {
- super.setHumanReadible( isHumanReadible );
- }
-
-
- public void setNames( String[] names )
- {
- super.setNames( names );
- }
-
-
- public SyntaxChecker getSyntaxChecker( ) throws NamingException
- {
- return registry.lookup( getOid() );
- }
-
-
- public boolean isObsolete()
- {
- return false;
- }
- }
-
-
- public static class ConcreteSchemaMatchingRule extends AbstractMatchingRule
- {
- final SyntaxRegistry syntaxRegistry;
- final NormalizerRegistry normalizerRegistry;
- final ComparatorRegistry comparatorRegistry;
- String syntaxOid;
-
-
- protected ConcreteSchemaMatchingRule( String oid, Registries registries )
- {
- super( oid );
- this.syntaxRegistry = registries.getSyntaxRegistry();
- this.normalizerRegistry = registries.getNormalizerRegistry();
- this.comparatorRegistry = registries.getComparatorRegistry();
- }
-
-
- public void setNames( String[] names )
- {
- super.setNames( names );
- }
-
- public void setSyntaxOid( String syntaxOid )
- {
- this.syntaxOid = syntaxOid;
- }
-
- public void setDescription( String description )
- {
- super.setDescription( description );
- }
-
- public void setObsolete( boolean isObsolete )
- {
- super.setObsolete( isObsolete );
- }
-
-
- // accessors
-
-
- public Syntax getSyntax() throws NamingException
- {
- return syntaxRegistry.lookup( syntaxOid );
- }
-
- public Comparator getComparator() throws NamingException
- {
- return comparatorRegistry.lookup( getOid() );
- }
-
- public Normalizer getNormalizer() throws NamingException
- {
- return normalizerRegistry.lookup( getOid() );
- }
- }
-
-
- /**
- * A concrete mutable attributeType implementation for bootstrapping which
- * uses registries for dynamically resolving dependent objects.
- */
- public static class ConcreteSchemaAttributeType extends AbstractAttributeType
- {
- private static final long serialVersionUID = 4050205236738471984L;
-
- private final SyntaxRegistry syntaxRegistry;
- private final MatchingRuleRegistry matchingRuleRegistry;
- private final AttributeTypeRegistry attributeTypeRegistry;
- private String superiorId;
- private String equalityId;
- private String substrId;
- private String orderingId;
- private String syntaxId;
-
-
- protected ConcreteSchemaAttributeType( String oid, Registries registries )
- {
- super( oid );
-
- syntaxRegistry = registries.getSyntaxRegistry();
- matchingRuleRegistry = registries.getMatchingRuleRegistry();
- attributeTypeRegistry = registries.getAttributeTypeRegistry();
- }
-
- public void setSuperiorId( String superiorId )
- {
- this.superiorId = superiorId;
- }
-
- public AttributeType getSuperior() throws NamingException
- {
- if ( superiorId == null )
- {
- return null;
- }
-
- return this.attributeTypeRegistry.lookup( superiorId );
- }
-
- public void setNames( String[] names )
- {
- super.setNames( names );
- }
-
- public MatchingRule getEquality() throws NamingException
- {
- if ( equalityId != null )
- {
- return this.matchingRuleRegistry.lookup( equalityId );
- }
-
- if ( superiorId != null )
- {
- return getSuperior().getEquality();
- }
-
- return null;
- }
-
- public void setEqualityId( String equalityId )
- {
- this.equalityId = equalityId;
- }
-
- public MatchingRule getSubstr() throws NamingException
- {
- if ( substrId != null )
- {
- return this.matchingRuleRegistry.lookup( substrId );
- }
-
- if ( superiorId != null )
- {
- return getSuperior().getSubstr();
- }
-
- return null;
- }
-
- public void setSubstrId( String substrId )
- {
- this.substrId = substrId;
- }
-
- public MatchingRule getOrdering() throws NamingException
- {
- if ( orderingId != null )
- {
- return this.matchingRuleRegistry.lookup( orderingId );
- }
-
- if ( superiorId != null )
- {
- return getSuperior().getOrdering();
- }
-
- return null;
- }
-
- public void setOrderingId( String orderingId )
- {
- this.orderingId = orderingId;
- }
-
- public void setSyntaxId( String syntaxId )
- {
- this.syntaxId = syntaxId;
- }
-
- public Syntax getSyntax() throws NamingException
- {
- if ( syntaxId != null )
- {
- return this.syntaxRegistry.lookup( syntaxId );
- }
-
- if ( superiorId != null )
- {
- return getSuperior().getSyntax();
- }
-
- return null;
- }
-
- public void setSingleValue( boolean singleValue )
- {
- super.setSingleValue( singleValue );
- }
-
- public void setCollective( boolean collective )
- {
- super.setCollective( collective );
- }
-
- public void setCanUserModify( boolean canUserModify )
- {
- super.setCanUserModify( canUserModify );
- }
-
- public void setObsolete( boolean obsolete )
- {
- super.setObsolete( obsolete );
- }
-
- public void setDescription( String description )
- {
- super.setDescription( description );
- }
-
- public void setUsage( UsageEnum usage )
- {
- super.setUsage( usage );
- }
-
- public void setLength( int length )
- {
- super.setLength( length );
- }
- }
-
-
- /**
- * A concrete mutable objectClass implementation for bootstrapping which
- * uses registries for dynamically resolving dependent objects.
- */
- public static class ConcreteSchemaObjectClass extends AbstractSchemaObject
- implements ObjectClass
- {
- private final ObjectClassRegistry objectClassRegistry;
- private final AttributeTypeRegistry attributeTypeRegistry;
-
- private String[] superClassIds = EMPTY;
- private ObjectClass[] superClasses;
- private ObjectClassTypeEnum type = ObjectClassTypeEnum.STRUCTURAL;
-
- private String[] mayListIds = EMPTY;
- private AttributeType[] mayList;
-
- private String[] mustListIds = EMPTY;
- private AttributeType[] mustList;
-
-
- /**
- * Creates a mutable ObjectClass for the bootstrap process.
- *
- * @param oid the OID of the new objectClass
- * @param registries the bootstrap registries to use for resolving dependent objects
- */
- protected ConcreteSchemaObjectClass( String oid, Registries registries )
- {
- super( oid );
-
- objectClassRegistry = registries.getObjectClassRegistry();
- attributeTypeRegistry = registries.getAttributeTypeRegistry();
- }
-
-
- // --------------------------------------------------------------------
- // ObjectClass Accessors
- // --------------------------------------------------------------------
-
-
- public ObjectClass[] getSuperClasses() throws NamingException
- {
- if ( superClasses == null )
- {
- superClasses = new ObjectClass[superClassIds.length];
- }
-
- for( int ii = 0; ii < superClassIds.length; ii++ )
- {
- superClasses[ii] = objectClassRegistry.lookup( superClassIds[ii] );
- }
-
- return superClasses;
- }
-
-
- public void setSuperClassIds( String[] superClassIds )
- {
- this.superClassIds = superClassIds;
- }
-
-
- public ObjectClassTypeEnum getType()
- {
- return type;
- }
-
-
- public void setType( ObjectClassTypeEnum type )
- {
- this.type = type;
- }
-
-
- public AttributeType[] getMustList() throws NamingException
- {
- if ( mustList == null )
- {
- mustList = new AttributeType[mustListIds.length];
- }
-
- for( int ii = 0; ii < mustListIds.length; ii++ )
- {
- mustList[ii] = attributeTypeRegistry.lookup( mustListIds[ii] );
- }
-
- return mustList;
- }
-
-
- public void setMustListIds( String[] mustListIds )
- {
- this.mustListIds = mustListIds;
- }
-
-
- public AttributeType[] getMayList() throws NamingException
- {
- if ( mayList == null )
- {
- mayList = new AttributeType[mayListIds.length];
- }
-
- for( int ii = 0; ii < mayListIds.length; ii++ )
- {
- mayList[ii] = attributeTypeRegistry.lookup( mayListIds[ii] );
- }
-
- return mayList;
- }
-
-
- public void setMayListIds( String[] mayListIds )
- {
- this.mayListIds = mayListIds;
- }
-
-
- // --------------------------------------------------------------------
- // SchemaObject Mutators
- // --------------------------------------------------------------------
-
-
- public void setObsolete( boolean obsolete )
- {
- super.setObsolete( obsolete );
- }
-
- public void setNames( String[] names )
- {
- super.setNames( names );
- }
-
- public void setDescription( String description )
- {
- super.setDescription( description );
- }
- }
-}
+/*
+ * 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.directory.server.core.schema;
+
+
+import org.apache.directory.shared.ldap.schema.*;
+
+import javax.naming.NamingException;
+import java.util.Comparator;
+
+/**
+ * An abstract producer implementation which doesn't make explicit reference
+ * to "bootstrap".
+ * todo: Based on org.apache.ldap.server.schema.bootstrap.AbstractBootstrapProducer
+ * rev 226451 which should be recoded to use this more generic class.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev: 437012 $, $Date: 2006-08-26 09:25:30 +1000 (Sat, 26 Aug 2006) $
+ */
+public abstract class SchemaProducer
+{
+ /**
+ * a reused empty String array
+ */
+ protected static final String[] EMPTY = new String[0];
+
+ protected SchemaProducer()
+ {
+ }
+
+ protected static ConceteSchemaSyntax
+ newSyntax( String oid, Registries registries )
+ {
+ return new ConceteSchemaSyntax( oid, registries.getSyntaxCheckerRegistry() );
+ }
+
+ protected static ConcreteSchemaAttributeType
+ newAttributeType( String oid, Registries registries )
+ {
+ return new ConcreteSchemaAttributeType( oid, registries );
+ }
+
+ protected static ConcreteSchemaObjectClass
+ newObjectClass( String oid, Registries registries )
+ {
+ return new ConcreteSchemaObjectClass( oid, registries );
+ }
+
+ protected static ConcreteSchemaMatchingRule
+ newMatchingRule( String oid, Registries registries )
+ {
+ return new ConcreteSchemaMatchingRule( oid, registries );
+ }
+
+
+ /**
+ * A mutable Syntax for the bootstrap phase that uses the
+ * syntaxCheckerRegistry to dynamically resolve syntax checkers.
+ */
+ public static class ConceteSchemaSyntax extends AbstractSyntax
+ {
+ final SyntaxCheckerRegistry registry;
+
+
+ protected ConceteSchemaSyntax( String oid, SyntaxCheckerRegistry registry )
+ {
+ super( oid );
+ this.registry = registry;
+ }
+
+
+ public void setDescription( String description )
+ {
+ super.setDescription( description );
+ }
+
+
+ public void setHumanReadible( boolean isHumanReadible )
+ {
+ super.setHumanReadible( isHumanReadible );
+ }
+
+
+ public void setNames( String[] names )
+ {
+ super.setNames( names );
+ }
+
+
+ public SyntaxChecker getSyntaxChecker() throws NamingException
+ {
+ return registry.lookup( getOid() );
+ }
+
+
+ public boolean isObsolete()
+ {
+ return false;
+ }
+ }
+
+
+ public static class ConcreteSchemaMatchingRule extends AbstractMatchingRule
+ {
+ final SyntaxRegistry syntaxRegistry;
+ final NormalizerRegistry normalizerRegistry;
+ final ComparatorRegistry comparatorRegistry;
+ String syntaxOid;
+
+
+ protected ConcreteSchemaMatchingRule( String oid, Registries registries )
+ {
+ super( oid );
+ this.syntaxRegistry = registries.getSyntaxRegistry();
+ this.normalizerRegistry = registries.getNormalizerRegistry();
+ this.comparatorRegistry = registries.getComparatorRegistry();
+ }
+
+
+ public void setNames( String[] names )
+ {
+ super.setNames( names );
+ }
+
+ public void setSyntaxOid( String syntaxOid )
+ {
+ this.syntaxOid = syntaxOid;
+ }
+
+ public void setDescription( String description )
+ {
+ super.setDescription( description );
+ }
+
+ public void setObsolete( boolean isObsolete )
+ {
+ super.setObsolete( isObsolete );
+ }
+
+ // accessors
+
+
+ public Syntax getSyntax() throws NamingException
+ {
+ return syntaxRegistry.lookup( syntaxOid );
+ }
+
+ public Comparator getComparator() throws NamingException
+ {
+ return comparatorRegistry.lookup( getOid() );
+ }
+
+ public Normalizer getNormalizer() throws NamingException
+ {
+ return normalizerRegistry.lookup( getOid() );
+ }
+ }
+
+
+ /**
+ * A concrete mutable attributeType implementation for bootstrapping which
+ * uses registries for dynamically resolving dependent objects.
+ */
+ public static class ConcreteSchemaAttributeType extends AbstractAttributeType
+ {
+ private static final long serialVersionUID = 4050205236738471984L;
+
+ private final SyntaxRegistry syntaxRegistry;
+ private final MatchingRuleRegistry matchingRuleRegistry;
+ private final AttributeTypeRegistry attributeTypeRegistry;
+ private String superiorId;
+ private String equalityId;
+ private String substrId;
+ private String orderingId;
+ private String syntaxId;
+
+
+ protected ConcreteSchemaAttributeType( String oid, Registries registries )
+ {
+ super( oid );
+
+ syntaxRegistry = registries.getSyntaxRegistry();
+ matchingRuleRegistry = registries.getMatchingRuleRegistry();
+ attributeTypeRegistry = registries.getAttributeTypeRegistry();
+ }
+
+ public void setSuperiorId( String superiorId )
+ {
+ this.superiorId = superiorId;
+ }
+
+ public AttributeType getSuperior() throws NamingException
+ {
+ if ( superiorId == null )
+ {
+ return null;
+ }
+
+ return this.attributeTypeRegistry.lookup( superiorId );
+ }
+
+ public void setNames( String[] names )
+ {
+ super.setNames( names );
+ }
+
+ public MatchingRule getEquality() throws NamingException
+ {
+ if ( equalityId != null )
+ {
+ return this.matchingRuleRegistry.lookup( equalityId );
+ }
+
+ if ( superiorId != null )
+ {
+ return getSuperior().getEquality();
+ }
+
+ return null;
+ }
+
+ public void setEqualityId( String equalityId )
+ {
+ this.equalityId = equalityId;
+ }
+
+ public MatchingRule getSubstr() throws NamingException
+ {
+ if ( substrId != null )
+ {
+ return this.matchingRuleRegistry.lookup( substrId );
+ }
+
+ if ( superiorId != null )
+ {
+ return getSuperior().getSubstr();
+ }
+
+ return null;
+ }
+
+ public void setSubstrId( String substrId )
+ {
+ this.substrId = substrId;
+ }
+
+ public MatchingRule getOrdering() throws NamingException
+ {
+ if ( orderingId != null )
+ {
+ return this.matchingRuleRegistry.lookup( orderingId );
+ }
+
+ if ( superiorId != null )
+ {
+ return getSuperior().getOrdering();
+ }
+
+ return null;
+ }
+
+ public void setOrderingId( String orderingId )
+ {
+ this.orderingId = orderingId;
+ }
+
+ public void setSyntaxId( String syntaxId )
+ {
+ this.syntaxId = syntaxId;
+ }
+
+ public Syntax getSyntax() throws NamingException
+ {
+ if ( syntaxId != null )
+ {
+ return this.syntaxRegistry.lookup( syntaxId );
+ }
+
+ if ( superiorId != null )
+ {
+ return getSuperior().getSyntax();
+ }
+
+ return null;
+ }
+
+ public void setSingleValue( boolean singleValue )
+ {
+ super.setSingleValue( singleValue );
+ }
+
+ public void setCollective( boolean collective )
+ {
+ super.setCollective( collective );
+ }
+
+ public void setCanUserModify( boolean canUserModify )
+ {
+ super.setCanUserModify( canUserModify );
+ }
+
+ public void setObsolete( boolean obsolete )
+ {
+ super.setObsolete( obsolete );
+ }
+
+ public void setDescription( String description )
+ {
+ super.setDescription( description );
+ }
+
+ public void setUsage( UsageEnum usage )
+ {
+ super.setUsage( usage );
+ }
+
+ public void setLength( int length )
+ {
+ super.setLength( length );
+ }
+ }
+
+
+ /**
+ * A concrete mutable objectClass implementation for bootstrapping which
+ * uses registries for dynamically resolving dependent objects.
+ */
+ public static class ConcreteSchemaObjectClass extends AbstractSchemaObject
+ implements ObjectClass
+ {
+ private final ObjectClassRegistry objectClassRegistry;
+ private final AttributeTypeRegistry attributeTypeRegistry;
+
+ private String[] superClassIds = EMPTY;
+ private ObjectClass[] superClasses;
+ private ObjectClassTypeEnum type = ObjectClassTypeEnum.STRUCTURAL;
+
+ private String[] mayListIds = EMPTY;
+ private AttributeType[] mayList;
+
+ private String[] mustListIds = EMPTY;
+ private AttributeType[] mustList;
+
+
+ /**
+ * Creates a mutable ObjectClass for the bootstrap process.
+ *
+ * @param oid the OID of the new objectClass
+ * @param registries the bootstrap registries to use for resolving dependent objects
+ */
+ protected ConcreteSchemaObjectClass( String oid, Registries registries )
+ {
+ super( oid );
+
+ objectClassRegistry = registries.getObjectClassRegistry();
+ attributeTypeRegistry = registries.getAttributeTypeRegistry();
+ }
+
+ // --------------------------------------------------------------------
+ // ObjectClass Accessors
+ // --------------------------------------------------------------------
+
+
+ public ObjectClass[] getSuperClasses() throws NamingException
+ {
+ if ( superClasses == null )
+ {
+ superClasses = new ObjectClass[superClassIds.length];
+ }
+
+ for ( int ii = 0; ii < superClassIds.length; ii++ )
+ {
+ superClasses[ii] = objectClassRegistry.lookup( superClassIds[ii] );
+ }
+
+ return superClasses;
+ }
+
+
+ public void setSuperClassIds( String[] superClassIds )
+ {
+ this.superClassIds = superClassIds;
+ }
+
+
+ public ObjectClassTypeEnum getType()
+ {
+ return type;
+ }
+
+
+ public void setType( ObjectClassTypeEnum type )
+ {
+ this.type = type;
+ }
+
+
+ public AttributeType[] getMustList() throws NamingException
+ {
+ if ( mustList == null )
+ {
+ mustList = new AttributeType[mustListIds.length];
+ }
+
+ for ( int ii = 0; ii < mustListIds.length; ii++ )
+ {
+ mustList[ii] = attributeTypeRegistry.lookup( mustListIds[ii] );
+ }
+
+ return mustList;
+ }
+
+
+ public void setMustListIds( String[] mustListIds )
+ {
+ this.mustListIds = mustListIds;
+ }
+
+
+ public AttributeType[] getMayList() throws NamingException
+ {
+ if ( mayList == null )
+ {
+ mayList = new AttributeType[mayListIds.length];
+ }
+
+ for ( int ii = 0; ii < mayListIds.length; ii++ )
+ {
+ mayList[ii] = attributeTypeRegistry.lookup( mayListIds[ii] );
+ }
+
+ return mayList;
+ }
+
+
+ public void setMayListIds( String[] mayListIds )
+ {
+ this.mayListIds = mayListIds;
+ }
+
+ // --------------------------------------------------------------------
+ // SchemaObject Mutators
+ // --------------------------------------------------------------------
+
+
+ public void setObsolete( boolean obsolete )
+ {
+ super.setObsolete( obsolete );
+ }
+
+ public void setNames( String[] names )
+ {
+ super.setNames( names );
+ }
+
+ public void setDescription( String description )
+ {
+ super.setDescription( description );
+ }
+ }
+}
Modified: directory/branches/apacheds-schema/apacheds/server-installers/src/main/installers/server.xml
URL: http://svn.apache.org/viewvc/directory/branches/apacheds-schema/apacheds/server-installers/src/main/installers/server.xml?view=diff&rev=473187&r1=473186&r2=473187
==============================================================================
--- directory/branches/apacheds-schema/apacheds/server-installers/src/main/installers/server.xml (original)
+++ directory/branches/apacheds-schema/apacheds/server-installers/src/main/installers/server.xml Thu Nov 9 20:49:21 2006
@@ -100,23 +100,33 @@
<ref bean="examplePartitionConfiguration"/>
</set>
</property>
- <property name="bootstrapSchemas">
- <set>
- <bean class="org.apache.directory.server.core.schema.bootstrap.AutofsSchema"/>
- <bean class="org.apache.directory.server.core.schema.bootstrap.CorbaSchema"/>
- <bean class="org.apache.directory.server.core.schema.bootstrap.CoreSchema"/>
- <bean class="org.apache.directory.server.core.schema.bootstrap.CosineSchema"/>
- <bean class="org.apache.directory.server.core.schema.bootstrap.ApacheSchema"/>
- <bean class="org.apache.directory.server.core.schema.bootstrap.CollectiveSchema"/>
- <bean class="org.apache.directory.server.core.schema.bootstrap.InetorgpersonSchema"/>
- <bean class="org.apache.directory.server.core.schema.bootstrap.JavaSchema"/>
- <bean class="org.apache.directory.server.core.schema.bootstrap.Krb5kdcSchema"/>
- <bean class="org.apache.directory.server.core.schema.bootstrap.NisSchema"/>
- <bean class="org.apache.directory.server.core.schema.bootstrap.SystemSchema"/>
- <bean class="org.apache.directory.server.core.schema.bootstrap.ApachednsSchema"/>
- </set>
+
+ <!--<property name="bootstrapSchemas">-->
+ <!--<set>-->
+ <!--<bean class="org.apache.directory.server.core.schema.bootstrap.AutofsSchema"/>-->
+ <!--<bean class="org.apache.directory.server.core.schema.bootstrap.CorbaSchema"/>-->
+ <!--<bean class="org.apache.directory.server.core.schema.bootstrap.CoreSchema"/>-->
+ <!--<bean class="org.apache.directory.server.core.schema.bootstrap.CosineSchema"/>-->
+ <!--<bean class="org.apache.directory.server.core.schema.bootstrap.ApacheSchema"/>-->
+ <!--<bean class="org.apache.directory.server.core.schema.bootstrap.CollectiveSchema"/>-->
+ <!--<bean class="org.apache.directory.server.core.schema.bootstrap.InetorgpersonSchema"/>-->
+ <!--<bean class="org.apache.directory.server.core.schema.bootstrap.JavaSchema"/>-->
+ <!--<bean class="org.apache.directory.server.core.schema.bootstrap.Krb5kdcSchema"/>-->
+ <!--<bean class="org.apache.directory.server.core.schema.bootstrap.NisSchema"/>-->
+ <!--<bean class="org.apache.directory.server.core.schema.bootstrap.SystemSchema"/>-->
+ <!--<bean class="org.apache.directory.server.core.schema.bootstrap.ApachednsSchema"/>-->
+ <!--</set>-->
+ <!--</property>-->
+
+ <property name="schemaLoaders">
+ <list>
+ <bean class="org.apache.directory.server.core.schema.FileSystemSchemaLoader">
+ <constructor-arg><value>./conf</value></constructor-arg>
+ <constructor-arg><value>[0-9][0-9]_(.*).schema</value></constructor-arg>
+ </bean>
+ </list>
</property>
-
+
<property name="extendedOperationHandlers">
<list>
<bean class="org.apache.directory.server.ldap.support.extended.GracefulShutdownHandler"/>
Added: directory/branches/apacheds-schema/apacheds/server-main/apacheds.bat
URL: http://svn.apache.org/viewvc/directory/branches/apacheds-schema/apacheds/server-main/apacheds.bat?view=auto&rev=473187
==============================================================================
--- directory/branches/apacheds-schema/apacheds/server-main/apacheds.bat (added)
+++ directory/branches/apacheds-schema/apacheds/server-main/apacheds.bat Thu Nov 9 20:49:21 2006
@@ -0,0 +1 @@
+java -Dlog4j.configuration=log4j.properties -cp .;xml-apis-1.0.b2.jar;target/apacheds-server-main-1.5.0-SNAPSHOT-app.jar org.apache.directory.server.UberjarMain server.xml
\ No newline at end of file
Modified: directory/branches/apacheds-schema/apacheds/server-main/log4j.properties
URL: http://svn.apache.org/viewvc/directory/branches/apacheds-schema/apacheds/server-main/log4j.properties?view=diff&rev=473187&r1=473186&r2=473187
==============================================================================
--- directory/branches/apacheds-schema/apacheds/server-main/log4j.properties (original)
+++ directory/branches/apacheds-schema/apacheds/server-main/log4j.properties Thu Nov 9 20:49:21 2006
@@ -1,23 +1,24 @@
-log4j.rootCategory=WARN, stdout, R
-
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-
-log4j.appender.R=org.apache.log4j.RollingFileAppender
-log4j.appender.R.File=apacheds-rolling.log
-
-log4j.appender.R.MaxFileSize=1024KB
-# Keep some backup files
-log4j.appender.R.MaxBackupIndex=5
-
-log4j.appender.R.layout=org.apache.log4j.PatternLayout
-log4j.appender.R.layout.ConversionPattern=[%d{HH:mm:ss}] %p [%c] - %m%n
-
-log4j.appender.stdout.layout.ConversionPattern=[%d{HH:mm:ss}] %p [%c] - %m%n
-
-# with these we'll not get innundated when switching to DEBUG
-log4j.logger.org.apache.directory.shared.ldap.name=WARN
-log4j.logger.org.springframework=WARN
-log4j.logger.org.apache.directory.shared.codec=WARN
-log4j.logger.org.apache.directory.shared.asn1=WARN
-
+#log4j.rootCategory=WARN, stdout, R
+log4j.rootCategory=INFO, stdout, R
+
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+
+log4j.appender.R=org.apache.log4j.RollingFileAppender
+log4j.appender.R.File=apacheds-rolling.log
+
+log4j.appender.R.MaxFileSize=1024KB
+# Keep some backup files
+log4j.appender.R.MaxBackupIndex=5
+
+log4j.appender.R.layout=org.apache.log4j.PatternLayout
+log4j.appender.R.layout.ConversionPattern=[%d{HH:mm:ss}] %p [%c] - %m%n
+
+log4j.appender.stdout.layout.ConversionPattern=[%d{HH:mm:ss}] %p [%c] - %m%n
+
+# with these we'll not get innundated when switching to DEBUG
+log4j.logger.org.apache.directory.shared.ldap.name=WARN
+log4j.logger.org.springframework=WARN
+log4j.logger.org.apache.directory.shared.codec=WARN
+log4j.logger.org.apache.directory.shared.asn1=WARN
+
Modified: directory/branches/apacheds-schema/apacheds/server-main/server.xml
URL: http://svn.apache.org/viewvc/directory/branches/apacheds-schema/apacheds/server-main/server.xml?view=diff&rev=473187&r1=473186&r2=473187
==============================================================================
--- directory/branches/apacheds-schema/apacheds/server-main/server.xml (original)
+++ directory/branches/apacheds-schema/apacheds/server-main/server.xml Thu Nov 9 20:49:21 2006
@@ -100,28 +100,37 @@
<ref bean="examplePartitionConfiguration"/>
</set>
</property>
- <property name="bootstrapSchemas">
- <set>
- <bean class="org.apache.directory.server.core.schema.bootstrap.AutofsSchema"/>
- <bean class="org.apache.directory.server.core.schema.bootstrap.CorbaSchema"/>
- <bean class="org.apache.directory.server.core.schema.bootstrap.CoreSchema"/>
- <bean class="org.apache.directory.server.core.schema.bootstrap.CosineSchema"/>
- <bean class="org.apache.directory.server.core.schema.bootstrap.ApacheSchema"/>
- <bean class="org.apache.directory.server.core.schema.bootstrap.CollectiveSchema"/>
- <bean class="org.apache.directory.server.core.schema.bootstrap.InetorgpersonSchema"/>
- <bean class="org.apache.directory.server.core.schema.bootstrap.JavaSchema"/>
- <bean class="org.apache.directory.server.core.schema.bootstrap.Krb5kdcSchema"/>
- <bean class="org.apache.directory.server.core.schema.bootstrap.NisSchema"/>
- <bean class="org.apache.directory.server.core.schema.bootstrap.SystemSchema"/>
- <bean class="org.apache.directory.server.core.schema.bootstrap.ApachednsSchema"/>
- </set>
+
+ <!--<property name="bootstrapSchemas">-->
+ <!--<set>-->
+ <!--<bean class="org.apache.directory.server.core.schema.bootstrap.AutofsSchema"/>-->
+ <!--<bean class="org.apache.directory.server.core.schema.bootstrap.CorbaSchema"/>-->
+ <!--<bean class="org.apache.directory.server.core.schema.bootstrap.CoreSchema"/>-->
+ <!--<bean class="org.apache.directory.server.core.schema.bootstrap.CosineSchema"/>-->
+ <!--<bean class="org.apache.directory.server.core.schema.bootstrap.ApacheSchema"/>-->
+ <!--<bean class="org.apache.directory.server.core.schema.bootstrap.CollectiveSchema"/>-->
+ <!--<bean class="org.apache.directory.server.core.schema.bootstrap.InetorgpersonSchema"/>-->
+ <!--<bean class="org.apache.directory.server.core.schema.bootstrap.JavaSchema"/>-->
+ <!--<bean class="org.apache.directory.server.core.schema.bootstrap.Krb5kdcSchema"/>-->
+ <!--<bean class="org.apache.directory.server.core.schema.bootstrap.NisSchema"/>-->
+ <!--<bean class="org.apache.directory.server.core.schema.bootstrap.SystemSchema"/>-->
+ <!--<bean class="org.apache.directory.server.core.schema.bootstrap.ApachednsSchema"/>-->
+ <!--</set>-->
+ <!--</property>-->
+
+ <property name="schemaLoaders">
+ <list>
+ <bean class="org.apache.directory.server.core.schema.FileSystemSchemaLoader">
+ <constructor-arg><value>./conf</value></constructor-arg>
+ <constructor-arg><value>[0-9][0-9]_(.*).schema</value></constructor-arg>
+ </bean>
+ </list>
</property>
-
+
<property name="extendedOperationHandlers">
<list>
<bean class="org.apache.directory.server.ldap.support.extended.GracefulShutdownHandler"/>
<bean class="org.apache.directory.server.ldap.support.extended.LaunchDiagnosticUiHandler"/>
- <bean class="org.apache.directory.server.ldap.support.extended.StoredProcedureExtendedOperationHandler"/>
</list>
</property>
@@ -193,6 +202,23 @@
<bean class="org.apache.directory.server.core.event.EventService" />
</property>
</bean>
+
+ <!-- Uncomment to enable replication service
+ <bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
+ <property name="name"><value>replicationService</value></property>
+ <property name="interceptor">
+ <bean class="org.apache.directory.mitosis.service.ReplicationService">
+ <property name="configuration">
+ <bean class="org.apache.directory.mitosis.configuration.ReplicationConfiguration">
+ <property name="replicaId"><value>instance_a</value></property>
+ <property name="serverPort"><value>10390</value></property>
+ <property name="peerReplicas"><value>instance_b@localhost:10392</value></property>
+ </bean>
+ </property>
+ </bean>
+ </property>
+ </bean>
+ -->
</list>
</property>
</bean>
Modified: directory/branches/apacheds-schema/apacheds/server-main/src/main/java/org/apache/directory/server/UberjarMain.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds-schema/apacheds/server-main/src/main/java/org/apache/directory/server/UberjarMain.java?view=diff&rev=473187&r1=473186&r2=473187
==============================================================================
--- directory/branches/apacheds-schema/apacheds/server-main/src/main/java/org/apache/directory/server/UberjarMain.java (original)
+++ directory/branches/apacheds-schema/apacheds/server-main/src/main/java/org/apache/directory/server/UberjarMain.java Thu Nov 9 20:49:21 2006
@@ -23,6 +23,7 @@
import java.io.File;
import org.apache.directory.daemon.InstallationLayout;
+import org.apache.log4j.PropertyConfigurator;
/**
@@ -42,6 +43,13 @@
*/
public static void main( String[] args ) throws Exception
{
+ // todo This shouldn't be required, investigate SLF4J config further
+ String log4jProps = System.getProperty( "log4j.configuration" );
+
+ if (log4jProps == null)
+ log4jProps = "log4j.properties";
+ PropertyConfigurator.configure( log4jProps );
+
Service server = new Service();
if ( args.length > 0 && new File( args[0] ).isDirectory() )
@@ -54,8 +62,16 @@
server.init( null, args );
server.start();
}
+ else if ( args.length > 0 )
+ {
+ final String err = UberjarMain.class.getName() + ": server configuration file '" + args[0] + "' not found";
+
+ System.err.println(err);
+ assert false : err;
+ }
else
{
+
server.init( null, null );
server.start();
}
Modified: directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/util/DNUtils.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/util/DNUtils.java?view=diff&rev=473187&r1=473186&r2=473187
==============================================================================
--- directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/util/DNUtils.java (original)
+++ directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/util/DNUtils.java Thu Nov 9 20:49:21 2006
@@ -174,7 +174,7 @@
/**
- * Walk the buffer while characters are Alpha characters : <alpha> ::=
+ * Walk the buffer while characters are Alpha characters : <alpha> ::=
* [0x41-0x5A] | [0x61-0x7A]
*
* @param byteArray
@@ -206,7 +206,7 @@
/**
- * Walk the buffer while characters are Alpha characters : <alpha> ::=
+ * Walk the buffer while characters are Alpha characters : <alpha> ::=
* [0x41-0x5A] | [0x61-0x7A]
*
* @param charArray