directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r519266 [1/2] - in /directory: apacheds/trunk/constants/src/main/java/org/apache/directory/server/constants/ apacheds/trunk/core-unit/src/main/java/org/apache/directory/server/core/unit/ apacheds/trunk/core/src/main/java/org/apache/director...
Date Sat, 17 Mar 2007 08:51:59 GMT
Author: elecharny
Date: Sat Mar 17 01:51:57 2007
New Revision: 519266

URL: http://svn.apache.org/viewvc?view=rev&rev=519266
Log:
Removed the "objectClass" from the code (except from tests and antlr files) and replaced it by 
a reference to the constant declared in the new SchemaConstants class in shared-ldap-constants

Modified:
    directory/apacheds/trunk/constants/src/main/java/org/apache/directory/server/constants/SystemSchemaConstants.java
    directory/apacheds/trunk/core-unit/src/main/java/org/apache/directory/server/core/unit/AbstractPerformanceTest.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/authz/AuthorizationService.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilter.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributesSchemaChecker.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/exception/ExceptionService.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/jndi/JavaLdapSupport.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/jndi/ServerDirContext.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/impl/btree/gui/AddEntryDialog.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/prefs/ServerSystemPreferences.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/referral/ReferralService.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaChecker.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaManager.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/sp/LdapClassLoader.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/subtree/RefinementEvaluator.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/subtree/RefinementLeafEvaluator.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/subtree/SubentryService.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/trigger/TriggerService.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/trigger/TriggerSpecCache.java
    directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.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/operation/support/EntryUtil.java
    directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/store/operations/GetRecords.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/SearchHandler.java
    directory/apacheds/trunk/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/AbstractBackingStoreTest.java
    directory/apacheds/trunk/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/store/Krb5KdcEntryFilter.java
    directory/apacheds/trunk/server-jndi/src/main/java/org/apache/directory/server/jndi/ServerContextFactory.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/filter/SimpleNode.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/sp/JavaStoredProcedureUtils.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/trigger/TriggerUtils.java

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=519266&r1=519265&r2=519266
==============================================================================
--- 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 Sat Mar 17 01:51:57 2007
@@ -31,7 +31,6 @@
     String SCHEMA_NAME = "system";
 
     String CN_AT = "cn";
-    String SYSTEM_OBJECT_CLASS_AT = "objectClass";
     String CREATORS_NAME_AT = "creatorsName";
     String CREATE_TIMESTAMP_AT = "createTimestamp";
     String MODIFY_TIMESTAMP_AT = "modifyTimestamp";

Modified: directory/apacheds/trunk/core-unit/src/main/java/org/apache/directory/server/core/unit/AbstractPerformanceTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-unit/src/main/java/org/apache/directory/server/core/unit/AbstractPerformanceTest.java?view=diff&rev=519266&r1=519265&r2=519266
==============================================================================
--- directory/apacheds/trunk/core-unit/src/main/java/org/apache/directory/server/core/unit/AbstractPerformanceTest.java (original)
+++ directory/apacheds/trunk/core-unit/src/main/java/org/apache/directory/server/core/unit/AbstractPerformanceTest.java Sat Mar 17 01:51:57 2007
@@ -38,6 +38,7 @@
 import org.apache.directory.server.core.configuration.MutablePartitionConfiguration;
 import org.apache.directory.server.core.configuration.PartitionConfiguration;
 import org.apache.directory.server.core.partition.PartitionNexus;
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.ldif.Entry;
 import org.apache.directory.shared.ldap.ldif.LdifReader;
 import org.apache.directory.shared.ldap.message.AttributesImpl;
@@ -141,11 +142,11 @@
             HashSet<Object> indexedAttributes = new HashSet<Object>();
             indexedAttributes.add( "ou" );
             indexedAttributes.add( "uid" );
-            indexedAttributes.add( "objectClass" );
+            indexedAttributes.add( SchemaConstants.OBJECT_CLASS_AT );
             
             // Build the root entry for the new partition
-            Attributes attributes = new AttributesImpl( "objectClass", "top", true );
-            attributes.get( "objectClass" ).add( "organizationalUnit" );
+            Attributes attributes = new AttributesImpl( SchemaConstants.OBJECT_CLASS_AT, "top", true );
+            attributes.get( SchemaConstants.OBJECT_CLASS_AT ).add( "organizationalUnit" );
             attributes.put( "ou", "test" );
             
             // Add apache.org paritition since all work will be done here

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=519266&r1=519265&r2=519266
==============================================================================
--- 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 Sat Mar 17 01:51:57 2007
@@ -63,6 +63,7 @@
 import org.apache.directory.server.schema.registries.DefaultRegistries;
 import org.apache.directory.server.schema.registries.OidRegistry;
 import org.apache.directory.server.schema.registries.Registries;
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.exception.LdapAuthenticationNotSupportedException;
 import org.apache.directory.shared.ldap.exception.LdapConfigurationException;
 import org.apache.directory.shared.ldap.exception.LdapNoPermissionException;
@@ -455,7 +456,7 @@
             firstStart = true;
 
             Attributes attributes = new AttributesImpl();
-            Attribute objectClass = new AttributeImpl( "objectClass" );
+            Attribute objectClass = new AttributeImpl( SchemaConstants.OBJECT_CLASS_AT );
             objectClass.add( "top" );
             objectClass.add( "person" );
             objectClass.add( "organizationalPerson" );
@@ -488,7 +489,7 @@
             firstStart = true;
 
             Attributes attributes = new AttributesImpl();
-            Attribute objectClass = new AttributeImpl( "objectClass" );
+            Attribute objectClass = new AttributeImpl( SchemaConstants.OBJECT_CLASS_AT );
             objectClass.add( "top" );
             objectClass.add( "organizationalUnit" );
             attributes.put( objectClass );
@@ -512,7 +513,7 @@
             firstStart = true;
 
             Attributes attributes = new AttributesImpl();
-            Attribute objectClass = new AttributeImpl( "objectClass" );
+            Attribute objectClass = new AttributeImpl( SchemaConstants.OBJECT_CLASS_AT );
             objectClass.add( "top" );
             objectClass.add( "organizationalUnit" );
             attributes.put( objectClass );
@@ -537,7 +538,7 @@
             firstStart = true;
 
             Attributes attributes = new AttributesImpl();
-            Attribute objectClass = new AttributeImpl( "objectClass" );
+            Attribute objectClass = new AttributeImpl( SchemaConstants.OBJECT_CLASS_AT );
             objectClass.add( "top" );
             objectClass.add( "groupOfUniqueNames" );
             attributes.put( objectClass );
@@ -581,7 +582,7 @@
             firstStart = true;
 
             Attributes attributes = new AttributesImpl();
-            Attribute objectClass = new AttributeImpl( "objectClass" );
+            Attribute objectClass = new AttributeImpl( SchemaConstants.OBJECT_CLASS_AT );
             objectClass.add( "top" );
             objectClass.add( "organizationalUnit" );
             attributes.put( objectClass );
@@ -605,7 +606,7 @@
             firstStart = true;
 
             Attributes attributes = new AttributesImpl();
-            Attribute objectClass = new AttributeImpl( "objectClass" );
+            Attribute objectClass = new AttributeImpl( SchemaConstants.OBJECT_CLASS_AT );
             objectClass.add( "top" );
             objectClass.add( "organizationalUnit" );
             attributes.put( objectClass );
@@ -629,7 +630,7 @@
             firstStart = true;
 
             Attributes attributes = new AttributesImpl();
-            Attribute objectClass = new AttributeImpl( "objectClass" );
+            Attribute objectClass = new AttributeImpl( SchemaConstants.OBJECT_CLASS_AT );
             objectClass.add( "top" );
             objectClass.add( "organizationalUnit" );
             attributes.put( objectClass );
@@ -653,7 +654,7 @@
             firstStart = true;
 
             Attributes attributes = new AttributesImpl();
-            Attribute objectClass = new AttributeImpl( "objectClass" );
+            Attribute objectClass = new AttributeImpl( SchemaConstants.OBJECT_CLASS_AT );
             objectClass.add( "top" );
             objectClass.add( "organizationalUnit" );
             attributes.put( objectClass );
@@ -677,12 +678,12 @@
             firstStart = true;
 
             Attributes attributes = new AttributesImpl();
-            Attribute objectClass = new AttributeImpl( "objectClass" );
+            Attribute objectClass = new AttributeImpl( SchemaConstants.OBJECT_CLASS_AT );
             objectClass.add( "top" );
             objectClass.add( "organizationalUnit" );
             attributes.put( objectClass );
 
-            attributes.put( "objectClass", "extensibleObject" );
+            attributes.put( SchemaConstants.OBJECT_CLASS_AT, "extensibleObject" );
             attributes.put( "prefNodeName", "sysPrefRoot" );
             attributes.put( "creatorsName", PartitionNexus.ADMIN_PRINCIPAL_NORMALIZED );
             attributes.put( "createTimestamp", DateUtils.getGeneralizedTime() );
