directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r519275 - in /directory: apacheds/trunk/bootstrap-plugin/src/main/java/org/apache/directory/server/core/bootstrap/plugin/ apacheds/trunk/core/src/main/java/org/apache/directory/server/core/ apacheds/trunk/core/src/main/java/org/apache/direc...
Date Sat, 17 Mar 2007 09:56:25 GMT
Author: elecharny
Date: Sat Mar 17 02:56:23 2007
New Revision: 519275

URL: http://svn.apache.org/viewvc?view=rev&rev=519275
Log:
Removed the "top" 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/bootstrap-plugin/src/main/java/org/apache/directory/server/core/bootstrap/plugin/BootstrapPlugin.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/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/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/schema/DescriptionParsers.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/schema/SchemaSubentryModifier.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/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultAttributeTypeRegistry.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/sp/JavaStoredProcedureUtils.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=519275&r1=519274&r2=519275
==============================================================================
--- 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
Sat Mar 17 02:56:23 2007
@@ -211,7 +211,7 @@
             if ( !hasEntry( dn ) )
             {
                 Attributes entry = new AttributesImpl();
-                entry.put( SchemaConstants.OBJECT_CLASS_AT, "top" );
+                entry.put( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC );
                 entry.get( SchemaConstants.OBJECT_CLASS_AT ).add( "organizationalUnit" );
                 entry.put( CoreSchemaConstants.OU_AT, "schema" );
                 store.add( dn, entry );
@@ -652,7 +652,7 @@
             SchemaConstants.OBJECT_CLASS_AT, 
             ApacheSchemaConstants.SCHEMA_MODIFICATION_ATTRIBUTES_OC,
             true );
-        entry.get( SchemaConstants.OBJECT_CLASS_AT ).add( "top" );
+        entry.get( SchemaConstants.OBJECT_CLASS_AT ).add( SchemaConstants.TOP_OC );
         
         entry.put( ApacheSchemaConstants.SCHEMA_MODIFIERS_NAME_AT, ADMIN_NORM_NAME );
         entry.put( SystemSchemaConstants.MODIFIERS_NAME_AT, ADMIN_NORM_NAME );
@@ -773,7 +773,7 @@
         }
 
         Attributes entry = new AttributesImpl();
-        entry.put( SchemaConstants.OBJECT_CLASS_AT, "top" );
+        entry.put( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC );
         entry.get( SchemaConstants.OBJECT_CLASS_AT ).add( "organizationalUnit" );
         entry.put( CoreSchemaConstants.OU_AT, dn.getRdn().getValue() );
         store.add( dn, entry );

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=519275&r1=519274&r2=519275
==============================================================================
--- 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 02:56:23 2007
@@ -457,7 +457,7 @@
 
             Attributes attributes = new AttributesImpl();
             Attribute objectClass = new AttributeImpl( SchemaConstants.OBJECT_CLASS_AT );
-            objectClass.add( "top" );
+            objectClass.add( SchemaConstants.TOP_OC );
             objectClass.add( "person" );
             objectClass.add( "organizationalPerson" );
             objectClass.add( "inetOrgPerson" );
@@ -490,7 +490,7 @@
 
             Attributes attributes = new AttributesImpl();
             Attribute objectClass = new AttributeImpl( SchemaConstants.OBJECT_CLASS_AT );
-            objectClass.add( "top" );
+            objectClass.add( SchemaConstants.TOP_OC );
             objectClass.add( "organizationalUnit" );
             attributes.put( objectClass );
 
@@ -514,7 +514,7 @@
 
             Attributes attributes = new AttributesImpl();
             Attribute objectClass = new AttributeImpl( SchemaConstants.OBJECT_CLASS_AT );
-            objectClass.add( "top" );
+            objectClass.add( SchemaConstants.TOP_OC );
             objectClass.add( "organizationalUnit" );
             attributes.put( objectClass );
 
@@ -539,7 +539,7 @@
 
             Attributes attributes = new AttributesImpl();
             Attribute objectClass = new AttributeImpl( SchemaConstants.OBJECT_CLASS_AT );
-            objectClass.add( "top" );
+            objectClass.add( SchemaConstants.TOP_OC );
             objectClass.add( "groupOfUniqueNames" );
             attributes.put( objectClass );
             attributes.put( "cn", "Administrators" );
