directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r519500 - in /directory: apacheds/trunk/constants/src/main/java/org/apache/directory/server/constants/ apacheds/trunk/core-plugin/src/main/java/org/apache/directory/server/core/tools/schema/ apacheds/trunk/core/src/main/java/org/apache/dire...
Date Sun, 18 Mar 2007 01:24:30 GMT
Author: elecharny
Date: Sat Mar 17 18:24:29 2007
New Revision: 519500

URL: http://svn.apache.org/viewvc?view=rev&rev=519500
Log:
Removed the "objectClasses" 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-plugin/src/main/java/org/apache/directory/server/core/tools/schema/DirectorySchemaToolMojo.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaObjectClassHandler.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/SchemaService.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaSubentryModifier.java
    directory/shared/trunk/ldap-constants/src/main/java/org/apache/directory/shared/ldap/constants/SchemaConstants.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=519500&r1=519499&r2=519500
==============================================================================
--- 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 18:24:29 2007
@@ -37,7 +37,6 @@
     String LDAP_SYNTAXES_AT = "ldapSyntaxes";
     String MATCHING_RULES_AT = "matchingRules";
     String ATTRIBUTE_TYPES_AT = "attributeTypes";
-    String OBJECT_CLASSES_AT = "objectClasses";
     String MATCHING_RULE_USE_AT = "matchingRuleUse";
     String DIT_STRUCTURE_RULES_AT = "ditStructureRules";
     String DIT_CONTENT_RULES_AT = "ditContentRules";

Modified: directory/apacheds/trunk/core-plugin/src/main/java/org/apache/directory/server/core/tools/schema/DirectorySchemaToolMojo.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-plugin/src/main/java/org/apache/directory/server/core/tools/schema/DirectorySchemaToolMojo.java?view=diff&rev=519500&r1=519499&r2=519500
==============================================================================
--- directory/apacheds/trunk/core-plugin/src/main/java/org/apache/directory/server/core/tools/schema/DirectorySchemaToolMojo.java
(original)
+++ directory/apacheds/trunk/core-plugin/src/main/java/org/apache/directory/server/core/tools/schema/DirectorySchemaToolMojo.java
Sat Mar 17 18:24:29 2007
@@ -34,6 +34,7 @@
 import org.apache.directory.server.schema.bootstrap.AbstractBootstrapSchema;
 import org.apache.directory.server.schema.bootstrap.BootstrapSchema;
 import org.apache.directory.server.schema.bootstrap.ProducerTypeEnum;
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.maven.plugin.AbstractMojo;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.project.MavenProject;
@@ -266,7 +267,7 @@
         context.put( "schemaDepCount", new Integer( schema.getDependencies().length ) );
         context.put( "schemaDeps", new String[]
             { "dep1", "dep2" } );
-        context.put( "objectClasses", objectClasses );
+        context.put( SchemaConstants.OBJECT_CLASSES_AT, objectClasses );
         runVelocity( schema.getPackageName(), schema.getUnqualifiedClassName( type ), context,
             "ObjectClasses.template", type );
     }

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaObjectClassHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaObjectClassHandler.java?view=diff&rev=519500&r1=519499&r2=519500
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaObjectClassHandler.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaObjectClassHandler.java
Sat Mar 17 18:24:29 2007
@@ -30,6 +30,7 @@
 import org.apache.directory.server.schema.bootstrap.Schema;
 import org.apache.directory.server.schema.registries.ObjectClassRegistry;
 import org.apache.directory.server.schema.registries.Registries;
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.exception.LdapInvalidNameException;
 import org.apache.directory.shared.ldap.exception.LdapOperationNotSupportedException;
 import org.apache.directory.shared.ldap.message.AttributeImpl;
@@ -239,7 +240,7 @@
                 ResultCodeEnum.NAMING_VIOLATION );
         }
         
-        if ( ! ( ( String ) rdn.getValue() ).equalsIgnoreCase( "objectClasses" ) )
+        if ( ! ( ( String ) rdn.getValue() ).equalsIgnoreCase( SchemaConstants.OBJECT_CLASSES_AT
) )
         {
             throw new LdapInvalidNameException( 
                 "The parent entry of a attributeType should have a relative name of ou=objectClasses.",


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=519500&r1=519499&r2=519500
==============================================================================
--- 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 18:24:29 2007
@@ -104,7 +104,7 @@
         "ldapSyntaxes",
         "matchingRules",
         "attributeTypes",
-        "objectClasses",
+        SchemaConstants.OBJECT_CLASSES_AT,
         "matchingRuleUse",
         "dITStructureRules",
         "dITContentRules",
@@ -228,7 +228,7 @@
         attributeTypesOid = oidRegistry.getOid( SystemSchemaConstants.ATTRIBUTE_TYPES_AT
);
         opAttr2handlerIndex.put( attributeTypesOid, new Integer( ATTRIBUTE_TYPE_INDEX ) );
 
-        objectClassesOid = oidRegistry.getOid( SystemSchemaConstants.OBJECT_CLASSES_AT );
+        objectClassesOid = oidRegistry.getOid( SchemaConstants.OBJECT_CLASSES_AT );
         opAttr2handlerIndex.put( objectClassesOid, new Integer( OBJECT_CLASS_INDEX ) );
         
         matchingRuleUseOid = oidRegistry.getOid( SystemSchemaConstants.MATCHING_RULE_USE_AT
);

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=519500&r1=519499&r2=519500
==============================================================================
--- 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 18:24:29 2007
@@ -587,7 +587,7 @@
 
         if ( returnAllOperationalAttributes || set.contains( "objectclasses" ) )
         {
-            attr = new AttributeImpl( "objectClasses" );
+            attr = new AttributeImpl( SchemaConstants.OBJECT_CLASSES_AT );
             Iterator<ObjectClass> list = registries.getObjectClassRegistry().iterator();
             
             while ( list.hasNext() )
@@ -936,7 +936,7 @@
         }
         else if ( existing == null )
         {
-            return new AttributeImpl( "objectClasses" );
+            return new AttributeImpl( SchemaConstants.OBJECT_CLASSES_AT );
         }
 
         switch ( modOp )

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=519500&r1=519499&r2=519500
==============================================================================
--- 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 18:24:29 2007
@@ -103,7 +103,7 @@
         }
         else if ( obj instanceof ObjectClass )
         {
-            buf.append( "objectClasses" );
+            buf.append( SchemaConstants.OBJECT_CLASSES_AT );
         }
         else if ( obj instanceof MatchingRuleUse )
         {

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=519500&r1=519499&r2=519500
==============================================================================
--- 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 18:24:29 2007
@@ -39,5 +39,6 @@
     public static final String OBJECT_CLASS_AT = "objectClass";
     public static final String CREATORS_NAME_AT = "creatorsName";
     public static final String CREATE_TIMESTAMP_AT = "createTimestamp";
+    public static final String OBJECT_CLASSES_AT = "objectClasses";
 
 }



Mime
View raw message