@@ -830,8 +831,8 @@
         schemaPartitionConfig.setSuffix( "ou=schema" );
         
         Attributes entry = new AttributesImpl();
-        entry.put( "objectClass", "top" );
-        entry.get( "objectClass" ).add( "organizationalUnit" );
+        entry.put( SchemaConstants.OBJECT_CLASS_AT, "top" );
+        entry.get( SchemaConstants.OBJECT_CLASS_AT ).add( "organizationalUnit" );
         entry.put( "ou", "schema" );
         schemaPartitionConfig.setContextEntry( entry );
         JdbmPartition schemaPartition = new JdbmPartition();

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/AuthorizationService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/AuthorizationService.java?view=diff&rev=519266&r1=519265&r2=519266
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/AuthorizationService.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/AuthorizationService.java Sat Mar 17 01:51:57 2007
@@ -182,7 +182,7 @@
         OidRegistry oidRegistry = factoryCfg.getRegistries().getOidRegistry();
         
         // look up some constant information
-        objectClassOid = oidRegistry.getOid( "objectClass" );
+        objectClassOid = oidRegistry.getOid( SchemaConstants.OBJECT_CLASS_AT );
         subentryOid = oidRegistry.getOid( SchemaConstants.SUBENTRY_OC );
         acSubentryOid = oidRegistry.getOid( AC_SUBENTRY_ATTR );
         objectClassType = attrRegistry.lookup( objectClassOid );
