directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r519737 - in /directory: apacheds/trunk/bootstrap-plugin/src/main/java/org/apache/directory/server/core/bootstrap/plugin/ apacheds/trunk/constants/src/main/java/org/apache/directory/server/constants/ apacheds/trunk/core/src/main/java/org/ap...
Date Sun, 18 Mar 2007 23:36:57 GMT
Author: elecharny
Date: Sun Mar 18 16:36:54 2007
New Revision: 519737

URL: http://svn.apache.org/viewvc?view=rev&rev=519737
Log:
Replacing some more constants from core and system schema.

Modified:
    directory/apacheds/trunk/bootstrap-plugin/src/main/java/org/apache/directory/server/core/bootstrap/plugin/BootstrapPlugin.java
    directory/apacheds/trunk/constants/src/main/java/org/apache/directory/server/constants/CoreSchemaConstants.java
    directory/apacheds/trunk/constants/src/main/java/org/apache/directory/server/constants/SystemSchemaConstants.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/PartitionNexus.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/DescriptionParsers.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaSchemaHandler.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/PartitionSchemaLoader.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaEntityFactory.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDao.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/subtree/SubentryService.java
    directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/GetAllPrincipals.java
    directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/PrincipalObjectFactory.java
    directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/PrincipalStateFactory.java
    directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/common/Constants.java
    directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/operation/OperationFactory.java
    directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/service/ReplicationService.java
    directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/service/protocol/handler/ReplicationClientContextHandler.java
    directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/store/DnsAttribute.java
    directory/apacheds/trunk/server-jndi/src/main/java/org/apache/directory/server/jndi/ServerContextFactory.java
    directory/apacheds/trunk/utils/src/main/java/org/apache/directory/server/utils/AttributesFactory.java
    directory/shared/trunk/ldap-constants/src/main/java/org/apache/directory/shared/ldap/constants/SchemaConstants.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/trigger/TriggerUtils.java

Modified: directory/apacheds/trunk/bootstrap-plugin/src/main/java/org/apache/directory/server/core/bootstrap/plugin/BootstrapPlugin.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/bootstrap-plugin/src/main/java/org/apache/directory/server/core/bootstrap/plugin/BootstrapPlugin.java?view=diff&rev=519737&r1=519736&r2=519737
==============================================================================
--- directory/apacheds/trunk/bootstrap-plugin/src/main/java/org/apache/directory/server/core/bootstrap/plugin/BootstrapPlugin.java (original)
+++ directory/apacheds/trunk/bootstrap-plugin/src/main/java/org/apache/directory/server/core/bootstrap/plugin/BootstrapPlugin.java Sun Mar 18 16:36:54 2007
@@ -40,9 +40,7 @@
 import javax.naming.directory.DirContext;
 
 import org.apache.directory.server.constants.ApacheSchemaConstants;
-import org.apache.directory.server.constants.CoreSchemaConstants;
 import org.apache.directory.server.constants.MetaSchemaConstants;
-import org.apache.directory.server.constants.SystemSchemaConstants;
 import org.apache.directory.server.core.partition.impl.btree.Index;
 import org.apache.directory.server.core.partition.impl.btree.IndexNotFoundException;
 import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmStore;
@@ -205,7 +203,7 @@
 
         try
         {
-            LdapDN dn = new LdapDN( CoreSchemaConstants.OU_AT + "=schema" );
+            LdapDN dn = new LdapDN( SchemaConstants.OU_AT + "=schema" );
             dn.normalize( registries.getAttributeTypeRegistry().getNormalizerMapping() );
 
             if ( !hasEntry( dn ) )
@@ -213,7 +211,7 @@
                 Attributes entry = new AttributesImpl();
                 entry.put( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC );
                 entry.get( SchemaConstants.OBJECT_CLASS_AT ).add( SchemaConstants.ORGANIZATIONAL_UNIT_OC );
-                entry.put( CoreSchemaConstants.OU_AT, "schema" );
+                entry.put( SchemaConstants.OU_AT, "schema" );
                 store.add( dn, entry );
             }
 
@@ -333,8 +331,8 @@
 
     private void createSchemaAndContainers( Schema schema ) throws NamingException
     {
-        LdapDN dn = new LdapDN( SystemSchemaConstants.CN_AT + "=" 
-            + schema.getSchemaName() + "," + CoreSchemaConstants.OU_AT + "=schema" );
+        LdapDN dn = new LdapDN( SchemaConstants.CN_AT + "=" 
+            + schema.getSchemaName() + "," + SchemaConstants.OU_AT + "=schema" );
         dn.normalize( registries.getAttributeTypeRegistry().getNormalizerMapping() );
 
         if ( hasEntry( dn ) )
@@ -345,57 +343,57 @@
         Attributes entry = attributesFactory.getAttributes( schema );
         store.add( dn, entry );
         
-        dn.add( CoreSchemaConstants.OU_AT + "=comparators" );
+        dn.add( SchemaConstants.OU_AT + "=comparators" );
         dn.normalize( registries.getAttributeTypeRegistry().getNormalizerMapping() );
         checkCreateContainer( dn );
         
         dn.remove( dn.size() - 1 );
-        dn.add( CoreSchemaConstants.OU_AT + "=normalizers" );
+        dn.add( SchemaConstants.OU_AT + "=normalizers" );
         dn.normalize( registries.getAttributeTypeRegistry().getNormalizerMapping() );
         checkCreateContainer( dn );
         
         dn.remove( dn.size() - 1 );
-        dn.add( CoreSchemaConstants.OU_AT + "=syntaxCheckers" );
+        dn.add( SchemaConstants.OU_AT + "=syntaxCheckers" );
         dn.normalize( registries.getAttributeTypeRegistry().getNormalizerMapping() );
         checkCreateContainer( dn );
         
         dn.remove( dn.size() - 1 );
-        dn.add( CoreSchemaConstants.OU_AT + "=syntaxes" );
+        dn.add( SchemaConstants.OU_AT + "=syntaxes" );
         dn.normalize( registries.getAttributeTypeRegistry().getNormalizerMapping() );
         checkCreateContainer( dn );
         
         dn.remove( dn.size() - 1 );
-        dn.add( CoreSchemaConstants.OU_AT + "=matchingRules" );
+        dn.add( SchemaConstants.OU_AT + "=matchingRules" );
         dn.normalize( registries.getAttributeTypeRegistry().getNormalizerMapping() );
         checkCreateContainer( dn );
         
         dn.remove( dn.size() - 1 );
-        dn.add( CoreSchemaConstants.OU_AT + "=attributeTypes" );
+        dn.add( SchemaConstants.OU_AT + "=attributeTypes" );
         dn.normalize( registries.getAttributeTypeRegistry().getNormalizerMapping() );
         checkCreateContainer( dn );
         
         dn.remove( dn.size() - 1 );
-        dn.add( CoreSchemaConstants.OU_AT + "=objectClasses" );
+        dn.add( SchemaConstants.OU_AT + "=objectClasses" );
         dn.normalize( registries.getAttributeTypeRegistry().getNormalizerMapping() );
         checkCreateContainer( dn );
         
         dn.remove( dn.size() - 1 );
-        dn.add( CoreSchemaConstants.OU_AT + "=nameForms" );
+        dn.add( SchemaConstants.OU_AT + "=nameForms" );
         dn.normalize( registries.getAttributeTypeRegistry().getNormalizerMapping() );
         checkCreateContainer( dn );
         
         dn.remove( dn.size() - 1 );
-        dn.add( CoreSchemaConstants.OU_AT + "=ditStructureRules" );
+        dn.add( SchemaConstants.OU_AT + "=ditStructureRules" );
         dn.normalize( registries.getAttributeTypeRegistry().getNormalizerMapping() );
         checkCreateContainer( dn );
         
         dn.remove( dn.size() - 1 );
-        dn.add( CoreSchemaConstants.OU_AT + "=ditContentRules" );
+        dn.add( SchemaConstants.OU_AT + "=ditContentRules" );
         dn.normalize( registries.getAttributeTypeRegistry().getNormalizerMapping() );
         checkCreateContainer( dn );
         
         dn.remove( dn.size() - 1 );
-        dn.add( CoreSchemaConstants.OU_AT + "=matchingRuleUse" );
+        dn.add( SchemaConstants.OU_AT + "=matchingRuleUse" );
         dn.normalize( registries.getAttributeTypeRegistry().getNormalizerMapping() );
         checkCreateContainer( dn );
     }