@@ -583,7 +583,7 @@
 
             Attributes attributes = new AttributesImpl();
             Attribute objectClass = new AttributeImpl( SchemaConstants.OBJECT_CLASS_AT );
-            objectClass.add( "top" );
+            objectClass.add( SchemaConstants.TOP_OC );
             objectClass.add( "organizationalUnit" );
             attributes.put( objectClass );
 
@@ -607,7 +607,7 @@
 
             Attributes attributes = new AttributesImpl();
             Attribute objectClass = new AttributeImpl( SchemaConstants.OBJECT_CLASS_AT );
-            objectClass.add( "top" );
+            objectClass.add( SchemaConstants.TOP_OC );
             objectClass.add( "organizationalUnit" );
             attributes.put( objectClass );
 
@@ -631,7 +631,7 @@
 
             Attributes attributes = new AttributesImpl();
             Attribute objectClass = new AttributeImpl( SchemaConstants.OBJECT_CLASS_AT );
-            objectClass.add( "top" );
+            objectClass.add( SchemaConstants.TOP_OC );
             objectClass.add( "organizationalUnit" );
             attributes.put( objectClass );
 
@@ -655,7 +655,7 @@
 
             Attributes attributes = new AttributesImpl();
             Attribute objectClass = new AttributeImpl( SchemaConstants.OBJECT_CLASS_AT );
-            objectClass.add( "top" );
+            objectClass.add( SchemaConstants.TOP_OC );
             objectClass.add( "organizationalUnit" );
             attributes.put( objectClass );
 
@@ -679,7 +679,7 @@
 
             Attributes attributes = new AttributesImpl();
             Attribute objectClass = new AttributeImpl( SchemaConstants.OBJECT_CLASS_AT );
-            objectClass.add( "top" );
+            objectClass.add( SchemaConstants.TOP_OC );
             objectClass.add( "organizationalUnit" );
             attributes.put( objectClass );
 
@@ -831,7 +831,7 @@
         schemaPartitionConfig.setSuffix( "ou=schema" );
         
         Attributes entry = new AttributesImpl();
-        entry.put( SchemaConstants.OBJECT_CLASS_AT, "top" );
+        entry.put( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC );
         entry.get( SchemaConstants.OBJECT_CLASS_AT ).add( "organizationalUnit" );
         entry.put( "ou", "schema" );
         schemaPartitionConfig.setContextEntry( entry );

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=519275&r1=519274&r2=519275
==============================================================================
--- 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 02:56:23 2007
@@ -49,8 +49,6 @@
     // Attribute Id Constants Used By The Java LDAP BootstrapSchema
     // ------------------------------------------------------------------------
 
-    /** objectClass attribute for top */
-    public static final String TOP_ATTR = "top";
     /** the javaObject attribute */
     public static final String JOBJECT_ATTR = "javaObject";
     /** the javaContainer attribute */
@@ -173,7 +171,7 @@
          * objectClass: javaSerializedObject
          */
         Attribute objectClass = new AttributeImpl( SchemaConstants.OBJECT_CLASS_AT );