@@ -308,7 +308,7 @@
         throws NamingException
     {
         // only perform this for subentries
-        if ( !entry.get( "objectClass" ).contains( SchemaConstants.SUBENTRY_OC ) )
+        if ( !entry.get( SchemaConstants.OBJECT_CLASS_AT ).contains( SchemaConstants.SUBENTRY_OC ) )
         {
             return;
         }

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java?view=diff&rev=519266&r1=519265&r2=519266
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java Sat Mar 17 01:51:57 2007
@@ -30,6 +30,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.AssertionEnum;
 import org.apache.directory.shared.ldap.filter.BranchNode;
 import org.apache.directory.shared.ldap.filter.SimpleNode;
@@ -58,8 +59,6 @@
  */
 public class GroupCache
 {
-    /** the attribute id for an object class: objectClass */
-    private static final String OC_ATTR = "objectClass";
     /** the member attribute for a groupOfNames: member */
     private static final String MEMBER_ATTR = "member";
     /** the member attribute for a groupOfUniqueNames: uniqueMember */
@@ -122,8 +121,8 @@
         // normalized sets of members to cache within the map
 
         BranchNode filter = new BranchNode( AssertionEnum.OR );
-        filter.addNode( new SimpleNode( OC_ATTR, GROUPOFNAMES_OC, AssertionEnum.EQUALITY ) );
-        filter.addNode( new SimpleNode( OC_ATTR, GROUPOFUNIQUENAMES_OC, AssertionEnum.EQUALITY ) );
+        filter.addNode( new SimpleNode( SchemaConstants.OBJECT_CLASS_AT, GROUPOFNAMES_OC, AssertionEnum.EQUALITY ) );
+        filter.addNode( new SimpleNode( SchemaConstants.OBJECT_CLASS_AT, GROUPOFUNIQUENAMES_OC, AssertionEnum.EQUALITY ) );
 
         Iterator suffixes = nexus.listSuffixes();
         while ( suffixes.hasNext() )
@@ -171,7 +170,7 @@
      */
     private Attribute getMemberAttribute( Attributes entry )
     {
-        Attribute oc = entry.get( OC_ATTR );
+        Attribute oc = entry.get( SchemaConstants.OBJECT_CLASS_AT );
 
         if ( oc == null )
         {
@@ -358,7 +357,7 @@
     {
         Attribute members = null;
         String memberAttrId = null;
-        Attribute oc = entry.get( OC_ATTR );
+        Attribute oc = entry.get( SchemaConstants.OBJECT_CLASS_AT );
 
         if ( AttributeUtils.containsValueCaseIgnore( oc, GROUPOFNAMES_OC ) )
         {

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java?view=diff&rev=519266&r1=519265&r2=519266
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java Sat Mar 17 01:51:57 2007
@@ -45,6 +45,7 @@
 import org.apache.directory.shared.ldap.aci.ACIItem;
 import org.apache.directory.shared.ldap.aci.ACIItemParser;
 import org.apache.directory.shared.ldap.aci.ACITuple;
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.exception.LdapSchemaViolationException;
 import org.apache.directory.shared.ldap.filter.AssertionEnum;
 import org.apache.directory.shared.ldap.filter.ExprNode;
@@ -71,8 +72,6 @@
 {
     /** the attribute id for prescriptive aci: prescriptiveACI */
     private static final String ACI_ATTR = "prescriptiveACI";
-    /** the attribute id for an object class: objectClass */
-    private static final String OC_ATTR = "objectClass";
     /** the object class for access control subentries: accessControlSubentry */
     private static final String ACSUBENTRY_OC = "accessControlSubentry";
 
@@ -129,7 +128,7 @@
         {
             String suffix = ( String ) suffixes.next();
             LdapDN baseDn = parseNormalized( suffix );
-            ExprNode filter = new SimpleNode( OC_ATTR, ACSUBENTRY_OC, AssertionEnum.EQUALITY );
+            ExprNode filter = new SimpleNode( SchemaConstants.OBJECT_CLASS_AT, ACSUBENTRY_OC, AssertionEnum.EQUALITY );
             SearchControls ctls = new SearchControls();
             ctls.setSearchScope( SearchControls.SUBTREE_SCOPE );
             NamingEnumeration results = nexus.search( baseDn, env, filter, ctls );
@@ -159,7 +158,7 @@
 
         if ( aci == null )
         {
-            if ( AttributeUtils.containsValueCaseIgnore( entry.get( OC_ATTR ), ACSUBENTRY_OC ) )
+            if ( AttributeUtils.containsValueCaseIgnore( entry.get( SchemaConstants.OBJECT_CLASS_AT ), ACSUBENTRY_OC ) )
             {
                 // should not be necessary because of schema interceptor but schema checking
                 // can be turned off and in this case we must protect against being able to

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilter.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilter.java?view=diff&rev=519266&r1=519265&r2=519266
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilter.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilter.java Sat Mar 17 01:51:57 2007
@@ -37,6 +37,7 @@
 import org.apache.directory.shared.ldap.aci.ProtectedItem;
 import org.apache.directory.shared.ldap.aci.ProtectedItem.MaxValueCountItem;
 import org.apache.directory.shared.ldap.aci.ProtectedItem.RestrictedByItem;
+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.util.AttributeUtils;
@@ -183,7 +184,7 @@
             else if ( item instanceof ProtectedItem.Classes )
             {
                 ProtectedItem.Classes c = ( ProtectedItem.Classes ) item;
-                if ( refinementEvaluator.evaluate( c.getClasses(), entry.get( "objectClass" ) ) )
+                if ( refinementEvaluator.evaluate( c.getClasses(), entry.get( SchemaConstants.OBJECT_CLASS_AT ) ) )
                 {
                     return true;
                 }

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributesSchemaChecker.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributesSchemaChecker.java?view=diff&rev=519266&r1=519265&r2=519266
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributesSchemaChecker.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributesSchemaChecker.java Sat Mar 17 01:51:57 2007
@@ -28,6 +28,7 @@
 
 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.LdapSchemaViolationException;
 import org.apache.directory.shared.ldap.message.ModificationItemImpl;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
@@ -56,7 +57,7 @@
     
     public void checkAdd( LdapDN normName, Attributes entry ) throws LdapSchemaViolationException, NamingException
     {
-        Attribute objectClass = entry.get( "objectClass" );
+        Attribute objectClass = entry.get( SchemaConstants.OBJECT_CLASS_AT );
         
         if ( AttributeUtils.containsValueCaseIgnore( objectClass, "collectiveAttributeSubentry" ) )
         {
@@ -95,7 +96,7 @@
     {
         Attributes originalEntry = nexus.lookup( normName );
         Attributes targetEntry = SchemaUtils.getTargetEntry( mods, originalEntry );
-        Attribute targetObjectClasses = targetEntry.get( "objectClass" );
+        Attribute targetObjectClasses = targetEntry.get( SchemaConstants.OBJECT_CLASS_AT );
         
         if ( AttributeUtils.containsValueCaseIgnore( targetObjectClasses, "collectiveAttributeSubentry" ) )
         {

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/exception/ExceptionService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/exception/ExceptionService.java?view=diff&rev=519266&r1=519265&r2=519266
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/exception/ExceptionService.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/exception/ExceptionService.java Sat Mar 17 01:51:57 2007
@@ -38,6 +38,7 @@
 import org.apache.directory.server.core.partition.Partition;
 import org.apache.directory.server.core.partition.PartitionNexus;
 import org.apache.directory.server.core.partition.PartitionNexusProxy;
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.exception.LdapAttributeInUseException;
 import org.apache.directory.shared.ldap.exception.LdapContextNotEmptyException;
 import org.apache.directory.shared.ldap.exception.LdapNameAlreadyBoundException;
@@ -133,7 +134,7 @@
             throw e2;
         }
         
-        Attribute objectClass = attrs.get( "objectClass" );
+        Attribute objectClass = attrs.get( SchemaConstants.OBJECT_CLASS_AT );
         if ( objectClass.contains( "alias" ) )
         {
             String msg = "Attempt to add entry to alias '" + normName.getUpName() + "' not allowed.";

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/jndi/JavaLdapSupport.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/jndi/JavaLdapSupport.java?view=diff&rev=519266&r1=519265&r2=519266
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/jndi/JavaLdapSupport.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/jndi/JavaLdapSupport.java Sat Mar 17 01:51:57 2007
@@ -20,6 +20,7 @@
 package org.apache.directory.server.core.jndi;
 
 
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.message.AttributeImpl;
 
 import java.io.ByteArrayInputStream;
@@ -52,8 +53,6 @@
     public static final String TOP_ATTR = "top";
     /** the javaObject attribute */
     public static final String JOBJECT_ATTR = "javaObject";
-    /** the objectClass attribute */
-    public static final String OBJECTCLASS_ATTR = "objectClass";
     /** the javaContainer attribute */
     public static final String JCONTAINER_ATTR = "javaContainer";
     /** the javaSerializedObject attribute */
@@ -173,7 +172,7 @@
          * objectClass: javaContainer
          * objectClass: javaSerializedObject
          */
-        Attribute objectClass = new AttributeImpl( "objectClass" );
+        Attribute objectClass = new AttributeImpl( SchemaConstants.OBJECT_CLASS_AT );
         objectClass.add( TOP_ATTR );
         objectClass.add( JOBJECT_ATTR );
         objectClass.add( JCONTAINER_ATTR );

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java?view=diff&rev=519266&r1=519265&r2=519266
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java Sat Mar 17 01:51:57 2007
@@ -51,6 +51,7 @@
 import org.apache.directory.server.core.authn.LdapPrincipal;
 import org.apache.directory.server.core.partition.PartitionNexus;
 import org.apache.directory.server.core.partition.PartitionNexusProxy;
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.exception.LdapNoPermissionException;
 import org.apache.directory.shared.ldap.filter.ExprNode;
 import org.apache.directory.shared.ldap.filter.PresenceNode;
@@ -301,8 +302,8 @@
         LdapDN target = buildTarget( name );
         injectRdnAttributeValues( target, attributes );
         
-        attributes.put( JavaLdapSupport.OBJECTCLASS_ATTR, JavaLdapSupport.JCONTAINER_ATTR );
-        attributes.put( JavaLdapSupport.OBJECTCLASS_ATTR, JavaLdapSupport.TOP_ATTR );
+        attributes.put( SchemaConstants.OBJECT_CLASS_AT, JavaLdapSupport.JCONTAINER_ATTR );
+        attributes.put( SchemaConstants.OBJECT_CLASS_AT, JavaLdapSupport.TOP_ATTR );
 
         /*
          * Add the new context to the server which as a side effect adds 
@@ -710,7 +711,7 @@
     {
         // Conduct a special one level search at base for all objects
         LdapDN base = buildTarget( name );
-        PresenceNode filter = new PresenceNode( "objectClass" );
+        PresenceNode filter = new PresenceNode( SchemaConstants.OBJECT_CLASS_AT );
         SearchControls ctls = new SearchControls();
         ctls.setSearchScope( SearchControls.ONELEVEL_SCOPE );
         return nexusProxy.search( base, getEnvironment(), filter, ctls );
@@ -784,7 +785,7 @@
 
     public void addNamingListener( Name name, int scope, NamingListener namingListener ) throws NamingException
     {
-        ExprNode filter = new PresenceNode( "objectClass" );
+        ExprNode filter = new PresenceNode( SchemaConstants.OBJECT_CLASS_AT );
         SearchControls controls = new SearchControls();
         controls.setSearchScope( scope );
         ( ( PartitionNexusProxy ) this.nexusProxy ).addNamingListener( this, buildTarget( name ), filter,

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/jndi/ServerDirContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/jndi/ServerDirContext.java?view=diff&rev=519266&r1=519265&r2=519266
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/jndi/ServerDirContext.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/jndi/ServerDirContext.java Sat Mar 17 01:51:57 2007
@@ -45,6 +45,7 @@
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.authn.LdapPrincipal;
 import org.apache.directory.server.core.partition.PartitionNexusProxy;
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.filter.AssertionEnum;
 import org.apache.directory.shared.ldap.filter.BranchNode;
 import org.apache.directory.shared.ldap.filter.ExprNode;
@@ -504,7 +505,7 @@
         // If matchingAttributes is null/empty use a match for everything filter
         if ( null == matchingAttributes || matchingAttributes.size() <= 0 )
         {
-            PresenceNode filter = new PresenceNode( "objectClass" );
+            PresenceNode filter = new PresenceNode( SchemaConstants.OBJECT_CLASS_AT );
             return getNexusProxy().search( target, getEnvironment(), filter, ctls );
         }
 

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=519266&r1=519265&r2=519266
==============================================================================
--- 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 Sat Mar 17 01:51:57 2007
@@ -50,6 +50,7 @@
 import org.apache.directory.server.schema.registries.OidRegistry;
 import org.apache.directory.shared.ldap.MultiException;
 import org.apache.directory.shared.ldap.NotImplementedException;
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.exception.LdapInvalidAttributeIdentifierException;
 import org.apache.directory.shared.ldap.exception.LdapNameNotFoundException;
 import org.apache.directory.shared.ldap.exception.LdapNoSuchAttributeException;
@@ -155,7 +156,7 @@
         attr.add( SubentriesControl.CONTROL_OID );
         attr.add( ManageDsaITControl.CONTROL_OID );
 
-        attr = new AttributeImpl( "objectClass" );
+        attr = new AttributeImpl( SchemaConstants.OBJECT_CLASS_AT );
         rootDSE.put( attr );
         attr.add( "top" );
         attr.add( "extensibleObject" );
@@ -253,10 +254,10 @@
             // ---------------------------------------------------------------
             
             Attributes systemEntry = systemCfg.getContextEntry();
-            Attribute objectClassAttr = systemEntry.get( "objectClass" );
+            Attribute objectClassAttr = systemEntry.get( SchemaConstants.OBJECT_CLASS_AT );
             if ( objectClassAttr == null )
             {
-                objectClassAttr = new AttributeImpl(  "objectClass" );
+                objectClassAttr = new AttributeImpl(  SchemaConstants.OBJECT_CLASS_AT );
                 systemEntry.put( objectClassAttr );
             }
             objectClassAttr.add( "top" );
@@ -322,12 +323,12 @@
                 indices.add( Oid.UPDN );
             }
             
-            if ( ! indexOids.contains( registry.getOid( "objectClass" ) ) )
+            if ( ! indexOids.contains( registry.getOid( SchemaConstants.OBJECT_CLASS_AT ) ) )
             {
                 log.warn( "CAUTION: You have not included objectClass as an indexed attribute" +
                         "in the system partition configuration.  This will lead to poor " +
                         "performance.  The server is automatically adding this index for you." );
-                indices.add( "objectClass" );
+                indices.add( SchemaConstants.OBJECT_CLASS_AT );
             }
         }
         else
@@ -349,12 +350,12 @@
             indexedSystemAttrs.add( Oid.ONEALIAS );
             indexedSystemAttrs.add( Oid.SUBALIAS );
             indexedSystemAttrs.add( Oid.UPDN );
-            indexedSystemAttrs.add( "objectClass" );
+            indexedSystemAttrs.add( SchemaConstants.OBJECT_CLASS_AT );
             systemCfg.setIndexedAttributes( indexedSystemAttrs );
     
             // Add context entry for system partition
             Attributes systemEntry = new AttributesImpl();
-            Attribute objectClassAttr = new AttributeImpl( "objectClass" );
+            Attribute objectClassAttr = new AttributeImpl( SchemaConstants.OBJECT_CLASS_AT );
             objectClassAttr.add( "top" );
             objectClassAttr.add( "organizationalUnit" );
             objectClassAttr.add( "extensibleObject" );

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/AddEntryDialog.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/AddEntryDialog.java?view=diff&rev=519266&r1=519265&r2=519266
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/AddEntryDialog.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/AddEntryDialog.java Sat Mar 17 01:51:57 2007
@@ -40,6 +40,7 @@
 import javax.swing.JTable;
 import javax.swing.JTextField;
 
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.message.AttributesImpl;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -83,7 +84,7 @@
     public AddEntryDialog(Frame parent, boolean modal)
     {
         super( parent, modal );
-        m_childEntry.put( "objectClass", "top" );
+        m_childEntry.put( SchemaConstants.OBJECT_CLASS_AT, "top" );
         initGUI();
     }
 

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/prefs/ServerSystemPreferences.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/prefs/ServerSystemPreferences.java?view=diff&rev=519266&r1=519265&r2=519266
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/prefs/ServerSystemPreferences.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/prefs/ServerSystemPreferences.java Sat Mar 17 01:51:57 2007
@@ -43,6 +43,7 @@
 import org.apache.directory.server.core.configuration.ShutdownConfiguration;
 import org.apache.directory.server.core.jndi.CoreContextFactory;
 
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.message.AttributeImpl;
 import org.apache.directory.shared.ldap.message.AttributesImpl;
 import org.apache.directory.shared.ldap.message.ModificationItemImpl;
@@ -191,7 +192,7 @@
     private void setUpNode( String name ) throws NamingException
     {
         Attributes attrs = new AttributesImpl();
-        Attribute attr = new AttributeImpl( "objectClass" );
+        Attribute attr = new AttributeImpl( SchemaConstants.OBJECT_CLASS_AT );
         attr.add( "top" );
         attr.add( "prefNode" );
         attr.add( "extensibleObject" );
@@ -316,7 +317,7 @@
             while ( ids.hasMore() )
             {
                 String id = ( String ) ids.next();
-                if ( id.equals( "objectClass" ) || id.equals( "prefNodeName" ) )
+                if ( id.equals( SchemaConstants.OBJECT_CLASS_AT ) || id.equals( "prefNodeName" ) )
                 {
                     continue;
                 }

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/referral/ReferralService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/referral/ReferralService.java?view=diff&rev=519266&r1=519265&r2=519266
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/referral/ReferralService.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/referral/ReferralService.java Sat Mar 17 01:51:57 2007
@@ -58,6 +58,7 @@
 import org.apache.directory.shared.ldap.codec.util.LdapURL;
 import org.apache.directory.shared.ldap.NotImplementedException;
 import org.apache.directory.shared.ldap.codec.util.LdapURLEncodingException;
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.exception.LdapNamingException;
 import org.apache.directory.shared.ldap.exception.LdapReferralException;
 import org.apache.directory.shared.ldap.filter.AssertionEnum;
@@ -90,7 +91,6 @@
     private static final String THROW = "throw";
     private static final String FOLLOW = "follow";
     private static final String REFERRAL_OC = "referral";
-    private static final String OBJCLASS_ATTR = "objectClass";
     private static final Collection<String> SEARCH_BYPASS;
     private static final String REF_ATTR = "ref";
 
@@ -145,7 +145,7 @@
 
     static boolean isReferral( Attributes entry ) throws NamingException
     {
-        Attribute oc = entry.get( OBJCLASS_ATTR );
+        Attribute oc = entry.get( SchemaConstants.OBJECT_CLASS_AT );
         if ( oc == null )
         {
             log.warn( "could not find objectClass attribute in entry: " + entry );
@@ -612,8 +612,8 @@
         // -------------------------------------------------------------------
 
         boolean isTargetReferral = lut.isReferral( name );
-        boolean isOcChange = mods.get( OBJCLASS_ATTR ) != null;
-        boolean modsOcHasReferral = hasValue( mods.get( OBJCLASS_ATTR ), REFERRAL_OC );
+        boolean isOcChange = mods.get( SchemaConstants.OBJECT_CLASS_AT ) != null;
+        boolean modsOcHasReferral = hasValue( mods.get( SchemaConstants.OBJECT_CLASS_AT ), REFERRAL_OC );
         if ( isOcChange )
         {
             switch ( modOp )
@@ -713,7 +713,7 @@
 
         for ( int ii = 0; ii < mods.length; ii++ )
         {
-            if ( mods[ii].getAttribute().getID().equalsIgnoreCase( OBJCLASS_ATTR ) )
+            if ( mods[ii].getAttribute().getID().equalsIgnoreCase( SchemaConstants.OBJECT_CLASS_AT ) )
             {
                 boolean modsOcHasReferral = hasValue( mods[ii].getAttribute(), REFERRAL_OC );
 
@@ -809,7 +809,7 @@
 
     static ExprNode getReferralFilter()
     {
-        return new SimpleNode( OBJCLASS_ATTR, REFERRAL_OC, AssertionEnum.EQUALITY );
+        return new SimpleNode( SchemaConstants.OBJECT_CLASS_AT, REFERRAL_OC, AssertionEnum.EQUALITY );
     }
 
 

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaChecker.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaChecker.java?view=diff&rev=519266&r1=519265&r2=519266
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaChecker.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaChecker.java Sat Mar 17 01:51:57 2007
@@ -22,6 +22,7 @@
 
 import org.apache.directory.server.schema.registries.ObjectClassRegistry;
 import org.apache.directory.server.schema.registries.OidRegistry;
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.exception.LdapSchemaViolationException;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.schema.ObjectClass;
@@ -75,7 +76,7 @@
             return;
         }
 
-        if ( !"objectclass".equalsIgnoreCase( attribute.getID() ) )
+        if ( !SchemaConstants.OBJECT_CLASS_AT.equalsIgnoreCase( attribute.getID() ) )
         {
             return;
         }
@@ -134,7 +135,7 @@
             return;
         }
 
-        Attribute objectClass = attributes.get( "objectClass" );
+        Attribute objectClass = attributes.get( SchemaConstants.OBJECT_CLASS_AT );
         if ( objectClass == null )
         {
             return;
@@ -195,7 +196,7 @@
             return;
         }
 
-        if ( !"objectclass".equalsIgnoreCase( attribute.getID() ) )
+        if ( !SchemaConstants.OBJECT_CLASS_AT.equalsIgnoreCase( attribute.getID() ) )
         {
             return;
         }
@@ -276,7 +277,7 @@
             return;
         }
 
-        Attribute objectClass = attributes.get( "objectClass" );
+        Attribute objectClass = attributes.get( SchemaConstants.OBJECT_CLASS_AT );
         if ( objectClass == null )
         {
             return;

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaManager.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaManager.java?view=diff&rev=519266&r1=519265&r2=519266
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaManager.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaManager.java Sat Mar 17 01:51:57 2007
@@ -45,6 +45,7 @@
 import org.apache.directory.server.schema.registries.OidRegistry;
 import org.apache.directory.server.schema.registries.Registries;
 import org.apache.directory.shared.ldap.NotImplementedException;
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.exception.LdapInvalidNameException;
 import org.apache.directory.shared.ldap.exception.LdapNamingException;
 import org.apache.directory.shared.ldap.exception.LdapOperationNotSupportedException;
@@ -189,7 +190,7 @@
         this.loader = loader;
         this.globalRegistries = globalRegistries;
         this.objectClassAT = this.globalRegistries.getAttributeTypeRegistry()
-            .lookup( SystemSchemaConstants.SYSTEM_OBJECT_CLASS_AT );
+            .lookup( SchemaConstants.OBJECT_CLASS_AT );
         
         this.metaSchemaHandler = new MetaSchemaHandler( this.globalRegistries, this.loader );
         

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=519266&r1=519265&r2=519266
==============================================================================
--- 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 Sat Mar 17 01:51:57 2007
@@ -42,6 +42,7 @@
 import org.apache.directory.server.schema.registries.AttributeTypeRegistry;
 import org.apache.directory.server.schema.registries.OidRegistry;
 import org.apache.directory.server.schema.registries.Registries;
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.filter.BranchNode;
 import org.apache.directory.shared.ldap.filter.ExprNode;
 import org.apache.directory.shared.ldap.filter.PresenceNode;
@@ -86,7 +87,7 @@
     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[] { 
-        "creatorsName", "m-dependencies", "objectClass", "cn", "m-disabled" };
+        "creatorsName", "m-dependencies", SchemaConstants.OBJECT_CLASS_AT, "cn", "m-disabled" };
 
 
     private final Partition partition;
@@ -132,7 +133,7 @@
         this.CN_OID = oidRegistry.getOid( SystemSchemaConstants.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( SystemSchemaConstants.SYSTEM_OBJECT_CLASS_AT );
+        this.OBJECTCLASS_OID = oidRegistry.getOid( SchemaConstants.OBJECT_CLASS_AT );
         this.M_SYNTAX_OID = oidRegistry.getOid( MetaSchemaConstants.M_SYNTAX_AT );
         this.M_ORDERING_OID = oidRegistry.getOid( MetaSchemaConstants.M_ORDERING_AT );
         this.M_EQUALITY_OID = oidRegistry.getOid( MetaSchemaConstants.M_EQUALITY_AT );
@@ -180,7 +181,7 @@
     {
         LdapDN base = new LdapDN( "ou=schema" );
         base.normalize( attrRegistry.getNormalizerMapping() );
-        ExprNode filter = new SimpleNode( oidRegistry.getOid( "objectClass" ), "metaSchema", AssertionEnum.EQUALITY );
+        ExprNode filter = new SimpleNode( oidRegistry.getOid( SchemaConstants.OBJECT_CLASS_AT ), "metaSchema", AssertionEnum.EQUALITY );
         SearchControls searchControls = new SearchControls();
         searchControls.setSearchScope( SearchControls.ONELEVEL_SCOPE );
         searchControls.setReturningAttributes( SCHEMA_ATTRIBUTES );

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=519266&r1=519265&r2=519266
==============================================================================
--- 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 Sat Mar 17 01:51:57 2007
@@ -722,9 +722,9 @@
         }
 
         // add the objectClass attribute
-        if ( set.contains( "*" ) || set.contains( "objectclass" ) || set.size() == minSetSize )
+        if ( set.contains( "*" ) || set.contains( SchemaConstants.OBJECT_CLASS_AT ) || set.size() == minSetSize )
         {
-            attr = new AttributeImpl( "objectClass" );
+            attr = new AttributeImpl( SchemaConstants.OBJECT_CLASS_AT );
             attr.add( "top" );
             attr.add( "subschema" );
             attr.add( SchemaConstants.SUBENTRY_OC );
@@ -923,7 +923,7 @@
     {
         if ( ( changes == null ) && ( existing == null ) )
         {
-            return new AttributeImpl( "objectClass" );
+            return new AttributeImpl( SchemaConstants.OBJECT_CLASS_AT );
         }
 
         if ( changes == null )
@@ -1028,7 +1028,7 @@
         Set<String> allowed = new HashSet<String>( must );
 
         // Add the 'ObjectClass' attribute ID
-        allowed.add( registries.getOidRegistry().getOid( "ObjectClass" ) );
+        allowed.add( registries.getOidRegistry().getOid( SchemaConstants.OBJECT_CLASS_AT ) );
 
         // Loop on all objectclasses
         while ( objectClasses.hasMoreElements() )
@@ -1157,7 +1157,7 @@
             throw new LdapNameNotFoundException( "The entry which name is " + name + " is not found." );
         }
         
-        Attribute objectClass = getResultantObjectClasses( modOp, mods.get( "objectClass" ), entry.get( "objectClass" ) );
+        Attribute objectClass = getResultantObjectClasses( modOp, mods.get( SchemaConstants.OBJECT_CLASS_AT ), entry.get( SchemaConstants.OBJECT_CLASS_AT ) );
         ObjectClassRegistry ocRegistry = this.registries.getObjectClassRegistry();
         AttributeTypeRegistry atRegistry = this.registries.getAttributeTypeRegistry();
 
@@ -1221,14 +1221,14 @@
 
         // let's figure out if we need to add or take away from mods to maintain 
         // the objectClass attribute with it's hierarchy of ancestors 
-        if ( mods.get( "objectClass" ) != null )
+        if ( mods.get( SchemaConstants.OBJECT_CLASS_AT ) != null )
         {
             Attribute alteredObjectClass = ( Attribute ) objectClass.clone();
             alterObjectClasses( alteredObjectClass );
 
             if ( !alteredObjectClass.equals( objectClass ) )
             {
-                Attribute ocMods = mods.get( "objectClass" );
+                Attribute ocMods = mods.get( SchemaConstants.OBJECT_CLASS_AT );
                 
                 switch ( modOp )
                 {
@@ -1369,7 +1369,7 @@
         // @TODO : check if we can remove this test.
         for ( ModificationItemImpl mod:mods )
         {
-            if ( mod.getAttribute().getID().equalsIgnoreCase( "objectclass" ) )
+            if ( mod.getAttribute().getID().equalsIgnoreCase( SchemaConstants.OBJECT_CLASS_AT ) )
             {
                 objectClassMod = mod;
             }
@@ -1406,12 +1406,12 @@
 
         if ( objectClassMod == null )
         {
-            objectClass = entry.get( "objectClass" );
+            objectClass = entry.get( SchemaConstants.OBJECT_CLASS_AT );
         }
         else
         {
             objectClass = getResultantObjectClasses( objectClassMod.getModificationOp(), objectClassMod.getAttribute(),
-                entry.get( "objectClass" ) );
+                entry.get( SchemaConstants.OBJECT_CLASS_AT ) );
         }
 
         ObjectClassRegistry ocRegistry = this.registries.getObjectClassRegistry();
@@ -1642,15 +1642,15 @@
     private void filterObjectClass( Attributes entry ) throws NamingException
     {
         List<ObjectClass> objectClasses = new ArrayList<ObjectClass>();
-        Attribute oc = entry.get( "objectClass" );
+        Attribute oc = entry.get( SchemaConstants.OBJECT_CLASS_AT );
         
         if ( oc != null )
         {
             getObjectClasses( oc, objectClasses );
 
-            entry.remove( "objectClass" );
+            entry.remove( SchemaConstants.OBJECT_CLASS_AT );
 
-            Attribute newOc = new AttributeImpl( "ObjectClass" );
+            Attribute newOc = new AttributeImpl( SchemaConstants.OBJECT_CLASS_AT );
 
             for ( Object currentOC:objectClasses )
             {
@@ -1781,7 +1781,7 @@
         // 3-1) Except if the extensibleObject ObjectClass is used
         // 3-2) or if the AttributeType is COLLECTIVE
         // 4) We also check that for H-R attributes, we have a valid String in the values
-        Attribute objectClassAttr = entry.get( "objectClass" );
+        Attribute objectClassAttr = entry.get( SchemaConstants.OBJECT_CLASS_AT );
         List<ObjectClass> ocs = new ArrayList<ObjectClass>();
 
         alterObjectClasses( objectClassAttr );
@@ -1832,7 +1832,7 @@
     {
         // Never check the attributes if the extensibleObject objectClass is
         // declared for this entry
-        Attribute objectClass = attributes.get( "objectClass" );
+        Attribute objectClass = attributes.get( SchemaConstants.OBJECT_CLASS_AT );
 
         if ( AttributeUtils.containsValueCaseIgnore( objectClass, "extensibleObject" ) )
         {

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/sp/LdapClassLoader.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/sp/LdapClassLoader.java?view=diff&rev=519266&r1=519265&r2=519266
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/sp/LdapClassLoader.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/sp/LdapClassLoader.java Sat Mar 17 01:51:57 2007
@@ -29,6 +29,7 @@
 import javax.naming.directory.SearchResult;
 
 import org.apache.directory.server.core.jndi.ServerLdapContext;
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.filter.AssertionEnum;
 import org.apache.directory.shared.ldap.filter.BranchNode;
 import org.apache.directory.shared.ldap.filter.SimpleNode;
@@ -73,7 +74,7 @@
         
         BranchNode filter = new BranchNode( AssertionEnum.AND );
         filter.addNode( new SimpleNode( "fullyQualifiedJavaClassName", name, AssertionEnum.EQUALITY ) );
-        filter.addNode( new SimpleNode( "objectClass", "javaClass", AssertionEnum.EQUALITY ) );
+        filter.addNode( new SimpleNode( SchemaConstants.OBJECT_CLASS_AT, "javaClass", AssertionEnum.EQUALITY ) );
         
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.SUBTREE_SCOPE );

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/subtree/RefinementEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/subtree/RefinementEvaluator.java?view=diff&rev=519266&r1=519265&r2=519266
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/subtree/RefinementEvaluator.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/subtree/RefinementEvaluator.java Sat Mar 17 01:51:57 2007
@@ -20,6 +20,7 @@
 package org.apache.directory.server.core.subtree;
 
 
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.filter.BranchNode;
 import org.apache.directory.shared.ldap.filter.ExprNode;
 import org.apache.directory.shared.ldap.filter.SimpleNode;
@@ -61,7 +62,7 @@
         {
             throw new IllegalArgumentException( "objectClasses cannot be null" );
         }
-        if ( !objectClasses.getID().equalsIgnoreCase( "objectClass" ) )
+        if ( !objectClasses.getID().equalsIgnoreCase( SchemaConstants.OBJECT_CLASS_AT ) )
         {
             throw new IllegalArgumentException( "Attribute objectClasses should be of id 'objectClass'" );
         }

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/subtree/RefinementLeafEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/subtree/RefinementLeafEvaluator.java?view=diff&rev=519266&r1=519265&r2=519266
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/subtree/RefinementLeafEvaluator.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/subtree/RefinementLeafEvaluator.java Sat Mar 17 01:51:57 2007
@@ -21,6 +21,7 @@
 
 
 import org.apache.directory.server.schema.registries.OidRegistry;
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.filter.AssertionEnum;
 import org.apache.directory.shared.ldap.filter.SimpleNode;
 import org.apache.directory.shared.ldap.util.StringTools;
@@ -75,7 +76,7 @@
         {
             throw new NamingException( "Unrecognized assertion type for refinement node: " + node.getAssertionType() );
         }
-        if ( !node.getAttribute().equalsIgnoreCase( "objectclass" ) )
+        if ( !node.getAttribute().equalsIgnoreCase( SchemaConstants.OBJECT_CLASS_AT ) )
         {
             throw new NamingException( "Refinement leaf node attribute was " + node.getAttribute() );
         }
@@ -84,7 +85,7 @@
         {
             throw new IllegalArgumentException( "objectClasses argument cannot be null" );
         }
-        if ( !objectClasses.getID().equalsIgnoreCase( "objectclass" ) )
+        if ( !objectClasses.getID().equalsIgnoreCase( SchemaConstants.OBJECT_CLASS_AT ) )
         {
             throw new IllegalArgumentException( "objectClasses attribute must be for ID 'objectClass'" );
         }

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=519266&r1=519265&r2=519266
==============================================================================
--- 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 Sat Mar 17 01:51:57 2007
@@ -128,7 +128,7 @@
         this.oidRegistry = factoryCfg.getRegistries().getOidRegistry();
         
         // setup various attribute type values
-        objectClassType = attrRegistry.lookup( oidRegistry.getOid( "objectClass" ) );
+        objectClassType = attrRegistry.lookup( oidRegistry.getOid( SchemaConstants.OBJECT_CLASS_AT ) );
         
         ssParser = new SubtreeSpecificationParser( new NormalizerMappingResolver()
         {
@@ -141,10 +141,10 @@
 
         // prepare to find all subentries in all namingContexts
         Iterator suffixes = this.nexus.listSuffixes();
-        ExprNode filter = new SimpleNode( "objectclass", SchemaConstants.SUBENTRY_OC, AssertionEnum.EQUALITY );
+        ExprNode filter = new SimpleNode( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.SUBENTRY_OC, AssertionEnum.EQUALITY );
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
-        controls.setReturningAttributes( new String[] { "subtreeSpecification", "objectClass" } );
+        controls.setReturningAttributes( new String[] { "subtreeSpecification", SchemaConstants.OBJECT_CLASS_AT } );
 
         // search each namingContext for subentries
         while ( suffixes.hasNext() )
@@ -184,7 +184,7 @@
     {
         int types = 0;
         
-        Attribute oc = subentry.get( "objectClass" );
+        Attribute oc = subentry.get( SchemaConstants.OBJECT_CLASS_AT );
         if ( oc == null )
         {
             throw new LdapSchemaViolationException( "A subentry must have an objectClass attribute", 
@@ -370,7 +370,7 @@
 
     public void add( NextInterceptor next, LdapDN normName, Attributes entry ) throws NamingException
     {
-        Attribute objectClasses = entry.get( "objectClass" );
+        Attribute objectClasses = entry.get( SchemaConstants.OBJECT_CLASS_AT );
 
         if ( AttributeUtils.containsValueCaseIgnore( objectClasses, SchemaConstants.SUBENTRY_OC ) )
         {
@@ -545,7 +545,7 @@
             LdapDN baseDn = ( LdapDN ) apName.clone();
             baseDn.addAll( ss.getBase() );
 
-            ExprNode filter = new PresenceNode( oidRegistry.getOid( "objectclass" ) );
+            ExprNode filter = new PresenceNode( oidRegistry.getOid( SchemaConstants.OBJECT_CLASS_AT ) );
             SearchControls controls = new SearchControls();
             controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
             controls.setReturningAttributes( new String[]
@@ -700,7 +700,7 @@
             next.modifyRn( name, newRn, deleteOldRn );
 
             subentry = subentryCache.getSubentry( newNormName );
-            ExprNode filter = new PresenceNode( oidRegistry.getOid( "objectclass" ) );
+            ExprNode filter = new PresenceNode( oidRegistry.getOid( SchemaConstants.OBJECT_CLASS_AT ) );
             SearchControls controls = new SearchControls();
             controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
             controls.setReturningAttributes( new String[] { "+", "*" } );
@@ -772,7 +772,7 @@
 
             subentry = subentryCache.getSubentry( newNormName );
 
-            ExprNode filter = new PresenceNode( oidRegistry.getOid( "objectclass" ) );
+            ExprNode filter = new PresenceNode( oidRegistry.getOid( SchemaConstants.OBJECT_CLASS_AT ) );
             SearchControls controls = new SearchControls();
             controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
             controls.setReturningAttributes( new String[] { "+", "*" } );
@@ -819,7 +819,7 @@
     public void move( NextInterceptor next, LdapDN oriChildName, LdapDN newParentName ) throws NamingException
     {
         Attributes entry = nexus.lookup( oriChildName );
-        Attribute objectClasses = entry.get( "objectClass" );
+        Attribute objectClasses = entry.get( SchemaConstants.OBJECT_CLASS_AT );
 
         if ( AttributeUtils.containsValueCaseIgnore( objectClasses, SchemaConstants.SUBENTRY_OC ) )
         {
@@ -839,7 +839,7 @@
 
             subentry = subentryCache.getSubentry( newNormName );
 
-            ExprNode filter = new PresenceNode( "objectclass" );
+            ExprNode filter = new PresenceNode( SchemaConstants.OBJECT_CLASS_AT );
             SearchControls controls = new SearchControls();
             controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
             controls.setReturningAttributes( new String[]
@@ -890,7 +890,7 @@
     
     private int getSubentryTypes( Attributes subentry, int modOp, Attributes mods ) throws NamingException
     {
-        if ( mods.get( "objectClass" ) == null )
+        if ( mods.get( SchemaConstants.OBJECT_CLASS_AT ) == null )
         {
             return getSubentryTypes( subentry );
         }
@@ -902,8 +902,8 @@
             return getSubentryTypes( mods );
         }
         
-        Attribute ocChanges = mods.get( "objectClass" );
-        Attribute ocFinalState = ( Attribute ) subentry.get( "objectClass" ).clone();
+        Attribute ocChanges = mods.get( SchemaConstants.OBJECT_CLASS_AT );
+        Attribute ocFinalState = ( Attribute ) subentry.get( SchemaConstants.OBJECT_CLASS_AT ).clone();
         if ( modOp == DirContext.ADD_ATTRIBUTE )
         {
             for ( int ii = 0; ii < ocChanges.size(); ii++ )
@@ -927,10 +927,10 @@
 
     private int getSubentryTypes( Attributes entry, ModificationItemImpl[] mods ) throws NamingException
     {
-        Attribute ocFinalState = ( Attribute ) entry.get( "objectClass" ).clone();
+        Attribute ocFinalState = ( Attribute ) entry.get( SchemaConstants.OBJECT_CLASS_AT ).clone();
         for ( int ii = 0; ii < mods.length; ii++ )
         {
-            if ( mods[ii].getAttribute().getID().equalsIgnoreCase( "objectClass" ) )
+            if ( mods[ii].getAttribute().getID().equalsIgnoreCase( SchemaConstants.OBJECT_CLASS_AT ) )
             {
                 switch ( mods[ii].getModificationOp() )
                 {
@@ -989,7 +989,7 @@
             apName.remove( apName.size() - 1 );
             LdapDN oldBaseDn = ( LdapDN ) apName.clone();
             oldBaseDn.addAll( ssOld.getBase() );
-            ExprNode filter = new PresenceNode( oidRegistry.getOid( "objectClass" ) );
+            ExprNode filter = new PresenceNode( oidRegistry.getOid( SchemaConstants.OBJECT_CLASS_AT ) );
             SearchControls controls = new SearchControls();
             controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
             controls.setReturningAttributes( new String[]
@@ -1086,7 +1086,7 @@
             apName.remove( apName.size() - 1 );
             LdapDN oldBaseDn = ( LdapDN ) apName.clone();
             oldBaseDn.addAll( ssOld.getBase() );
-            ExprNode filter = new PresenceNode( oidRegistry.getOid( "objectClass" ) );
+            ExprNode filter = new PresenceNode( oidRegistry.getOid( SchemaConstants.OBJECT_CLASS_AT ) );
             SearchControls controls = new SearchControls();
             controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
             controls.setReturningAttributes( new String[]
@@ -1388,7 +1388,7 @@
             }
 
             // see if we can use objectclass if present
-            Attribute objectClasses = result.getAttributes().get( "objectClass" );
+            Attribute objectClasses = result.getAttributes().get( SchemaConstants.OBJECT_CLASS_AT );
             if ( objectClasses != null )
             {
                 if ( AttributeUtils.containsValueCaseIgnore( objectClasses, SchemaConstants.SUBENTRY_OC ) )
@@ -1449,7 +1449,7 @@
             }
 
             // see if we can use objectclass if present
-            Attribute objectClasses = result.getAttributes().get( "objectClass" );
+            Attribute objectClasses = result.getAttributes().get( SchemaConstants.OBJECT_CLASS_AT );
             if ( objectClasses != null )
             {
                 if ( AttributeUtils.containsValueCaseIgnore( objectClasses, SchemaConstants.SUBENTRY_OC ) )

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/trigger/TriggerService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/trigger/TriggerService.java?view=diff&rev=519266&r1=519265&r2=519266
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/trigger/TriggerService.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/trigger/TriggerService.java Sat Mar 17 01:51:57 2007
@@ -125,7 +125,7 @@
          * to be in the same naming context as their access point so the subentries
          * effecting their parent entry applies to them as well.
          */
-        if ( entry.get( "objectClass" ).contains( SchemaConstants.SUBENTRY_OC ) )
+        if ( entry.get( SchemaConstants.OBJECT_CLASS_AT ).contains( SchemaConstants.SUBENTRY_OC ) )
         {
             LdapDN parentDn = ( LdapDN ) dn.clone();
             parentDn.remove( dn.size() - 1 );

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/trigger/TriggerSpecCache.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/trigger/TriggerSpecCache.java?view=diff&rev=519266&r1=519265&r2=519266
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/trigger/TriggerSpecCache.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/trigger/TriggerSpecCache.java Sat Mar 17 01:51:57 2007
@@ -40,6 +40,7 @@
 import org.apache.directory.server.core.DirectoryServiceConfiguration;
 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.filter.AssertionEnum;
 import org.apache.directory.shared.ldap.filter.ExprNode;
 import org.apache.directory.shared.ldap.filter.SimpleNode;
@@ -65,8 +66,6 @@
 {
     /** the attribute id for prescriptive trigger: prescriptiveTrigger */
     private static final String PRESCRIPTIVE_TRIGGER_ATTR = "prescriptiveTriggerSpecification";
-    /** the attribute id for an object class: objectClass */
-    private static final String OC_ATTR = "objectClass";
     /** the object class for trigger subentries: triggerExecutionSubentry */
     private static final String TRIGGER_SUBENTRY_OC = "triggerExecutionSubentry";
 
@@ -116,7 +115,7 @@
         {
             String suffix = ( String ) suffixes.next();
             LdapDN baseDn = new LdapDN( suffix );
-            ExprNode filter = new SimpleNode( OC_ATTR, TRIGGER_SUBENTRY_OC, AssertionEnum.EQUALITY );
+            ExprNode filter = new SimpleNode( SchemaConstants.OBJECT_CLASS_AT, TRIGGER_SUBENTRY_OC, AssertionEnum.EQUALITY );
             SearchControls ctls = new SearchControls();
             ctls.setSearchScope( SearchControls.SUBTREE_SCOPE );
             NamingEnumeration results = nexus.search( baseDn, env, filter, ctls );

Modified: directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java?view=diff&rev=519266&r1=519265&r2=519266
==============================================================================
--- directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java (original)
+++ directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java Sat Mar 17 01:51:57 2007
@@ -50,6 +50,7 @@
 import org.apache.directory.server.schema.registries.AttributeTypeRegistry;
 import org.apache.directory.server.schema.registries.OidRegistry;
 import org.apache.directory.server.schema.registries.Registries;
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.exception.LdapNameNotFoundException;
 import org.apache.directory.shared.ldap.exception.LdapSchemaViolationException;
 import org.apache.directory.shared.ldap.message.AttributeImpl;
@@ -358,7 +359,7 @@
         oidRegistry = config.getOidRegistry();
         attributeTypeRegistry = config.getAttributeTypeRegistry();
 
-        OBJECT_CLASS_AT = attributeTypeRegistry.lookup( "objectClass" );
+        OBJECT_CLASS_AT = attributeTypeRegistry.lookup( SchemaConstants.OBJECT_CLASS_AT );
         ALIAS_AT = attributeTypeRegistry.lookup( ALIAS_ATTRIBUTE );
         
         this.upSuffix = new LdapDN( config.getSuffixDn() );

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=519266&r1=519265&r2=519266
==============================================================================
--- 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 Sat Mar 17 01:51:57 2007
@@ -31,6 +31,7 @@
 
 import org.apache.directory.server.kerberos.shared.store.KerberosAttribute;
 import org.apache.directory.server.kerberos.shared.store.PrincipalStoreEntryModifier;
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 
 
 /**
@@ -44,8 +45,8 @@
     public Object getObjectInstance( Object obj, Name name, Context nameCtx, Hashtable environment, Attributes attrs )
         throws Exception
     {
-        if ( attrs == null || attrs.get( "objectClass" ) == null
-            || !attrs.get( "objectClass" ).contains( "krb5KDCEntry" ) )
+        if ( attrs == null || attrs.get( SchemaConstants.OBJECT_CLASS_AT ) == null
+            || !attrs.get( SchemaConstants.OBJECT_CLASS_AT ).contains( "krb5KDCEntry" ) )
         {
             return null;
         }

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=519266&r1=519265&r2=519266
==============================================================================
--- 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 Sat Mar 17 01:51:57 2007
@@ -33,6 +33,7 @@
 
 import org.apache.directory.server.kerberos.shared.store.KerberosAttribute;
 import org.apache.directory.server.kerberos.shared.store.PrincipalStoreEntry;
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.message.AttributeImpl;
 import org.apache.directory.shared.ldap.message.AttributesImpl;
 
@@ -62,11 +63,11 @@
             }
 
             // process the objectClass attribute
-            Attribute oc = outAttrs.get( "objectClass" );
+            Attribute oc = outAttrs.get( SchemaConstants.OBJECT_CLASS_AT );
 
             if ( oc == null )
             {
-                oc = new AttributeImpl( "objectClass" );
+                oc = new AttributeImpl( SchemaConstants.OBJECT_CLASS_AT );
                 outAttrs.put( oc );
             }
 

Modified: directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/operation/support/EntryUtil.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/operation/support/EntryUtil.java?view=diff&rev=519266&r1=519265&r2=519266
==============================================================================
--- directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/operation/support/EntryUtil.java (original)
+++ directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/operation/support/EntryUtil.java Sat Mar 17 01:51:57 2007
@@ -26,6 +26,7 @@
 import javax.naming.directory.Attributes;
 
 import org.apache.directory.server.core.partition.PartitionNexus;
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.message.AttributeImpl;
 import org.apache.directory.shared.ldap.message.AttributesImpl;
 import org.apache.directory.shared.ldap.name.LdapDN;
@@ -113,7 +114,7 @@
         entry.put( rdnAttribute, rdnValue );
         
         //// Add objectClass attribute. 
-        Attribute objectClassAttr = new AttributeImpl( "objectClass" );
+        Attribute objectClassAttr = new AttributeImpl( SchemaConstants.OBJECT_CLASS_AT );
         objectClassAttr.add( "top" );
         objectClassAttr.add( "extensibleObject" );
         entry.put( objectClassAttr );

Modified: directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/store/operations/GetRecords.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/store/operations/GetRecords.java?view=diff&rev=519266&r1=519265&r2=519266
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/store/operations/GetRecords.java (original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/store/operations/GetRecords.java Sat Mar 17 01:51:57 2007
@@ -45,6 +45,7 @@
 import org.apache.directory.server.dns.messages.ResourceRecordModifier;
 import org.apache.directory.server.dns.store.DnsAttribute;
 import org.apache.directory.server.protocol.shared.store.ContextOperation;
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 
 
 /**
@@ -188,7 +189,7 @@
         }
         else
         {
-            modifier.setDnsType( getType( attrs.get( "objectclass" ) ) );
+            modifier.setDnsType( getType( attrs.get( SchemaConstants.OBJECT_CLASS_AT ) ) );
         }
 
         // class defaults to SOA CLASS

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/SearchHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/SearchHandler.java?view=diff&rev=519266&r1=519265&r2=519266
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/SearchHandler.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/SearchHandler.java Sat Mar 17 01:51:57 2007
@@ -37,6 +37,7 @@
 import org.apache.directory.server.core.jndi.ServerLdapContext;
 import org.apache.directory.server.core.partition.PartitionNexus;
 import org.apache.directory.server.ldap.SessionRegistry;
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.exception.OperationAbandonedException;
 import org.apache.directory.shared.ldap.filter.PresenceNode;
@@ -133,7 +134,7 @@
         boolean isRootDSEFilter = false;
         if ( req.getFilter() instanceof PresenceNode )
         {
-            isRootDSEFilter = ( ( PresenceNode ) req.getFilter() ).getAttribute().equalsIgnoreCase( "objectClass" );
+            isRootDSEFilter = ( ( PresenceNode ) req.getFilter() ).getAttribute().equalsIgnoreCase( SchemaConstants.OBJECT_CLASS_AT );
         }
         return isBaseIsRoot && isBaseScope && isRootDSEFilter;
     }

Modified: directory/apacheds/trunk/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/AbstractBackingStoreTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/AbstractBackingStoreTest.java?view=diff&rev=519266&r1=519265&r2=519266
==============================================================================
--- directory/apacheds/trunk/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/AbstractBackingStoreTest.java (original)
+++ directory/apacheds/trunk/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/AbstractBackingStoreTest.java Sat Mar 17 01:51:57 2007
@@ -60,6 +60,7 @@
 import org.apache.directory.server.schema.bootstrap.InetorgpersonSchema;
 import org.apache.directory.server.schema.bootstrap.Krb5kdcSchema;
 import org.apache.directory.server.schema.bootstrap.SystemSchema;
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.ldif.Entry;
 import org.apache.directory.shared.ldap.ldif.LdifReader;
 import org.apache.directory.shared.ldap.message.AttributeImpl;
@@ -181,7 +182,7 @@
         HashSet indices = new HashSet();
         indices.add( "dc" );
         indices.add( "ou" );
-        indices.add( "objectClass" );
+        indices.add( SchemaConstants.OBJECT_CLASS_AT );
         indices.add( "krb5PrincipalName" );
         indices.add( "uid" );
         partConfig.setIndexedAttributes( indices );
@@ -189,7 +190,7 @@
         partConfig.setSuffix( "dc=example, dc=com" );
 
         AttributesImpl attrs = new AttributesImpl();
-        AttributeImpl objectClass = new AttributeImpl( "objectClass" );
+        AttributeImpl objectClass = new AttributeImpl( SchemaConstants.OBJECT_CLASS_AT );
         objectClass.add( "top" );
         objectClass.add( "domain" );
         attrs.put( objectClass );
@@ -208,7 +209,7 @@
         HashSet indices = new HashSet();
         indices.add( "dc" );
         indices.add( "ou" );
-        indices.add( "objectClass" );
+        indices.add( SchemaConstants.OBJECT_CLASS_AT );
         indices.add( "krb5PrincipalName" );
         indices.add( "uid" );
         partConfig.setIndexedAttributes( indices );
@@ -216,7 +217,7 @@
         partConfig.setSuffix( "dc=apache, dc=org" );
 
         AttributesImpl attrs = new AttributesImpl();
-        AttributeImpl objectClass = new AttributeImpl( "objectClass" );
+        AttributeImpl objectClass = new AttributeImpl( SchemaConstants.OBJECT_CLASS_AT );
         objectClass.add( "top" );
         objectClass.add( "domain" );
         attrs.put( objectClass );
@@ -316,7 +317,7 @@
                 String dn = entry.getDn();
                 Attributes attributes = entry.getAttributes();
 
-                if ( attributes.get( "objectClass" ).contains( "krb5KDCEntry" ) )
+                if ( attributes.get( SchemaConstants.OBJECT_CLASS_AT ).contains( "krb5KDCEntry" ) )
                 {
                     String pw = ( String ) attributes.get( "userpassword" ).get();
                     String krbPrincipal = ( String ) attributes.get( KerberosAttribute.PRINCIPAL ).get();

Modified: directory/apacheds/trunk/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/store/Krb5KdcEntryFilter.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/store/Krb5KdcEntryFilter.java?view=diff&rev=519266&r1=519265&r2=519266
==============================================================================
--- directory/apacheds/trunk/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/store/Krb5KdcEntryFilter.java (original)
+++ directory/apacheds/trunk/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/store/Krb5KdcEntryFilter.java Sat Mar 17 01:51:57 2007
@@ -28,6 +28,7 @@
 import javax.security.auth.kerberos.KerberosKey;
 import javax.security.auth.kerberos.KerberosPrincipal;
 
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -43,7 +44,6 @@
 {
     private static final Logger log = LoggerFactory.getLogger( Krb5KdcEntryFilter.class );
     private static final String KEY_TYPE = "DES";
-    private static final String OBJECTCLASS_ATTR = "objectClass";
     private static final String KRB5KDCENTRY_OC = "krb5KDCEntry";
     private static final String PASSWORD_ATTR = "userPassword";
 
@@ -55,7 +55,7 @@
      */
     public boolean filter( File file, String dn, Attributes entry, DirContext ctx ) throws NamingException
     {
-        if ( entry.get( OBJECTCLASS_ATTR ).contains( KRB5KDCENTRY_OC ) )
+        if ( entry.get( SchemaConstants.OBJECT_CLASS_AT ).contains( KRB5KDCENTRY_OC ) )
         {
             String krbPrincipal = null;
             try

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=519266&r1=519265&r2=519266
==============================================================================
--- 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 Sat Mar 17 01:51:57 2007
@@ -52,6 +52,7 @@
 import org.apache.directory.server.ntp.NtpServer;
 import org.apache.directory.server.protocol.shared.LoadStrategy;
 import org.apache.directory.server.protocol.shared.store.LdifFileLoader;
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.exception.LdapConfigurationException;
 import org.apache.directory.shared.ldap.exception.LdapNamingException;
 import org.apache.directory.shared.ldap.message.AttributesImpl;
@@ -220,8 +221,8 @@
     private void ensureLdifFileBase( DirContext root )
     {
         Attributes entry = new AttributesImpl( "ou", "loadedLdifFiles", true );
-        entry.put( "objectClass", "top" );
-        entry.get( "objectClass" ).add( "organizationalUnit" );
+        entry.put( SchemaConstants.OBJECT_CLASS_AT, "top" );
+        entry.get( SchemaConstants.OBJECT_CLASS_AT ).add( "organizationalUnit" );
         try
         {
             root.createSubcontext( LDIF_FILES_DN, entry );
@@ -251,8 +252,8 @@
         buf.append( LDIF_FILES_DN );
 
         Attributes entry = new AttributesImpl( rdnAttr, getCanonical( ldif ), true );
-        entry.put( "objectClass", "top" );
-        entry.get( "objectClass" ).add( oc );
+        entry.put( SchemaConstants.OBJECT_CLASS_AT, "top" );
+        entry.get( SchemaConstants.OBJECT_CLASS_AT ).add( oc );
         root.createSubcontext( buf.toString(), entry );
     }
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/filter/SimpleNode.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/filter/SimpleNode.java?view=diff&rev=519266&r1=519265&r2=519266
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/filter/SimpleNode.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/filter/SimpleNode.java Sat Mar 17 01:51:57 2007
@@ -19,6 +19,8 @@
  */
 package org.apache.directory.shared.ldap.filter;
 
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
+
 
 /**
  * A simple assertion value node.
@@ -209,7 +211,7 @@
                 throw new UnsupportedOperationException( "Undefined assertion for a refinement" );
         }
 
-        if ( getAttribute() == null || !"objectClass".equalsIgnoreCase( getAttribute() ) )
+        if ( getAttribute() == null || !SchemaConstants.OBJECT_CLASS_AT.equalsIgnoreCase( getAttribute() ) )
         {
             throw new UnsupportedOperationException( "Invalid attribute " + getAttribute() + " for a refinement" );
         }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/sp/JavaStoredProcedureUtils.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/sp/JavaStoredProcedureUtils.java?view=diff&rev=519266&r1=519265&r2=519266
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/sp/JavaStoredProcedureUtils.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/sp/JavaStoredProcedureUtils.java Sat Mar 17 01:51:57 2007
@@ -32,6 +32,7 @@
 import javax.naming.ldap.LdapContext;
 
 import org.apache.commons.lang.SerializationUtils;
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.message.AttributesImpl;
 import org.apache.directory.shared.ldap.message.extended.StoredProcedureRequest;
 import org.apache.directory.shared.ldap.message.extended.StoredProcedureResponse;
@@ -95,8 +96,8 @@
         byte[] buf = getClassFileAsStream( clazz );
         String fullClassName = clazz.getName();
         
-        Attributes attributes = new AttributesImpl( "objectClass", "top", true );
-        attributes.get( "objectClass" ).add( "javaClass" );
+        Attributes attributes = new AttributesImpl( SchemaConstants.OBJECT_CLASS_AT, "top", true );
+        attributes.get( SchemaConstants.OBJECT_CLASS_AT ).add( "javaClass" );
         attributes.put( "fullyQualifiedJavaClassName", fullClassName );
         attributes.put( "javaClassByteCode", buf );
         



Mime
View raw message