@@ -417,7 +415,7 @@
             Schema schema = ( Schema ) registries.getLoadedSchemas().get( schemaName );
             getLog().info( "\t\t o [" + schemaName + "] - " + getNameOrNumericoid( at ) );
             LdapDN dn = checkCreateSchema( schemaName );
-            dn.add( CoreSchemaConstants.OU_AT + "=attributeTypes" );
+            dn.add( SchemaConstants.OU_AT + "=attributeTypes" );
             dn.normalize( registries.getAttributeTypeRegistry().getNormalizerMapping() );
             checkCreateContainer( dn );
             Attributes entry = attributesFactory.getAttributes( at, schema );
@@ -445,7 +443,7 @@
             Schema schema = ( Schema ) registries.getLoadedSchemas().get( schemaName );
             getLog().info( "\t\t o [" + schemaName + "] - " + getNameOrNumericoid( oc ) );
             LdapDN dn = checkCreateSchema( schemaName );
-            dn.add( CoreSchemaConstants.OU_AT + "=objectClasses" );
+            dn.add( SchemaConstants.OU_AT + "=objectClasses" );
             dn.normalize( registries.getAttributeTypeRegistry().getNormalizerMapping() );
             checkCreateContainer( dn );
             Attributes entry = attributesFactory.getAttributes( oc, schema );
@@ -473,7 +471,7 @@
             Schema schema = ( Schema ) registries.getLoadedSchemas().get( schemaName );
             getLog().info( "\t\t o [" + schemaName + "] - " + getNameOrNumericoid( mr ) );
             LdapDN dn = checkCreateSchema( schemaName );
-            dn.add( CoreSchemaConstants.OU_AT + "=matchingRules" );
+            dn.add( SchemaConstants.OU_AT + "=matchingRules" );
             dn.normalize( registries.getAttributeTypeRegistry().getNormalizerMapping() );
             checkCreateContainer( dn );
             Attributes entry = attributesFactory.getAttributes( mr, schema );
@@ -501,7 +499,7 @@
             Schema schema = ( Schema ) registries.getLoadedSchemas().get( schemaName );
             getLog().info( "\t\t o [" + schemaName + "] - " + oid );
             LdapDN dn = checkCreateSchema( schemaName );
-            dn.add( CoreSchemaConstants.OU_AT + "=comparators" );
+            dn.add( SchemaConstants.OU_AT + "=comparators" );
             dn.normalize( registries.getAttributeTypeRegistry().getNormalizerMapping() );
             checkCreateContainer( dn );
             Attributes entry = attributesFactory.getAttributes( oid, comparatorRegistry.lookup( oid ), schema );
@@ -529,7 +527,7 @@
             Schema schema = ( Schema ) registries.getLoadedSchemas().get( schemaName );
             getLog().info( "\t\t o [" + schemaName + "] - " + oid );
             LdapDN dn = checkCreateSchema( schemaName );
-            dn.add( CoreSchemaConstants.OU_AT + "=normalizers" );
+            dn.add( SchemaConstants.OU_AT + "=normalizers" );
             dn.normalize( registries.getAttributeTypeRegistry().getNormalizerMapping() );
             checkCreateContainer( dn );
             Attributes entry = attributesFactory.getAttributes( oid, normalizerRegistry.lookup( oid ), schema );
@@ -556,7 +554,7 @@
             getLog().info( "\t\t o [" + syntax.getSchema() + "] - " + getNameOrNumericoid( syntax ) );
             LdapDN dn = checkCreateSchema( syntax.getSchema() );
             Schema schema = ( Schema ) registries.getLoadedSchemas().get( syntax.getSchema() );
-            dn.add( CoreSchemaConstants.OU_AT + "=syntaxes" );
+            dn.add( SchemaConstants.OU_AT + "=syntaxes" );
             dn.normalize( registries.getAttributeTypeRegistry().getNormalizerMapping() );
             checkCreateContainer( dn );
             Attributes entry = attributesFactory.getAttributes( syntax, schema );
@@ -584,7 +582,7 @@
             Schema schema = ( Schema ) registries.getLoadedSchemas().get( schemaName );
             getLog().info( "\t\t o [" + schemaName + "] - " + syntaxChecker.getSyntaxOid() );
             LdapDN dn = checkCreateSchema( schemaName );
-            dn.add( CoreSchemaConstants.OU_AT + "=syntaxCheckers" );
+            dn.add( SchemaConstants.OU_AT + "=syntaxCheckers" );
             dn.normalize( registries.getAttributeTypeRegistry().getNormalizerMapping() );
             checkCreateContainer( dn );
             Attributes entry = attributesFactory.getAttributes( syntaxChecker, schema );
@@ -610,7 +608,7 @@
         storeConfig.setEnableOptimizer( false );
         storeConfig.setName( "schema" );
         storeConfig.setOidRegistry( registries.getOidRegistry() );
-        storeConfig.setSuffixDn( CoreSchemaConstants.OU_AT + "=schema" );
+        storeConfig.setSuffixDn( SchemaConstants.OU_AT + "=schema" );
         storeConfig.setSyncOnWrite( false );
         storeConfig.setWorkingDirectory( workingDirectory );
 
@@ -624,7 +622,7 @@
 
         Attributes rootEntry = new AttributesImpl( SchemaConstants.OBJECT_CLASS_AT, 
             SchemaConstants.ORGANIZATIONAL_UNIT_OC, true );
-        rootEntry.put( CoreSchemaConstants.OU_AT, "schema" );
+        rootEntry.put( SchemaConstants.OU_AT, "schema" );
         storeConfig.setContextEntry( rootEntry );
 
         try
@@ -663,7 +661,7 @@
         entry.put( SchemaConstants.MODIFY_TIMESTAMP_AT, DateUtils.getGeneralizedTime() );
         entry.put( SchemaConstants.CREATE_TIMESTAMP_AT, DateUtils.getGeneralizedTime() );
         
-        entry.put( SystemSchemaConstants.CN_AT, "schemaModifications" );
+        entry.put( SchemaConstants.CN_AT, "schemaModifications" );
         entry.put( ApacheSchemaConstants.SUBSCHEMA_SUBENTRY_NAME_AT, "cn=schema" );
         
         LdapDN normName = new LdapDN( "cn=schemaModifications,ou=schema" );
@@ -776,7 +774,7 @@
         Attributes entry = new AttributesImpl();
         entry.put( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC );
         entry.get( SchemaConstants.OBJECT_CLASS_AT ).add( SchemaConstants.ORGANIZATIONAL_UNIT_OC );
-        entry.put( CoreSchemaConstants.OU_AT, dn.getRdn().getValue() );
+        entry.put( SchemaConstants.OU_AT, dn.getRdn().getValue() );
         store.add( dn, entry );
     }
 