-        objectClass.add( TOP_ATTR );
+        objectClass.add( SchemaConstants.TOP_OC );
         objectClass.add( JOBJECT_ATTR );
         objectClass.add( JCONTAINER_ATTR );
         objectClass.add( JSERIALIZEDOBJ_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=519275&r1=519274&r2=519275
==============================================================================
--- 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 02:56:23 2007
@@ -303,7 +303,7 @@
         injectRdnAttributeValues( target, attributes );
         
         attributes.put( SchemaConstants.OBJECT_CLASS_AT, JavaLdapSupport.JCONTAINER_ATTR
);
-        attributes.put( SchemaConstants.OBJECT_CLASS_AT, JavaLdapSupport.TOP_ATTR );
+        attributes.put( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC );
 
         /*
          * Add the new context to the server which as a side effect adds 

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=519275&r1=519274&r2=519275
==============================================================================
--- 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 02:56:23 2007
@@ -158,7 +158,7 @@
 
         attr = new AttributeImpl( SchemaConstants.OBJECT_CLASS_AT );
         rootDSE.put( attr );
-        attr.add( "top" );
+        attr.add( SchemaConstants.TOP_OC );
         attr.add( "extensibleObject" );
 
         attr = new AttributeImpl( NAMINGCTXS_ATTR );
@@ -260,7 +260,7 @@
                 objectClassAttr = new AttributeImpl(  SchemaConstants.OBJECT_CLASS_AT );
                 systemEntry.put( objectClassAttr );
             }
-            objectClassAttr.add( "top" );
+            objectClassAttr.add( SchemaConstants.TOP_OC );
             objectClassAttr.add( "organizationalUnit" );
             objectClassAttr.add( "extensibleObject" );
             systemEntry.put( "creatorsName", PartitionNexus.ADMIN_PRINCIPAL );
@@ -356,7 +356,7 @@
             // Add context entry for system partition
             Attributes systemEntry = new AttributesImpl();
             Attribute objectClassAttr = new AttributeImpl( SchemaConstants.OBJECT_CLASS_AT
);
-            objectClassAttr.add( "top" );
+            objectClassAttr.add( SchemaConstants.TOP_OC );
             objectClassAttr.add( "organizationalUnit" );
             objectClassAttr.add( "extensibleObject" );
             systemEntry.put( objectClassAttr );

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=519275&r1=519274&r2=519275
==============================================================================
--- 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 02:56:23 2007
@@ -84,7 +84,7 @@
     public AddEntryDialog(Frame parent, boolean modal)
     {
         super( parent, modal );
-        m_childEntry.put( SchemaConstants.OBJECT_CLASS_AT, "top" );
+        m_childEntry.put( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC );
         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=519275&r1=519274&r2=519275
==============================================================================
--- 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 02:56:23 2007
@@ -193,7 +193,7 @@
     {
         Attributes attrs = new AttributesImpl();
         Attribute attr = new AttributeImpl( SchemaConstants.OBJECT_CLASS_AT );
-        attr.add( "top" );
+        attr.add( SchemaConstants.TOP_OC );
         attr.add( "prefNode" );
         attr.add( "extensibleObject" );
         attrs.put( attr );

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=519275&r1=519274&r2=519275
==============================================================================
--- 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
Sat Mar 17 02:56:23 2007
@@ -28,6 +28,7 @@
 
 import org.apache.directory.server.constants.MetaSchemaConstants;
 import org.apache.directory.server.schema.registries.Registries;
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.exception.LdapInvalidAttributeValueException;
 import org.apache.directory.shared.ldap.exception.LdapOperationNotSupportedException;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
@@ -391,7 +392,7 @@
             {
                 for ( String superior : desc.getSuperiorObjectClasses() )
                 {
-                    if ( superior.equals( "2.5.6.0" ) || superior.equalsIgnoreCase( "top"
) )
+                    if ( superior.equals( "2.5.6.0" ) || superior.equalsIgnoreCase( SchemaConstants.TOP_OC
) )
                     {
                         continue;
                     }

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=519275&r1=519274&r2=519275
==============================================================================
--- 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 02:56:23 2007
@@ -301,7 +301,7 @@
             for ( ObjectClass parent:parents )
             {
                 // Top is not added
-                if ( "top".equals( parent.getName() ) )
+                if ( SchemaConstants.TOP_OC.equals( parent.getName() ) )
                 {
                     continue;
                 }
@@ -484,7 +484,7 @@
                 
                 // see if node attribute is objectClass
                 if ( node.getAttribute().equalsIgnoreCase( "2.5.4.0" )
-                    && ( "top".equalsIgnoreCase( objectClassOid ) || "subschema".equalsIgnoreCase(
objectClassOid ) )
+                    && ( SchemaConstants.TOP_OC.equalsIgnoreCase( objectClassOid
) || "subschema".equalsIgnoreCase( objectClassOid ) )
                     && ( node.getAssertionType() == AssertionEnum.EQUALITY ) )
                 {
                     // call.setBypass( true );
@@ -725,7 +725,7 @@
         if ( set.contains( "*" ) || set.contains( SchemaConstants.OBJECT_CLASS_AT ) || set.size()
== minSetSize )
         {
             attr = new AttributeImpl( SchemaConstants.OBJECT_CLASS_AT );
-            attr.add( "top" );
+            attr.add( SchemaConstants.TOP_OC );
             attr.add( "subschema" );
             attr.add( SchemaConstants.SUBENTRY_OC );
             attr.add( "apacheSubschema" );
@@ -825,7 +825,7 @@
         for ( ObjectClass parent:oc.getSuperClasses() )
         {
             // Skip 'top'
-            if ( "top".equals( parent.getName() ) )
+            if ( SchemaConstants.TOP_OC.equals( parent.getName() ) )
             {
                 continue;
             }
@@ -972,7 +972,7 @@
         {
             String objectClassName = (String)ocs.nextElement();
 
-            if ( "top".equals( objectClassName ) )
+            if ( SchemaConstants.TOP_OC.equals( objectClassName ) )
             {
                 continue;
             }
@@ -1067,7 +1067,7 @@
         Set<String> objectClasses = new HashSet<String>();
 
         // Init the objectClass list with 'top'
-        objectClasses.add( "top" );
+        objectClasses.add( SchemaConstants.TOP_OC );
         
         // Construct the new list of ObjectClasses
         NamingEnumeration ocList = objectClassAttr.getAll();
@@ -1076,7 +1076,7 @@
         {
             String ocName = ( String ) ocList.nextElement();
 
-            if ( !ocName.equalsIgnoreCase( "top" ) )
+            if ( !ocName.equalsIgnoreCase( SchemaConstants.TOP_OC ) )
             {
                 String ocLowerName = ocName.toLowerCase();
 
@@ -1233,9 +1233,9 @@
                 switch ( modOp )
                 {
                     case ( DirContext.ADD_ATTRIBUTE  ):
-                        if ( ocMods.contains( "top" ) )
+                        if ( ocMods.contains( SchemaConstants.TOP_OC ) )
                         {
-                            ocMods.remove( "top" );
+                            ocMods.remove( SchemaConstants.TOP_OC );
                         }
                     
                         for ( int ii = 0; ii < alteredObjectClass.size(); ii++ )
@@ -1583,9 +1583,9 @@
                 switch ( objectClassMod.getModificationOp() )
                 {
                     case ( DirContext.ADD_ATTRIBUTE  ):
-                        if ( ocMods.contains( "top" ) )
+                        if ( ocMods.contains( SchemaConstants.TOP_OC ) )
                         {
-                            ocMods.remove( "top" );
+                            ocMods.remove( SchemaConstants.TOP_OC );
                         }
                     
                         for ( int ii = 0; ii < alteredObjectClass.size(); ii++ )
@@ -1664,7 +1664,7 @@
                 }
             }
 
-            newOc.add( "top" );
+            newOc.add( SchemaConstants.TOP_OC );
             entry.put( newOc );
         }
     }

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaSubentryModifier.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaSubentryModifier.java?view=diff&rev=519275&r1=519274&r2=519275
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaSubentryModifier.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaSubentryModifier.java
Sat Mar 17 02:56:23 2007
@@ -188,7 +188,7 @@
     
     private Attributes getAttributes( ComparatorDescription comparatorDescription )
     {
-        AttributesImpl attributes = new AttributesImpl( SchemaConstants.OBJECT_CLASS_AT,
"top", true );
+        AttributesImpl attributes = new AttributesImpl( SchemaConstants.OBJECT_CLASS_AT,
SchemaConstants.TOP_OC, true );
         attributes.get( SchemaConstants.OBJECT_CLASS_AT ).add( "metaTop" );
         attributes.get( SchemaConstants.OBJECT_CLASS_AT ).add( "metaComparator" );
         attributes.put( MetaSchemaConstants.M_OID_AT, comparatorDescription.getNumericOid()
);
@@ -222,7 +222,7 @@
     
     private Attributes getAttributes( NormalizerDescription normalizerDescription )
     {
-        AttributesImpl attributes = new AttributesImpl( SchemaConstants.OBJECT_CLASS_AT,
"top", true );
+        AttributesImpl attributes = new AttributesImpl( SchemaConstants.OBJECT_CLASS_AT,
SchemaConstants.TOP_OC, true );
         attributes.get( SchemaConstants.OBJECT_CLASS_AT ).add( "metaTop" );
         attributes.get( SchemaConstants.OBJECT_CLASS_AT ).add( "metaNormalizer" );
         attributes.put( MetaSchemaConstants.M_OID_AT, normalizerDescription.getNumericOid()
);
@@ -267,7 +267,7 @@
     
     private Attributes getAttributes( SyntaxCheckerDescription syntaxCheckerDescription )
     {
-        AttributesImpl attributes = new AttributesImpl( SchemaConstants.OBJECT_CLASS_AT,
"top", true );
+        AttributesImpl attributes = new AttributesImpl( SchemaConstants.OBJECT_CLASS_AT,
SchemaConstants.TOP_OC, true );
         attributes.get( SchemaConstants.OBJECT_CLASS_AT ).add( "metaTop" );
         attributes.get( SchemaConstants.OBJECT_CLASS_AT ).add( "metaSyntaxChecker" );
         attributes.put( MetaSchemaConstants.M_OID_AT, syntaxCheckerDescription.getNumericOid()
);

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=519275&r1=519274&r2=519275
==============================================================================
--- 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 02:56:23 2007
@@ -71,9 +71,9 @@
                 outAttrs.put( oc );
             }
 
-            if ( !oc.contains( "top" ) )
+            if ( !oc.contains( SchemaConstants.TOP_OC ) )
             {
-                oc.add( "top" );
+                oc.add( SchemaConstants.TOP_OC );
             }
 
             PrincipalStoreEntry p = ( PrincipalStoreEntry ) obj;

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=519275&r1=519274&r2=519275
==============================================================================
--- 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 02:56:23 2007
@@ -115,7 +115,7 @@
         
         //// Add objectClass attribute. 
         Attribute objectClassAttr = new AttributeImpl( SchemaConstants.OBJECT_CLASS_AT );
-        objectClassAttr.add( "top" );
+        objectClassAttr.add( SchemaConstants.TOP_OC );
         objectClassAttr.add( "extensibleObject" );
         entry.put( objectClassAttr );
 

Modified: directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultAttributeTypeRegistry.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultAttributeTypeRegistry.java?view=diff&rev=519275&r1=519274&r2=519275
==============================================================================
--- directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultAttributeTypeRegistry.java
(original)
+++ directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultAttributeTypeRegistry.java
Sat Mar 17 02:56:23 2007
@@ -29,6 +29,7 @@
 
 import javax.naming.NamingException;
 
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.MatchingRule;
 import org.apache.directory.shared.ldap.schema.NoOpNormalizer;
@@ -130,7 +131,7 @@
             return;
         }
         
-        if ( ancestor.getName() != null && ancestor.getName().equals( "top" ) )
+        if ( ancestor.getName() != null && ancestor.getName().equals( SchemaConstants.TOP_OC
) )
         {
             return;
         }

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=519275&r1=519274&r2=519275
==============================================================================
--- 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 02:56:23 2007
@@ -221,7 +221,7 @@
     private void ensureLdifFileBase( DirContext root )
     {
         Attributes entry = new AttributesImpl( "ou", "loadedLdifFiles", true );
-        entry.put( SchemaConstants.OBJECT_CLASS_AT, "top" );
+        entry.put( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC );
         entry.get( SchemaConstants.OBJECT_CLASS_AT ).add( "organizationalUnit" );
         try
         {
@@ -252,7 +252,7 @@
         buf.append( LDIF_FILES_DN );
 
         Attributes entry = new AttributesImpl( rdnAttr, getCanonical( ldif ), true );
-        entry.put( SchemaConstants.OBJECT_CLASS_AT, "top" );
+        entry.put( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC );
         entry.get( SchemaConstants.OBJECT_CLASS_AT ).add( oc );
         root.createSubcontext( buf.toString(), entry );
     }

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=519275&r1=519274&r2=519275
==============================================================================
--- 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
Sat Mar 17 02:56:23 2007
@@ -96,7 +96,7 @@
     
     public Attributes getAttributes( Schema schema )
     {
-        Attributes entry = new AttributesImpl( SchemaConstants.OBJECT_CLASS_AT, "top", true
);
+        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( SystemSchemaConstants.CREATORS_NAME_AT, schema.getOwner() );
@@ -124,7 +124,7 @@
     
     public Attributes getAttributes( SyntaxChecker syntaxChecker, Schema schema )
     {
-        Attributes entry = new AttributesImpl( SchemaConstants.OBJECT_CLASS_AT, "top", true
);
+        Attributes entry = new AttributesImpl( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC,
true );
         entry.get( SchemaConstants.OBJECT_CLASS_AT ).add( MetaSchemaConstants.META_SYNTAX_CHECKER_OC
);
         entry.put( MetaSchemaConstants.M_OID_AT, syntaxChecker.getSyntaxOid() );
         entry.put( MetaSchemaConstants.M_FQCN_AT, syntaxChecker.getClass().getName() );
@@ -136,7 +136,7 @@
     
     public Attributes getAttributes( Syntax syntax, Schema schema )
     {
-        Attributes entry = new AttributesImpl( SchemaConstants.OBJECT_CLASS_AT, "top", true
);
+        Attributes entry = new AttributesImpl( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC,
true );
         entry.get( SchemaConstants.OBJECT_CLASS_AT ).add( MetaSchemaConstants.META_SYNTAX_OC
);
         entry.put( MetaSchemaConstants.X_HUMAN_READIBLE_AT, getBoolean( syntax.isHumanReadible()
) );
         entry.put( SystemSchemaConstants.CREATORS_NAME_AT, schema.getOwner() );
@@ -148,7 +148,7 @@
     
     public Attributes getAttributes( String oid, Normalizer normalizer, Schema schema )
     {
-        Attributes entry = new AttributesImpl( SchemaConstants.OBJECT_CLASS_AT, "top", true
);
+        Attributes entry = new AttributesImpl( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC,
true );
         entry.get( SchemaConstants.OBJECT_CLASS_AT ).add( MetaSchemaConstants.META_NORMALIZER_OC
);
         entry.put( MetaSchemaConstants.M_OID_AT, oid );
         entry.put( MetaSchemaConstants.M_FQCN_AT, normalizer.getClass().getName() );
@@ -160,7 +160,7 @@
     
     public Attributes getAttributes( String oid, Comparator comparator, Schema schema )
     {
-        Attributes entry = new AttributesImpl( SchemaConstants.OBJECT_CLASS_AT, "top", true
);
+        Attributes entry = new AttributesImpl( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC,
true );
         entry.get( SchemaConstants.OBJECT_CLASS_AT ).add( MetaSchemaConstants.META_COMPARATOR_OC
);
         entry.put( MetaSchemaConstants.M_OID_AT, oid );
         entry.put( MetaSchemaConstants.M_FQCN_AT, comparator.getClass().getName() );
@@ -178,7 +178,7 @@
      */
     public Attributes getAttributes( MatchingRule matchingRule, Schema schema ) throws NamingException
     {
-        Attributes entry = new AttributesImpl( SchemaConstants.OBJECT_CLASS_AT, "top", true
);
+        Attributes entry = new AttributesImpl( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC,
true );
         entry.get( SchemaConstants.OBJECT_CLASS_AT ).add( MetaSchemaConstants.META_MATCHING_RULE_OC
);
         entry.put( MetaSchemaConstants.M_SYNTAX_AT, matchingRule.getSyntax().getOid() );
         entry.put( SystemSchemaConstants.CREATORS_NAME_AT, schema.getOwner() );
@@ -190,7 +190,7 @@
     
     public Attributes getAttributes( MatchingRuleUse matchingRuleUse, Schema schema )
     {
-        Attributes entry = new AttributesImpl( SchemaConstants.OBJECT_CLASS_AT, "top", true
);
+        Attributes entry = new AttributesImpl( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC,
true );
         entry.get( SchemaConstants.OBJECT_CLASS_AT ).add( "" );
         entry.put( SystemSchemaConstants.CREATORS_NAME_AT, schema.getOwner() );
         entry.put( SystemSchemaConstants.CREATE_TIMESTAMP_AT, DateUtils.getGeneralizedTime()
);
@@ -200,7 +200,7 @@
     
     public Attributes getAttributes( DITStructureRule dITStructureRule, Schema schema )
     {
-        Attributes entry = new AttributesImpl( SchemaConstants.OBJECT_CLASS_AT, "top", true
);
+        Attributes entry = new AttributesImpl( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC,
true );
         entry.get( SchemaConstants.OBJECT_CLASS_AT ).add( "" );
         entry.put( SystemSchemaConstants.CREATORS_NAME_AT, schema.getOwner() );
         entry.put( SystemSchemaConstants.CREATE_TIMESTAMP_AT, DateUtils.getGeneralizedTime()
);
@@ -210,7 +210,7 @@
     
     public Attributes getAttributes( DITContentRule dITContentRule, Schema schema )
     {
-        Attributes entry = new AttributesImpl( SchemaConstants.OBJECT_CLASS_AT, "top", true
);
+        Attributes entry = new AttributesImpl( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC,
true );
         entry.get( SchemaConstants.OBJECT_CLASS_AT ).add( "" );
         entry.put( SystemSchemaConstants.CREATORS_NAME_AT, schema.getOwner() );
         entry.put( SystemSchemaConstants.CREATE_TIMESTAMP_AT, DateUtils.getGeneralizedTime()
);
@@ -220,7 +220,7 @@
     
     public Attributes getAttributes( NameForm nameForm, Schema schema )
     {
-        Attributes entry = new AttributesImpl( SchemaConstants.OBJECT_CLASS_AT, "top", true
);
+        Attributes entry = new AttributesImpl( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC,
true );
         entry.get( SchemaConstants.OBJECT_CLASS_AT ).add( "" );
         entry.put( SystemSchemaConstants.CREATORS_NAME_AT, schema.getOwner() );
         entry.put( SystemSchemaConstants.CREATE_TIMESTAMP_AT, DateUtils.getGeneralizedTime()
);
@@ -248,7 +248,7 @@
      */
     public Attributes getAttributes( AttributeType attributeType, Schema schema ) throws
NamingException
     {
-        Attributes entry = new AttributesImpl( SchemaConstants.OBJECT_CLASS_AT, "top", true
);
+        Attributes entry = new AttributesImpl( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC,
true );
         entry.get( SchemaConstants.OBJECT_CLASS_AT ).add( MetaSchemaConstants.META_ATTRIBUTE_TYPE_OC
);
         entry.put( MetaSchemaConstants.M_SYNTAX_AT, attributeType.getSyntax().getOid() );
         entry.put( MetaSchemaConstants.M_COLLECTIVE_AT, getBoolean( attributeType.isCollective()
) );
@@ -333,7 +333,7 @@
      */
     public Attributes getAttributes( ObjectClass objectClass, Schema schema ) throws NamingException
     {
-        Attributes entry = new AttributesImpl( SchemaConstants.OBJECT_CLASS_AT, "top", true
);
+        Attributes entry = new AttributesImpl( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC,
true );
         entry.get( SchemaConstants.OBJECT_CLASS_AT ).add( MetaSchemaConstants.META_OBJECT_CLASS_OC
);
         entry.put( MetaSchemaConstants.M_TYPE_OBJECT_CLASS_AT, objectClass.getType().toString()
);
         entry.put( SystemSchemaConstants.CREATORS_NAME_AT, schema.getOwner() );

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=519275&r1=519274&r2=519275
==============================================================================
--- 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
Sat Mar 17 02:56:23 2007
@@ -29,6 +29,10 @@
  */
 public class SchemaConstants
 {
+    // ObjectClasses
     public static final String SUBENTRY_OC = "subentry";
+    public static final String TOP_OC = "top";
+    
+    // AttributeTypes
     public static final String OBJECT_CLASS_AT = "objectClass";
 }

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=519275&r1=519274&r2=519275
==============================================================================
--- 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 02:56:23 2007
@@ -96,7 +96,7 @@
         byte[] buf = getClassFileAsStream( clazz );
         String fullClassName = clazz.getName();
         
-        Attributes attributes = new AttributesImpl( SchemaConstants.OBJECT_CLASS_AT, "top",
true );
+        Attributes attributes = new AttributesImpl( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC,
true );
         attributes.get( SchemaConstants.OBJECT_CLASS_AT ).add( "javaClass" );
         attributes.put( "fullyQualifiedJavaClassName", fullClassName );
         attributes.put( "javaClassByteCode", buf );

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=519275&r1=519274&r2=519275
==============================================================================
--- 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
Sat Mar 17 02:56:23 2007
@@ -69,7 +69,7 @@
         Attributes subentry = new AttributesImpl( "cn", subentryCN, true );
         Attribute objectClass = new AttributeImpl( SchemaConstants.OBJECT_CLASS_AT );
         subentry.put( objectClass );
-        objectClass.add( "top" );
+        objectClass.add( SchemaConstants.TOP_OC );
         objectClass.add( SchemaConstants.SUBENTRY_OC );
         objectClass.add( TRIGGER_EXECUTION_SUBENTRY_OC );
         subentry.put( SUBTREE_SPECIFICATION_ATTR, subtreeSpec );



Mime
View raw message