@@ -784,8 +782,8 @@
     private LdapDN checkCreateSchema( String schemaName ) throws NamingException
     {
         Schema schema = ( Schema ) schemas.get( schemaName );
-        LdapDN dn = new LdapDN( SystemSchemaConstants.CN_AT + "="
-                + schemaName + "," + CoreSchemaConstants.OU_AT + "=schema" );
+        LdapDN dn = new LdapDN( SchemaConstants.CN_AT + "="
+                + schemaName + "," + SchemaConstants.OU_AT + "=schema" );
         dn.normalize( registries.getAttributeTypeRegistry().getNormalizerMapping() );
 
         if ( hasEntry( dn ) )
@@ -801,8 +799,8 @@
 
     private void disableSchema( String schemaName ) throws NamingException
     {
-        LdapDN dn = new LdapDN( SystemSchemaConstants.CN_AT + "=" + schemaName
-                + "," + CoreSchemaConstants.OU_AT + "=schema" );
+        LdapDN dn = new LdapDN( SchemaConstants.CN_AT + "=" + schemaName
+                + "," + SchemaConstants.OU_AT + "=schema" );
         dn.normalize( registries.getAttributeTypeRegistry().getNormalizerMapping() );
         ModificationItemImpl mod = new ModificationItemImpl( DirContext.ADD_ATTRIBUTE,
                 new AttributeImpl( MetaSchemaConstants.M_DISABLED_AT, "TRUE" ) );

Modified: directory/apacheds/trunk/constants/src/main/java/org/apache/directory/server/constants/CoreSchemaConstants.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/constants/src/main/java/org/apache/directory/server/constants/CoreSchemaConstants.java?view=diff&rev=519737&r1=519736&r2=519737
==============================================================================
--- directory/apacheds/trunk/constants/src/main/java/org/apache/directory/server/constants/CoreSchemaConstants.java (original)
+++ directory/apacheds/trunk/constants/src/main/java/org/apache/directory/server/constants/CoreSchemaConstants.java Sun Mar 18 16:36:54 2007
@@ -29,6 +29,4 @@
 public interface CoreSchemaConstants
 {
     String SCHEMA_NAME = "core";
-
-    String OU_AT = "ou";
 }

Modified: directory/apacheds/trunk/constants/src/main/java/org/apache/directory/server/constants/SystemSchemaConstants.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/constants/src/main/java/org/apache/directory/server/constants/SystemSchemaConstants.java?view=diff&rev=519737&r1=519736&r2=519737
==============================================================================
--- directory/apacheds/trunk/constants/src/main/java/org/apache/directory/server/constants/SystemSchemaConstants.java (original)
+++ directory/apacheds/trunk/constants/src/main/java/org/apache/directory/server/constants/SystemSchemaConstants.java Sun Mar 18 16:36:54 2007
@@ -29,6 +29,4 @@
 public interface SystemSchemaConstants
 {
     String SCHEMA_NAME = "system";
-
-    String CN_AT = "cn";
 }

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java?view=diff&rev=519737&r1=519736&r2=519737
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java Sun Mar 18 16:36:54 2007
@@ -466,7 +466,7 @@
             attributes.put( "uid", PartitionNexus.ADMIN_UID );
             attributes.put( "userPassword", PartitionNexus.ADMIN_PASSWORD );
             attributes.put( "displayName", "Directory Superuser" );
-            attributes.put( "cn", "system administrator" );
+            attributes.put( SchemaConstants.CN_AT, "system administrator" );
             attributes.put( "sn", "administrator" );
             attributes.put( SchemaConstants.CREATORS_NAME_AT, PartitionNexus.ADMIN_PRINCIPAL_NORMALIZED );
             attributes.put( SchemaConstants.CREATE_TIMESTAMP_AT, DateUtils.getGeneralizedTime() );
@@ -494,7 +494,7 @@
             objectClass.add( SchemaConstants.ORGANIZATIONAL_UNIT_OC );
             attributes.put( objectClass );
 
-            attributes.put( "ou", "users" );
+            attributes.put( SchemaConstants.OU_AT, "users" );
             attributes.put( SchemaConstants.CREATORS_NAME_AT, PartitionNexus.ADMIN_PRINCIPAL_NORMALIZED );
             attributes.put( SchemaConstants.CREATE_TIMESTAMP_AT, DateUtils.getGeneralizedTime() );
 
@@ -518,7 +518,7 @@
             objectClass.add( SchemaConstants.ORGANIZATIONAL_UNIT_OC );
             attributes.put( objectClass );
 
-            attributes.put( "ou", "groups" );
+            attributes.put( SchemaConstants.OU_AT, "groups" );
             attributes.put( SchemaConstants.CREATORS_NAME_AT, PartitionNexus.ADMIN_PRINCIPAL_NORMALIZED );
             attributes.put( SchemaConstants.CREATE_TIMESTAMP_AT, DateUtils.getGeneralizedTime() );
 
@@ -542,7 +542,7 @@
             objectClass.add( SchemaConstants.TOP_OC );
             objectClass.add( "groupOfUniqueNames" );
             attributes.put( objectClass );
-            attributes.put( "cn", "Administrators" );
+            attributes.put( SchemaConstants.CN_AT, "Administrators" );
             attributes.put( "uniqueMember", PartitionNexus.ADMIN_PRINCIPAL_NORMALIZED );
             attributes.put( SchemaConstants.CREATORS_NAME_AT, PartitionNexus.ADMIN_PRINCIPAL_NORMALIZED );
             attributes.put( SchemaConstants.CREATE_TIMESTAMP_AT, DateUtils.getGeneralizedTime() );
@@ -587,7 +587,7 @@
             objectClass.add( SchemaConstants.ORGANIZATIONAL_UNIT_OC );
             attributes.put( objectClass );
 
-            attributes.put( "ou", "configuration" );
+            attributes.put( SchemaConstants.OU_AT, "configuration" );
             attributes.put( SchemaConstants.CREATORS_NAME_AT, PartitionNexus.ADMIN_PRINCIPAL_NORMALIZED );
             attributes.put( SchemaConstants.CREATE_TIMESTAMP_AT, DateUtils.getGeneralizedTime() );
 
@@ -611,7 +611,7 @@
             objectClass.add( SchemaConstants.ORGANIZATIONAL_UNIT_OC );
             attributes.put( objectClass );
 
-            attributes.put( "ou", "partitions" );
+            attributes.put( SchemaConstants.OU_AT, "partitions" );
             attributes.put( SchemaConstants.CREATORS_NAME_AT, PartitionNexus.ADMIN_PRINCIPAL_NORMALIZED );
             attributes.put( SchemaConstants.CREATE_TIMESTAMP_AT, DateUtils.getGeneralizedTime() );
 
@@ -635,7 +635,7 @@
             objectClass.add( SchemaConstants.ORGANIZATIONAL_UNIT_OC );
             attributes.put( objectClass );
 
-            attributes.put( "ou", "services" );
+            attributes.put( SchemaConstants.OU_AT, "services" );
             attributes.put( SchemaConstants.CREATORS_NAME_AT, PartitionNexus.ADMIN_PRINCIPAL_NORMALIZED );
             attributes.put( SchemaConstants.CREATE_TIMESTAMP_AT, DateUtils.getGeneralizedTime() );
 
@@ -659,7 +659,7 @@
             objectClass.add( SchemaConstants.ORGANIZATIONAL_UNIT_OC );
             attributes.put( objectClass );
 
-            attributes.put( "ou", "interceptors" );
+            attributes.put( SchemaConstants.OU_AT, "interceptors" );
             attributes.put( SchemaConstants.CREATORS_NAME_AT, PartitionNexus.ADMIN_PRINCIPAL_NORMALIZED );
             attributes.put( SchemaConstants.CREATE_TIMESTAMP_AT, DateUtils.getGeneralizedTime() );
 
@@ -833,7 +833,7 @@
         Attributes entry = new AttributesImpl();
         entry.put( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC );
         entry.get( SchemaConstants.OBJECT_CLASS_AT ).add( SchemaConstants.ORGANIZATIONAL_UNIT_OC );
-        entry.put( "ou", "schema" );
+        entry.put( SchemaConstants.OU_AT, "schema" );
         schemaPartitionConfig.setContextEntry( entry );
         JdbmPartition schemaPartition = new JdbmPartition();
         schemaPartition.init( configuration, schemaPartitionConfig );

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java?view=diff&rev=519737&r1=519736&r2=519737
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java Sun Mar 18 16:36:54 2007
@@ -742,7 +742,7 @@
             boolean isObjectScope = searchCtls.getSearchScope() == SearchControls.OBJECT_SCOPE;
             
             // test for (objectClass=*)
-            boolean isSearchAll = ( ( PresenceNode ) filter ).getAttribute().equalsIgnoreCase( "2.5.4.0" );
+            boolean isSearchAll = ( ( PresenceNode ) filter ).getAttribute().equals( SchemaConstants.OBJECT_CLASS_AT_OID );
 
             /*
              * if basedn is "", filter is "(objectclass=*)" and scope is object

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/PartitionNexus.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/PartitionNexus.java?view=diff&rev=519737&r1=519736&r2=519737
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/PartitionNexus.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/PartitionNexus.java Sun Mar 18 16:36:54 2007
@@ -31,6 +31,7 @@
 import javax.naming.ldap.LdapContext;
 
 import org.apache.directory.server.core.configuration.PartitionConfiguration;
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.schema.NoOpNormalizer;
 import org.apache.directory.shared.ldap.schema.OidNormalizer;
@@ -73,11 +74,6 @@
     private static final String UID_ATTRIBUTE_ALIAS = "userid";
     private static final String UID_ATTRIBUTE_OID = "0.9.2342.19200300.100.1.1";
     
-    /** OU attribute names and OID **/
-    private static final String OU_ATTRIBUTE = "ou";
-    private static final String OU_ATTRIBUTE_ALIAS = "organizationalUnitName";
-    private static final String OU_ATTRIBUTE_OID = "2.5.4.11";
-
     /**
      * System partition suffix constant.  Should be kept down to a single Dn name 
      * component or the default constructor will have to parse it instead of 
@@ -113,9 +109,9 @@
         	oidsMap.put( UID_ATTRIBUTE_ALIAS, new OidNormalizer( UID_ATTRIBUTE_OID, new NoOpNormalizer() ) );
         	oidsMap.put( UID_ATTRIBUTE_OID, new OidNormalizer( UID_ATTRIBUTE_OID, new NoOpNormalizer() ) );
         	
-        	oidsMap.put( OU_ATTRIBUTE, new OidNormalizer( OU_ATTRIBUTE_OID, new NoOpNormalizer()  ) );
-        	oidsMap.put( OU_ATTRIBUTE_ALIAS, new OidNormalizer( OU_ATTRIBUTE_OID, new NoOpNormalizer()  ) );
-        	oidsMap.put( OU_ATTRIBUTE_OID, new OidNormalizer( OU_ATTRIBUTE_OID, new NoOpNormalizer()  ) );
+        	oidsMap.put( SchemaConstants.OU_AT, new OidNormalizer( SchemaConstants.OU_AT_OID, new NoOpNormalizer()  ) );
+        	oidsMap.put( SchemaConstants.ORGANIZATIONAL_UNIT_NAME_AT, new OidNormalizer( SchemaConstants.OU_AT_OID, new NoOpNormalizer()  ) );
+        	oidsMap.put( SchemaConstants.OU_AT_OID, new OidNormalizer( SchemaConstants.OU_AT_OID, new NoOpNormalizer()  ) );
 
             adminDn.normalize( oidsMap );
         }

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/DescriptionParsers.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/DescriptionParsers.java?view=diff&rev=519737&r1=519736&r2=519737
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/DescriptionParsers.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/DescriptionParsers.java Sun Mar 18 16:36:54 2007
@@ -392,7 +392,8 @@
             {
                 for ( String superior : desc.getSuperiorObjectClasses() )
                 {
-                    if ( superior.equals( "2.5.6.0" ) || superior.equalsIgnoreCase( SchemaConstants.TOP_OC ) )
+                    if ( superior.equals( SchemaConstants.TOP_OC_OID ) || 
+                        superior.equalsIgnoreCase( SchemaConstants.TOP_OC ) )
                     {
                         continue;
                     }

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaSchemaHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaSchemaHandler.java?view=diff&rev=519737&r1=519736&r2=519737
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaSchemaHandler.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaSchemaHandler.java Sun Mar 18 16:36:54 2007
@@ -29,12 +29,11 @@
 import javax.naming.directory.Attributes;
 import javax.naming.directory.DirContext;
 
-import org.apache.directory.server.constants.CoreSchemaConstants;
 import org.apache.directory.server.constants.MetaSchemaConstants;
-import org.apache.directory.server.constants.SystemSchemaConstants;
 import org.apache.directory.server.schema.bootstrap.Schema;
 import org.apache.directory.server.schema.registries.Registries;
 import org.apache.directory.server.schema.registries.SchemaObjectRegistry;
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.exception.LdapInvalidNameException;
 import org.apache.directory.shared.ldap.exception.LdapOperationNotSupportedException;
 import org.apache.directory.shared.ldap.message.ModificationItemImpl;
@@ -68,9 +67,9 @@
         this.globalRegistries = globalRegistries;
         this.disabledAT = globalRegistries.getAttributeTypeRegistry().lookup( MetaSchemaConstants.M_DISABLED_AT );
         this.loader = loader;
-        this.OU_OID = globalRegistries.getOidRegistry().getOid( CoreSchemaConstants.OU_AT );
+        this.OU_OID = globalRegistries.getOidRegistry().getOid( SchemaConstants.OU_AT );
         this.factory = new SchemaEntityFactory( globalRegistries );
-        this.cnAT = globalRegistries.getAttributeTypeRegistry().lookup( SystemSchemaConstants.CN_AT );
+        this.cnAT = globalRegistries.getAttributeTypeRegistry().lookup( SchemaConstants.CN_AT );
         this.dependenciesAT = globalRegistries.getAttributeTypeRegistry()
             .lookup( MetaSchemaConstants.M_DEPENDENCIES_AT );
     }

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/PartitionSchemaLoader.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/PartitionSchemaLoader.java?view=diff&rev=519737&r1=519736&r2=519737
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/PartitionSchemaLoader.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/PartitionSchemaLoader.java Sun Mar 18 16:36:54 2007
@@ -40,13 +40,13 @@
 import javax.naming.directory.SearchResult;
 
 import org.apache.directory.server.constants.MetaSchemaConstants;
-import org.apache.directory.server.constants.SystemSchemaConstants;
 import org.apache.directory.server.core.partition.Partition;
 import org.apache.directory.server.schema.bootstrap.Schema;
 import org.apache.directory.server.schema.registries.AbstractSchemaLoader;
 import org.apache.directory.server.schema.registries.AttributeTypeRegistry;
 import org.apache.directory.server.schema.registries.Registries;
 import org.apache.directory.server.schema.registries.SchemaLoader;
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.Normalizer;
@@ -96,7 +96,7 @@
         this.dao = new SchemaPartitionDao( this.partition, bootstrapRegistries );
         this.mOidAT = bootstrapRegistries.getAttributeTypeRegistry().lookup( MetaSchemaConstants.M_OID_AT );
         this.mNameAT = bootstrapRegistries.getAttributeTypeRegistry().lookup( MetaSchemaConstants.M_NAME_AT );
-        this.cnAT = bootstrapRegistries.getAttributeTypeRegistry().lookup( SystemSchemaConstants.CN_AT );
+        this.cnAT = bootstrapRegistries.getAttributeTypeRegistry().lookup( SchemaConstants.CN_AT );
         this.byteCodeAT = bootstrapRegistries.getAttributeTypeRegistry().lookup( MetaSchemaConstants.M_BYTECODE_AT );
         this.descAT = bootstrapRegistries.getAttributeTypeRegistry().lookup( MetaSchemaConstants.M_DESCRIPTION_AT );
         this.fqcnAT = bootstrapRegistries.getAttributeTypeRegistry().lookup( MetaSchemaConstants.M_FQCN_AT );

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaEntityFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaEntityFactory.java?view=diff&rev=519737&r1=519736&r2=519737
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaEntityFactory.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaEntityFactory.java Sun Mar 18 16:36:54 2007
@@ -33,7 +33,6 @@
 import javax.naming.directory.BasicAttribute;
 
 import org.apache.directory.server.constants.MetaSchemaConstants;
-import org.apache.directory.server.constants.SystemSchemaConstants;
 import org.apache.directory.server.schema.bootstrap.Schema;
 import org.apache.directory.server.schema.registries.Registries;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
@@ -98,11 +97,11 @@
             throw new NullPointerException( "entry cannot be null" );
         }
         
-        if ( entry.get( SystemSchemaConstants.CN_AT ) == null )
+        if ( entry.get( SchemaConstants.CN_AT ) == null )
         {
             throw new NullPointerException( "entry must have a valid cn attribute" );
         }
-        name = ( String ) entry.get( SystemSchemaConstants.CN_AT ).get();
+        name = ( String ) entry.get( SchemaConstants.CN_AT ).get();
         
         if ( entry.get( SchemaConstants.CREATORS_NAME_AT ) == null )
         {

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDao.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDao.java?view=diff&rev=519737&r1=519736&r2=519737
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDao.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDao.java Sun Mar 18 16:36:54 2007
@@ -35,7 +35,6 @@
 import javax.naming.directory.SearchResult;
 
 import org.apache.directory.server.constants.MetaSchemaConstants;
-import org.apache.directory.server.constants.SystemSchemaConstants;
 import org.apache.directory.server.core.partition.Partition;
 import org.apache.directory.server.core.partition.PartitionNexus;
 import org.apache.directory.server.schema.bootstrap.Schema;
@@ -87,7 +86,11 @@
     private final static Logger log = LoggerFactory.getLogger( SchemaPartitionDao.class );
     private final static NumericOidSyntaxChecker NUMERIC_OID_CHECKER = new NumericOidSyntaxChecker();
     private static final String[] SCHEMA_ATTRIBUTES = new String[] { 
-        SchemaConstants.CREATORS_NAME_AT, "m-dependencies", SchemaConstants.OBJECT_CLASS_AT, "cn", "m-disabled" };
+        SchemaConstants.CREATORS_NAME_AT, 
+        "m-dependencies", 
+        SchemaConstants.OBJECT_CLASS_AT, 
+        SchemaConstants.CN_AT,
+        "m-disabled" };
 
 
     private final Partition partition;
@@ -130,7 +133,7 @@
         this.attrRegistry = this.bootstrapRegistries.getAttributeTypeRegistry();
         
         this.M_NAME_OID = oidRegistry.getOid( MetaSchemaConstants.M_NAME_AT );
-        this.CN_OID = oidRegistry.getOid( SystemSchemaConstants.CN_AT );
+        this.CN_OID = oidRegistry.getOid( SchemaConstants.CN_AT );
         this.disabledAttributeType = attrRegistry.lookup( MetaSchemaConstants.M_DISABLED_AT );
         this.M_OID_OID = oidRegistry.getOid( MetaSchemaConstants.M_OID_AT );
         this.OBJECTCLASS_OID = oidRegistry.getOid( SchemaConstants.OBJECT_CLASS_AT );
@@ -170,7 +173,7 @@
         while( list.hasMore() )
         {
             SearchResult sr = ( SearchResult ) list.next();
-            schemaNames.add( ( String ) sr.getAttributes().get( "cn" ).get() );
+            schemaNames.add( ( String ) sr.getAttributes().get( SchemaConstants.CN_AT ).get() );
         }
         
         return schemaNames;

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java?view=diff&rev=519737&r1=519736&r2=519737
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java Sun Mar 18 16:36:54 2007
@@ -512,7 +512,7 @@
                 PresenceNode node = ( PresenceNode ) filter;
 
                 // see if node attribute is objectClass
-                if ( node.getAttribute().equalsIgnoreCase( "2.5.4.0" ) )
+                if ( node.getAttribute().equals( SchemaConstants.OBJECT_CLASS_AT_OID ) )
                 {
                     // call.setBypass( true );
                     Attributes attrs = getSubschemaEntry( searchCtls.getReturningAttributes() );
@@ -540,7 +540,7 @@
             ids = EMPTY_STRING_ARRAY;
         }
 
-        Set<String> set = new HashSet<String>();
+        Set<String> setOids = new HashSet<String>();
         AttributesImpl attrs = new AttributesImpl();
         AttributeImpl attr;
         boolean returnAllOperationalAttributes = false;
@@ -557,15 +557,15 @@
             }
             else if ( "*".equals(  id ) )
             {
-                set.add( id );
+                setOids.add( id );
             }
             else
             {
-                set.add( registries.getOidRegistry().getOid( id ) );
+                setOids.add( registries.getOidRegistry().getOid( id ) );
             }
         }
-
-        if ( returnAllOperationalAttributes || set.contains( "comparators" ) )
+        
+        if ( returnAllOperationalAttributes || setOids.contains( "comparators" ) )
         {
             attr = new AttributeImpl( "comparators" );
             Iterator<ComparatorDescription> list = registries.getComparatorRegistry().comparatorDescriptionIterator();
@@ -579,7 +579,7 @@
             attrs.put( attr );
         }
         
-        if ( returnAllOperationalAttributes || set.contains( "normalizers" ) )
+        if ( returnAllOperationalAttributes || setOids.contains( "normalizers" ) )
         {
             attr = new AttributeImpl( "normalizers" );
             Iterator<NormalizerDescription> list = registries.getNormalizerRegistry().normalizerDescriptionIterator();
@@ -593,7 +593,7 @@
             attrs.put( attr );
         }
 
-        if ( returnAllOperationalAttributes || set.contains( "syntaxCheckers" ) )
+        if ( returnAllOperationalAttributes || setOids.contains( "syntaxCheckers" ) )
         {
             attr = new AttributeImpl( "syntaxCheckers" );
             Iterator<SyntaxCheckerDescription> list = 
@@ -608,7 +608,7 @@
             attrs.put( attr );
         }
 
-        if ( returnAllOperationalAttributes || set.contains( SchemaConstants.OBJECT_CLASSES_AT_OID ) )
+        if ( returnAllOperationalAttributes || setOids.contains( SchemaConstants.OBJECT_CLASSES_AT_OID ) )
         {
             attr = new AttributeImpl( SchemaConstants.OBJECT_CLASSES_AT );
             Iterator<ObjectClass> list = registries.getObjectClassRegistry().iterator();
@@ -622,7 +622,7 @@
             attrs.put( attr );
         }
 
-        if ( returnAllOperationalAttributes || set.contains( SchemaConstants.ATTRIBUTE_TYPES_AT ) )
+        if ( returnAllOperationalAttributes || setOids.contains( SchemaConstants.ATTRIBUTE_TYPES_AT_OID ) )
         {
             attr = new AttributeImpl( SchemaConstants.ATTRIBUTE_TYPES_AT );
             Iterator<AttributeType> list = registries.getAttributeTypeRegistry().iterator();
@@ -636,7 +636,7 @@
             attrs.put( attr );
         }
 
-        if ( returnAllOperationalAttributes || set.contains( SchemaConstants.MATCHING_RULES_AT ) )
+        if ( returnAllOperationalAttributes || setOids.contains( SchemaConstants.MATCHING_RULES_AT_OID ) )
         {
             attr = new AttributeImpl( SchemaConstants.MATCHING_RULES_AT );
             Iterator<MatchingRule> list = registries.getMatchingRuleRegistry().iterator();
@@ -650,7 +650,7 @@
             attrs.put( attr );
         }
 
-        if ( returnAllOperationalAttributes || set.contains( SchemaConstants.MATCHING_RULE_USE_AT ) )
+        if ( returnAllOperationalAttributes || setOids.contains( SchemaConstants.MATCHING_RULE_USE_AT ) )
         {
             attr = new AttributeImpl( SchemaConstants.MATCHING_RULE_USE_AT );
             Iterator list = registries.getMatchingRuleUseRegistry().iterator();
@@ -664,7 +664,7 @@
             attrs.put( attr );
         }
 
-        if ( returnAllOperationalAttributes || set.contains( SchemaConstants.LDAP_SYNTAXES_AT ) )
+        if ( returnAllOperationalAttributes || setOids.contains( SchemaConstants.LDAP_SYNTAXES_AT ) )
         {
             attr = new AttributeImpl( SchemaConstants.LDAP_SYNTAXES_AT );
             Iterator<Syntax> list = registries.getSyntaxRegistry().iterator();
@@ -678,7 +678,7 @@
             attrs.put( attr );
         }
 
-        if ( returnAllOperationalAttributes || set.contains( SchemaConstants.DIT_CONTENT_RULES_AT ) )
+        if ( returnAllOperationalAttributes || setOids.contains( SchemaConstants.DIT_CONTENT_RULES_AT ) )
         {
             attr = new AttributeImpl( SchemaConstants.DIT_CONTENT_RULES_AT );
             Iterator<DITContentRule> list = registries.getDitContentRuleRegistry().iterator();
@@ -692,7 +692,7 @@
             attrs.put( attr );
         }
 
-        if ( returnAllOperationalAttributes || set.contains( SchemaConstants.DIT_STRUCTURE_RULES_AT ) )
+        if ( returnAllOperationalAttributes || setOids.contains( SchemaConstants.DIT_STRUCTURE_RULES_AT ) )
         {
             attr = new AttributeImpl( SchemaConstants.DIT_STRUCTURE_RULES_AT );
             Iterator list = registries.getDitStructureRuleRegistry().iterator();
@@ -706,7 +706,7 @@
             attrs.put( attr );
         }
 
-        if ( returnAllOperationalAttributes || set.contains( SchemaConstants.NAME_FORMS_AT_OID ) )
+        if ( returnAllOperationalAttributes || setOids.contains( SchemaConstants.NAME_FORMS_AT_OID ) )
         {
             attr = new AttributeImpl( SchemaConstants.NAME_FORMS_AT );
             Iterator list = registries.getNameFormRegistry().iterator();
@@ -720,7 +720,7 @@
             attrs.put( attr );
         }
 
-        if ( returnAllOperationalAttributes || set.contains( "subtreespecification" ) )
+        if ( returnAllOperationalAttributes || setOids.contains( "subtreespecification" ) )
         {
             attr = new AttributeImpl( "subtreeSpecification", "{}" );
             attrs.put( attr );
@@ -728,23 +728,25 @@
         
         int minSetSize = 0;
         
-        if ( set.contains( "+" ) )
+        if ( setOids.contains( "+" ) )
         {
             minSetSize++;
         }
         
-        if ( set.contains( "*" ) )
+        if ( setOids.contains( "*" ) )
         {
             minSetSize++;
         }
         
-        if ( set.contains( "ref" ) )
+        if ( setOids.contains( "ref" ) )
         {
             minSetSize++;
         }
 
         // add the objectClass attribute
-        if ( set.contains( "*" ) || set.contains( SchemaConstants.OBJECT_CLASS_AT ) || set.size() == minSetSize )
+        if ( setOids.contains( "*" ) || 
+             setOids.contains( SchemaConstants.OBJECT_CLASS_AT_OID ) || 
+             setOids.size() == minSetSize )
         {
             attr = new AttributeImpl( SchemaConstants.OBJECT_CLASS_AT );
             attr.add( SchemaConstants.TOP_OC );
@@ -755,9 +757,11 @@
         }
 
         // add the cn attribute as required for the RDN
-        if ( set.contains( "*" ) || set.contains( "cn" ) || set.contains( "commonname" ) || set.size() == minSetSize )
+        if ( setOids.contains( "*" ) || 
+             setOids.contains( SchemaConstants.CN_AT_OID ) || 
+             setOids.size() == minSetSize )
         {
-            attrs.put( "cn", "schema" );
+            attrs.put( SchemaConstants.CN_AT, "schema" );
         }
 
         // -------------------------------------------------------------------
@@ -769,7 +773,7 @@
 
         Attributes modificationAttributes = nexus.lookup( schemaModificationAttributesDN );
         
-        if ( returnAllOperationalAttributes || set.contains( SchemaConstants.CREATE_TIMESTAMP_AT ) )
+        if ( returnAllOperationalAttributes || setOids.contains( SchemaConstants.CREATE_TIMESTAMP_AT ) )
         {
             attr = new AttributeImpl( SchemaConstants.CREATE_TIMESTAMP_AT );
             AttributeType createTimestampAT = registries.
@@ -779,14 +783,14 @@
             attrs.put( attr );
         }
 
-        if ( returnAllOperationalAttributes || set.contains( SchemaConstants.CREATORS_NAME_AT ) )
+        if ( returnAllOperationalAttributes || setOids.contains( SchemaConstants.CREATORS_NAME_AT ) )
         {
             attr = new AttributeImpl( SchemaConstants.CREATORS_NAME_AT );
             attr.add( PartitionNexus.ADMIN_PRINCIPAL );
             attrs.put( attr );
         }
         
-        if ( returnAllOperationalAttributes || set.contains( SchemaConstants.MODIFY_TIMESTAMP_AT ) )
+        if ( returnAllOperationalAttributes || setOids.contains( SchemaConstants.MODIFY_TIMESTAMP_AT ) )
         {
             attr = new AttributeImpl( SchemaConstants.MODIFY_TIMESTAMP_AT );
             AttributeType schemaModifyTimestampAT = registries.
@@ -797,7 +801,7 @@
             attrs.put( attr );
         }
 
-        if ( returnAllOperationalAttributes || set.contains( SchemaConstants.MODIFIERS_NAME_AT ) )
+        if ( returnAllOperationalAttributes || setOids.contains( SchemaConstants.MODIFIERS_NAME_AT ) )
         {
             attr = new AttributeImpl( SchemaConstants.MODIFIERS_NAME_AT );
             AttributeType schemaModifiersNameAT = registries.

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/subtree/SubentryService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/subtree/SubentryService.java?view=diff&rev=519737&r1=519736&r2=519737
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/subtree/SubentryService.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/subtree/SubentryService.java Sun Mar 18 16:36:54 2007
@@ -434,7 +434,7 @@
             LdapDN baseDn = ( LdapDN ) apName.clone();
             baseDn.addAll( ss.getBase() );
 
-            ExprNode filter = new PresenceNode( "2.5.4.0" ); // (objectClass=*)
+            ExprNode filter = new PresenceNode( SchemaConstants.OBJECT_CLASS_AT_OID ); // (objectClass=*)
             SearchControls controls = new SearchControls();
             controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
             controls.setReturningAttributes( new String[]

Modified: directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/GetAllPrincipals.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/GetAllPrincipals.java?view=diff&rev=519737&r1=519736&r2=519737
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/GetAllPrincipals.java (original)
+++ directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/GetAllPrincipals.java Sun Mar 18 16:36:54 2007
@@ -38,6 +38,7 @@
 import org.apache.directory.server.kerberos.shared.store.PrincipalStoreEntry;
 import org.apache.directory.server.kerberos.shared.store.PrincipalStoreEntryModifier;
 import org.apache.directory.server.protocol.shared.store.ContextOperation;
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 
 
 /**
@@ -103,7 +104,7 @@
         String encryptionType = ( String ) attrs.get( KerberosAttribute.TYPE ).get();
         String keyVersionNumber = ( String ) attrs.get( KerberosAttribute.VERSION ).get();
 
-        String commonName = ( String ) attrs.get( "cn" ).get();
+        String commonName = ( String ) attrs.get( SchemaConstants.CN_AT ).get();
 
         if ( attrs.get( "apacheSamType" ) != null )
         {

Modified: directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/PrincipalObjectFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/PrincipalObjectFactory.java?view=diff&rev=519737&r1=519736&r2=519737
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/PrincipalObjectFactory.java (original)
+++ directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/PrincipalObjectFactory.java Sun Mar 18 16:36:54 2007
@@ -54,7 +54,7 @@
         PrincipalStoreEntryModifier modifier = new PrincipalStoreEntryModifier();
 
         modifier.setUserId( ( String ) attrs.get( "uid" ).get() );
-        modifier.setCommonName( ( String ) attrs.get( "cn" ).get() );
+        modifier.setCommonName( ( String ) attrs.get( SchemaConstants.CN_AT ).get() );
 
         KerberosPrincipal principal = new KerberosPrincipal( ( String ) attrs.get( KerberosAttribute.PRINCIPAL ).get() );
         modifier.setPrincipal( principal );

Modified: directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/PrincipalStateFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/PrincipalStateFactory.java?view=diff&rev=519737&r1=519736&r2=519737
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/PrincipalStateFactory.java (original)
+++ directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/PrincipalStateFactory.java Sun Mar 18 16:36:54 2007
@@ -103,7 +103,7 @@
 
                 // TODO - look into adding sn, gn, and cn to ServerProfiles
                 outAttrs.put( "sn", p.getUserId() );
-                outAttrs.put( "cn", p.getCommonName() );
+                outAttrs.put( SchemaConstants.CN_AT, p.getCommonName() );
             }
 
             if ( !oc.contains( "organizationalPerson" ) )

Modified: directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/common/Constants.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/common/Constants.java?view=diff&rev=519737&r1=519736&r2=519737
==============================================================================
--- directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/common/Constants.java (original)
+++ directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/common/Constants.java Sun Mar 18 16:36:54 2007
@@ -56,12 +56,6 @@
     public static final String ENTRY_DELETED = "entryDeleted";
     
     /**
-     * The OID of <tt>objectClass</tt> class.
-     */
-    public static final String OBJECT_CLASS_OID = "2.5.4.0";
-
-    
-    /**
      * A {@link SearchResultFilter} that filters out the entries whose
      * {@link #ENTRY_DELETED} attribute is <tt>true</tt>.
      */

Modified: directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/operation/OperationFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/operation/OperationFactory.java?view=diff&rev=519737&r1=519736&r2=519737
==============================================================================
--- directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/operation/OperationFactory.java (original)
+++ directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/operation/OperationFactory.java Sun Mar 18 16:36:54 2007
@@ -34,6 +34,7 @@
 
 import org.apache.directory.server.core.DirectoryServiceConfiguration;
 import org.apache.directory.server.core.partition.PartitionNexus;
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.filter.PresenceNode;
 import org.apache.directory.shared.ldap.message.AttributeImpl;
 import org.apache.directory.shared.ldap.message.ModificationItemImpl;
@@ -273,7 +274,7 @@
         // Retrieve all subtree including the base entry
         SearchControls ctrl = new SearchControls();
         ctrl.setSearchScope( SearchControls.SUBTREE_SCOPE );
-        NamingEnumeration e = nexus.search( oldName, environment, new PresenceNode( Constants.OBJECT_CLASS_OID ), ctrl );
+        NamingEnumeration e = nexus.search( oldName, environment, new PresenceNode( SchemaConstants.OBJECT_CLASS_AT_OID ), ctrl );
 
         while ( e.hasMore() )
         {

Modified: directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/service/ReplicationService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/service/ReplicationService.java?view=diff&rev=519737&r1=519736&r2=519737
==============================================================================
--- directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/service/ReplicationService.java (original)
+++ directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/service/ReplicationService.java Sun Mar 18 16:36:54 2007
@@ -59,6 +59,7 @@
 import org.apache.directory.server.core.invocation.InvocationStack;
 import org.apache.directory.server.core.partition.PartitionNexus;
 import org.apache.directory.server.schema.registries.AttributeTypeRegistry;
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.exception.LdapNameNotFoundException;
 import org.apache.directory.shared.ldap.filter.ExprNode;
 import org.apache.directory.shared.ldap.filter.FilterParser;
@@ -483,7 +484,7 @@
         DirContext ctx = ( DirContext ) InvocationStack.getInstance().peek().getCaller();
         NamingEnumeration e = nextInterceptor.search(
                 baseName, ctx.getEnvironment(),
-                new PresenceNode( Constants.OBJECT_CLASS_OID ),
+                new PresenceNode( SchemaConstants.OBJECT_CLASS_AT_OID ),
                 new SearchControls() );
 
         return new SearchResultFilteringEnumeration( e, new SearchControls(), InvocationStack.getInstance().peek(),

Modified: directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/service/protocol/handler/ReplicationClientContextHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/service/protocol/handler/ReplicationClientContextHandler.java?view=diff&rev=519737&r1=519736&r2=519737
==============================================================================
--- directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/service/protocol/handler/ReplicationClientContextHandler.java (original)
+++ directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/service/protocol/handler/ReplicationClientContextHandler.java Sun Mar 18 16:36:54 2007
@@ -53,6 +53,7 @@
 import org.apache.directory.mitosis.service.protocol.message.LoginMessage;
 import org.apache.directory.mitosis.store.ReplicationLogIterator;
 import org.apache.directory.mitosis.store.ReplicationStore;
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.filter.PresenceNode;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.mina.common.IdleStatus;
@@ -353,7 +354,7 @@
         ctrl.setSearchScope( SearchControls.SUBTREE_SCOPE );
         NamingEnumeration e = ctx.getServiceConfiguration().getPartitionNexus().search( contextName,
             ctx.getServiceConfiguration().getEnvironment(),
-            new PresenceNode( org.apache.directory.mitosis.common.Constants.OBJECT_CLASS_OID ), ctrl );
+            new PresenceNode( SchemaConstants.OBJECT_CLASS_AT_OID ), ctrl );
 
         try
         {

Modified: directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/store/DnsAttribute.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/store/DnsAttribute.java?view=diff&rev=519737&r1=519736&r2=519737
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/store/DnsAttribute.java (original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/store/DnsAttribute.java Sun Mar 18 16:36:54 2007
@@ -32,9 +32,6 @@
      * Apache DNS Schema Attributes
      */
 
-    /** the apachedns schema common name for an Apache DNS entry */
-    public static final String CN = "cn";
-
     /**
      * An abstract DNS record objectClass used to build other specific structural
      * objectclasses for different record types

Modified: directory/apacheds/trunk/server-jndi/src/main/java/org/apache/directory/server/jndi/ServerContextFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-jndi/src/main/java/org/apache/directory/server/jndi/ServerContextFactory.java?view=diff&rev=519737&r1=519736&r2=519737
==============================================================================
--- directory/apacheds/trunk/server-jndi/src/main/java/org/apache/directory/server/jndi/ServerContextFactory.java (original)
+++ directory/apacheds/trunk/server-jndi/src/main/java/org/apache/directory/server/jndi/ServerContextFactory.java Sun Mar 18 16:36:54 2007
@@ -220,7 +220,7 @@
 
     private void ensureLdifFileBase( DirContext root )
     {
-        Attributes entry = new AttributesImpl( "ou", "loadedLdifFiles", true );
+        Attributes entry = new AttributesImpl( SchemaConstants.OU_AT, "loadedLdifFiles", true );
         entry.put( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC );
         entry.get( SchemaConstants.OBJECT_CLASS_AT ).add( SchemaConstants.ORGANIZATIONAL_UNIT_OC );
         try

Modified: directory/apacheds/trunk/utils/src/main/java/org/apache/directory/server/utils/AttributesFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/utils/src/main/java/org/apache/directory/server/utils/AttributesFactory.java?view=diff&rev=519737&r1=519736&r2=519737
==============================================================================
--- directory/apacheds/trunk/utils/src/main/java/org/apache/directory/server/utils/AttributesFactory.java (original)
+++ directory/apacheds/trunk/utils/src/main/java/org/apache/directory/server/utils/AttributesFactory.java Sun Mar 18 16:36:54 2007
@@ -98,7 +98,7 @@
     {
         Attributes entry = new AttributesImpl( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC, true );
         entry.get( SchemaConstants.OBJECT_CLASS_AT ).add( MetaSchemaConstants.META_SCHEMA_OC );
-        entry.put( SystemSchemaConstants.CN_AT, schema.getSchemaName() );
+        entry.put( SchemaConstants.CN_AT, schema.getSchemaName() );
         entry.put( SchemaConstants.CREATORS_NAME_AT, schema.getOwner() );
         entry.put( SchemaConstants.CREATE_TIMESTAMP_AT, DateUtils.getGeneralizedTime() );
         

Modified: directory/shared/trunk/ldap-constants/src/main/java/org/apache/directory/shared/ldap/constants/SchemaConstants.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap-constants/src/main/java/org/apache/directory/shared/ldap/constants/SchemaConstants.java?view=diff&rev=519737&r1=519736&r2=519737
==============================================================================
--- directory/shared/trunk/ldap-constants/src/main/java/org/apache/directory/shared/ldap/constants/SchemaConstants.java (original)
+++ directory/shared/trunk/ldap-constants/src/main/java/org/apache/directory/shared/ldap/constants/SchemaConstants.java Sun Mar 18 16:36:54 2007
@@ -29,42 +29,89 @@
  */
 public class SchemaConstants
 {
-    // ---- ObjectClasses ----
+    // ---- ObjectClasses -----------------------------------------------------
     public static final String SUBENTRY_OC = "subentry";
     
-    // top
+    // Top
     public static final String TOP_OC = "top";
     public static final String TOP_OC_OID = "2.5.6.0";
     
-    // subschema
+    // Subschema
     public static final String SUBSCHEMA_OC = "subschema";
     public static final String SUBSCHEMA_OC_OID = "2.5.20.1";
     
+    // ExtensibleObject
     public static final String EXTENSIBLE_OBJECT_OC = "extensibleObject";
+    public static final String EXTENSIBLE_OBJECT_OC_OID = "1.3.6.1.4.1.1466.101.120.111";
+
+    // OrganizationalUnit
     public static final String ORGANIZATIONAL_UNIT_OC = "organizationalUnit";
+    public static final String ORGANIZATIONAL_UNIT_OC_OID = "2.5.6.5";
     
-    // ---- AttributeTypes ----
+    // ---- AttributeTypes ----------------------------------------------------
     // ObjectClass
     public static final String OBJECT_CLASS_AT = "objectClass";
     public static final String OBJECT_CLASS_AT_OID = "2.5.4.0";
     
-    public static final String CREATORS_NAME_AT = "creatorsName";
+    // Cn
+    public static final String CN_AT = "cn";
+    public static final String COMMON_NAME_AT = "commonName";
+    public static final String CN_AT_OID = "2.5.4.3";
+    
+    // Ou
+    public static final String OU_AT = "ou";
+    public static final String ORGANIZATIONAL_UNIT_NAME_AT = "organizationalUnitName";
+    public static final String OU_AT_OID = "2.5.4.11";
+    
+    // CreateTimestamp
     public static final String CREATE_TIMESTAMP_AT = "createTimestamp";
+    public static final String CREATE_TIMESTAMP_AT_OID = "2.5.18.1";
     
-    // ObjectClasses
-    public static final String OBJECT_CLASSES_AT = "objectClasses";
-    public static final String OBJECT_CLASSES_AT_OID = "2.5.21.6";
-
+    // ModifyTimestamp
     public static final String MODIFY_TIMESTAMP_AT = "modifyTimestamp";
+    public static final String MODIFY_TIMESTAMP_AT_OID = "2.5.18.2";
+    
+    // CreatorsName
+    public static final String CREATORS_NAME_AT = "creatorsName";
+    public static final String CREATORS_NAME_AT_OID = "2.5.18.3";
+    
+    // ModifiersName
     public static final String MODIFIERS_NAME_AT = "modifiersName";
-    public static final String LDAP_SYNTAXES_AT = "ldapSyntaxes";
-    public static final String MATCHING_RULES_AT = "matchingRules";
-    public static final String ATTRIBUTE_TYPES_AT = "attributeTypes";
-    public static final String MATCHING_RULE_USE_AT = "matchingRuleUse";
+    public static final String MODIFIERS_NAME_AT_OID = "2.5.18.4";
+
+    // DitStructureRules
     public static final String DIT_STRUCTURE_RULES_AT = "ditStructureRules";
+    public static final String DIT_STRUCTURE_RULES_AT_OID = "2.5.21.1";
+    
+    // DitContentRules
     public static final String DIT_CONTENT_RULES_AT = "ditContentRules";
+    public static final String DIT_CONTENT_RULES_AT_OID = "2.5.21.2";
+    
+    // MatchingRules
+    public static final String MATCHING_RULES_AT = "matchingRules";
+    public static final String MATCHING_RULES_AT_OID = "2.5.21.4";
     
+    // AttributeTypes
+    public static final String ATTRIBUTE_TYPES_AT = "attributeTypes";
+    public static final String ATTRIBUTE_TYPES_AT_OID = "2.5.21.5";
+    
+    // ObjectClasses
+    public static final String OBJECT_CLASSES_AT = "objectClasses";
+    public static final String OBJECT_CLASSES_AT_OID = "2.5.21.6";
+
     // NameForms
     public static final String NAME_FORMS_AT = "nameForms";
     public static final String NAME_FORMS_AT_OID = "2.5.21.7";
+
+    // MatchingRuleUse
+    public static final String MATCHING_RULE_USE_AT = "matchingRuleUse";
+    public static final String MATCHING_RULE_USE_AT_OID = "2.5.21.8";
+    
+    // StructuralObjectClass
+    public static final String STRUCTURAL_OBJECT_CLASS_AT = "structuralObjectClass";
+    public static final String STRUCTURAL_OBJECT_CLASS_AT_OID = "2.5.21.9";
+    
+    // LdapSyntaxes
+    public static final String LDAP_SYNTAXES_AT = "ldapSyntaxes";
+    public static final String LDAP_SYNTAXES_AT_OID = "1.3.6.1.4.1.1466.101.120.16";
 }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/trigger/TriggerUtils.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/trigger/TriggerUtils.java?view=diff&rev=519737&r1=519736&r2=519737
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/trigger/TriggerUtils.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/trigger/TriggerUtils.java Sun Mar 18 16:36:54 2007
@@ -68,7 +68,7 @@
         String subtreeSpec,
         String prescriptiveTriggerSpec ) throws NamingException
     {
-        Attributes subentry = new AttributesImpl( "cn", subentryCN, true );
+        Attributes subentry = new AttributesImpl( SchemaConstants.CN_AT, subentryCN, true );
         Attribute objectClass = new AttributeImpl( SchemaConstants.OBJECT_CLASS_AT );
         subentry.put( objectClass );
         objectClass.add( SchemaConstants.TOP_OC );



Mime
View raw message