directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1397640 - in /directory/shared/trunk/ldap: model/src/main/java/org/apache/directory/shared/ldap/model/constants/ schema/data/src/main/java/org/apache/directory/shared/ldap/schemaloader/ schema/data/src/main/resources/schema/ou=schema/cn=ap...
Date Fri, 12 Oct 2012 16:53:02 GMT
Author: elecharny
Date: Fri Oct 12 16:53:02 2012
New Revision: 1397640

URL: http://svn.apache.org/viewvc?rev=1397640&view=rev
Log:
Added the x-read-only AttributeType in the ApacheMeta schema, this will fix DIRSERVER-1717

Added:
    directory/shared/trunk/ldap/schema/data/src/main/resources/schema/ou=schema/cn=apachemeta/ou=attributetypes/m-oid=1.3.6.1.4.1.18060.0.4.0.2.36.ldif
Modified:
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/constants/MetaSchemaConstants.java
    directory/shared/trunk/ldap/schema/data/src/main/java/org/apache/directory/shared/ldap/schemaloader/SchemaEntityFactory.java
    directory/shared/trunk/ldap/schema/data/src/test/java/org/apache/directory/shared/ldap/schemaloader/SchemaManagerEnableDisableLoadTest.java
    directory/shared/trunk/ldap/schema/data/src/test/java/org/apache/directory/shared/ldap/schemaloader/SchemaManagerLoadTest.java
    directory/shared/trunk/ldap/schema/data/src/test/java/org/apache/directory/shared/ldap/schemaloader/SchemaManagerLoadWithDepsTest.java

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/constants/MetaSchemaConstants.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/constants/MetaSchemaConstants.java?rev=1397640&r1=1397639&r2=1397640&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/constants/MetaSchemaConstants.java
(original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/constants/MetaSchemaConstants.java
Fri Oct 12 16:53:02 2012
@@ -179,6 +179,7 @@ public final class MetaSchemaConstants
     public final static String X_NOT_HUMAN_READABLE_AT = "x-not-human-readable";
     public final static String X_NOT_HUMAN_READABLE_AT_OID = "1.3.6.1.4.1.18060.0.4.0.2.34";
     
+    // The x-read-only extension
     public final static String X_READ_ONLY_AT = "X-READ-ONLY";
-    public final static String X_ENABLED_AT = "X-ENABLED";
+    public final static String X_READ_ONLY_AT_OID = "1.3.6.1.4.1.18060.0.4.0.2.36";
 }

Modified: directory/shared/trunk/ldap/schema/data/src/main/java/org/apache/directory/shared/ldap/schemaloader/SchemaEntityFactory.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/schema/data/src/main/java/org/apache/directory/shared/ldap/schemaloader/SchemaEntityFactory.java?rev=1397640&r1=1397639&r2=1397640&view=diff
==============================================================================
--- directory/shared/trunk/ldap/schema/data/src/main/java/org/apache/directory/shared/ldap/schemaloader/SchemaEntityFactory.java
(original)
+++ directory/shared/trunk/ldap/schema/data/src/main/java/org/apache/directory/shared/ldap/schemaloader/SchemaEntityFactory.java
Fri Oct 12 16:53:02 2012
@@ -1175,16 +1175,6 @@ public class SchemaEntityFactory impleme
 
             schemaObject.addExtension( MetaSchemaConstants.X_READ_ONLY_AT, value );
         }
-
-        // X-ENABLED
-        Attribute xEnabled = entry.get( MetaSchemaConstants.X_ENABLED_AT );
-
-        if ( xEnabled != null )
-        {
-            String value = xEnabled.getString();
-
-            schemaObject.addExtension( MetaSchemaConstants.X_ENABLED_AT, value );
-        }
     }
 
 

Added: directory/shared/trunk/ldap/schema/data/src/main/resources/schema/ou=schema/cn=apachemeta/ou=attributetypes/m-oid=1.3.6.1.4.1.18060.0.4.0.2.36.ldif
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/schema/data/src/main/resources/schema/ou%3Dschema/cn%3Dapachemeta/ou%3Dattributetypes/m-oid%3D1.3.6.1.4.1.18060.0.4.0.2.36.ldif?rev=1397640&view=auto
==============================================================================
--- directory/shared/trunk/ldap/schema/data/src/main/resources/schema/ou=schema/cn=apachemeta/ou=attributetypes/m-oid=1.3.6.1.4.1.18060.0.4.0.2.36.ldif
(added)
+++ directory/shared/trunk/ldap/schema/data/src/main/resources/schema/ou=schema/cn=apachemeta/ou=attributetypes/m-oid=1.3.6.1.4.1.18060.0.4.0.2.36.ldif
Fri Oct 12 16:53:02 2012
@@ -0,0 +1,16 @@
+version: 1
+dn: m-oid=1.3.6.1.4.1.18060.0.4.0.2.36,ou=attributeTypes,cn=apachemeta,ou=schema
+objectclass: top
+objectclass: metaTop
+objectclass: metaAttributeType
+m-oid: 1.3.6.1.4.1.18060.0.4.0.2.36
+m-name: x-read-only
+m-description: Tells if the schema element is read-only or not.
+m-syntax: 1.3.6.1.4.1.1466.115.121.1.7
+m-equality: booleanMatch
+m-usage: USER_APPLICATIONS
+m-singlevalue: TRUE
+m-collective: FALSE
+m-obsolete: FALSE
+m-nousermodification: FALSE
+creatorsname: uid=admin,ou=system

Modified: directory/shared/trunk/ldap/schema/data/src/test/java/org/apache/directory/shared/ldap/schemaloader/SchemaManagerEnableDisableLoadTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/schema/data/src/test/java/org/apache/directory/shared/ldap/schemaloader/SchemaManagerEnableDisableLoadTest.java?rev=1397640&r1=1397639&r2=1397640&view=diff
==============================================================================
--- directory/shared/trunk/ldap/schema/data/src/test/java/org/apache/directory/shared/ldap/schemaloader/SchemaManagerEnableDisableLoadTest.java
(original)
+++ directory/shared/trunk/ldap/schema/data/src/test/java/org/apache/directory/shared/ldap/schemaloader/SchemaManagerEnableDisableLoadTest.java
Fri Oct 12 16:53:02 2012
@@ -156,14 +156,14 @@ public class SchemaManagerEnableDisableL
         assertEquals( 0, disabled.size() );
 
         assertTrue( schemaManager.getErrors().isEmpty() );
-        assertEquals( 426, schemaManager.getAttributeTypeRegistry().size() );
+        assertEquals( 427, schemaManager.getAttributeTypeRegistry().size() );
         assertEquals( 48, schemaManager.getComparatorRegistry().size() );
         assertEquals( 48, schemaManager.getMatchingRuleRegistry().size() );
         assertEquals( 48, schemaManager.getNormalizerRegistry().size() );
         assertEquals( 120, schemaManager.getObjectClassRegistry().size() );
         assertEquals( 68, schemaManager.getSyntaxCheckerRegistry().size() );
         assertEquals( 73, schemaManager.getLdapSyntaxRegistry().size() );
-        assertEquals( 667, schemaManager.getGlobalOidRegistry().size() );
+        assertEquals( 668, schemaManager.getGlobalOidRegistry().size() );
 
         assertEquals( 12, schemaManager.getRegistries().getLoadedSchemas().size() );
         assertNull( schemaManager.getRegistries().getLoadedSchema( "nis" ) );
@@ -201,14 +201,14 @@ public class SchemaManagerEnableDisableL
         assertNotNull( schemaManager.lookupAttributeTypeRegistry( "gecos" ) );
 
         assertTrue( schemaManager.getErrors().isEmpty() );
-        assertEquals( 453, schemaManager.getAttributeTypeRegistry().size() );
+        assertEquals( 454, schemaManager.getAttributeTypeRegistry().size() );
         assertEquals( 49, schemaManager.getComparatorRegistry().size() );
         assertEquals( 49, schemaManager.getMatchingRuleRegistry().size() );
         assertEquals( 49, schemaManager.getNormalizerRegistry().size() );
         assertEquals( 133, schemaManager.getObjectClassRegistry().size() );
         assertEquals( 70, schemaManager.getSyntaxCheckerRegistry().size() );
         assertEquals( 75, schemaManager.getLdapSyntaxRegistry().size() );
-        assertEquals( 710, schemaManager.getGlobalOidRegistry().size() );
+        assertEquals( 711, schemaManager.getGlobalOidRegistry().size() );
 
         assertEquals( 13, schemaManager.getRegistries().getLoadedSchemas().size() );
         assertNotNull( schemaManager.getRegistries().getLoadedSchema( "nis" ) );
@@ -241,14 +241,14 @@ public class SchemaManagerEnableDisableL
         }
 
         assertTrue( schemaManager.getErrors().isEmpty() );
-        assertEquals( 426, schemaManager.getAttributeTypeRegistry().size() );
+        assertEquals( 427, schemaManager.getAttributeTypeRegistry().size() );
         assertEquals( 48, schemaManager.getComparatorRegistry().size() );
         assertEquals( 48, schemaManager.getMatchingRuleRegistry().size() );
         assertEquals( 48, schemaManager.getNormalizerRegistry().size() );
         assertEquals( 120, schemaManager.getObjectClassRegistry().size() );
         assertEquals( 68, schemaManager.getSyntaxCheckerRegistry().size() );
         assertEquals( 73, schemaManager.getLdapSyntaxRegistry().size() );
-        assertEquals( 667, schemaManager.getGlobalOidRegistry().size() );
+        assertEquals( 668, schemaManager.getGlobalOidRegistry().size() );
 
         assertEquals( 12, schemaManager.getRegistries().getLoadedSchemas().size() );
         assertNull( schemaManager.getRegistries().getLoadedSchema( "nis" ) );
@@ -293,14 +293,14 @@ public class SchemaManagerEnableDisableL
         assertNotNull( schemaManager.lookupAttributeTypeRegistry( "gecos" ) );
 
         assertTrue( schemaManager.getErrors().isEmpty() );
-        assertEquals( 500, schemaManager.getAttributeTypeRegistry().size() );
+        assertEquals( 501, schemaManager.getAttributeTypeRegistry().size() );
         assertEquals( 49, schemaManager.getComparatorRegistry().size() );
         assertEquals( 49, schemaManager.getMatchingRuleRegistry().size() );
         assertEquals( 49, schemaManager.getNormalizerRegistry().size() );
         assertEquals( 144, schemaManager.getObjectClassRegistry().size() );
         assertEquals( 70, schemaManager.getSyntaxCheckerRegistry().size() );
         assertEquals( 75, schemaManager.getLdapSyntaxRegistry().size() );
-        assertEquals( 768, schemaManager.getGlobalOidRegistry().size() );
+        assertEquals( 769, schemaManager.getGlobalOidRegistry().size() );
 
         assertEquals( 14, schemaManager.getRegistries().getLoadedSchemas().size() );
         assertNotNull( schemaManager.getRegistries().getLoadedSchema( "samba" ) );

Modified: directory/shared/trunk/ldap/schema/data/src/test/java/org/apache/directory/shared/ldap/schemaloader/SchemaManagerLoadTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/schema/data/src/test/java/org/apache/directory/shared/ldap/schemaloader/SchemaManagerLoadTest.java?rev=1397640&r1=1397639&r2=1397640&view=diff
==============================================================================
--- directory/shared/trunk/ldap/schema/data/src/test/java/org/apache/directory/shared/ldap/schemaloader/SchemaManagerLoadTest.java
(original)
+++ directory/shared/trunk/ldap/schema/data/src/test/java/org/apache/directory/shared/ldap/schemaloader/SchemaManagerLoadTest.java
Fri Oct 12 16:53:02 2012
@@ -313,14 +313,14 @@ public class SchemaManagerLoadTest
         assertTrue( schemaManager.load( "apacheMeta" ) );
 
         assertTrue( schemaManager.getErrors().isEmpty() );
-        assertEquals( 70, schemaManager.getAttributeTypeRegistry().size() );
+        assertEquals( 71, schemaManager.getAttributeTypeRegistry().size() );
         assertEquals( 40, schemaManager.getComparatorRegistry().size() );
         assertEquals( 40, schemaManager.getMatchingRuleRegistry().size() );
         assertEquals( 40, schemaManager.getNormalizerRegistry().size() );
         assertEquals( 22, schemaManager.getObjectClassRegistry().size() );
         assertEquals( 63, schemaManager.getSyntaxCheckerRegistry().size() );
         assertEquals( 64, schemaManager.getLdapSyntaxRegistry().size() );
-        assertEquals( 196, schemaManager.getGlobalOidRegistry().size() );
+        assertEquals( 197, schemaManager.getGlobalOidRegistry().size() );
 
         assertEquals( 2, schemaManager.getRegistries().getLoadedSchemas().size() );
         assertNotNull( schemaManager.getRegistries().getLoadedSchema( "system" ) );

Modified: directory/shared/trunk/ldap/schema/data/src/test/java/org/apache/directory/shared/ldap/schemaloader/SchemaManagerLoadWithDepsTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/schema/data/src/test/java/org/apache/directory/shared/ldap/schemaloader/SchemaManagerLoadWithDepsTest.java?rev=1397640&r1=1397639&r2=1397640&view=diff
==============================================================================
--- directory/shared/trunk/ldap/schema/data/src/test/java/org/apache/directory/shared/ldap/schemaloader/SchemaManagerLoadWithDepsTest.java
(original)
+++ directory/shared/trunk/ldap/schema/data/src/test/java/org/apache/directory/shared/ldap/schemaloader/SchemaManagerLoadWithDepsTest.java
Fri Oct 12 16:53:02 2012
@@ -198,14 +198,14 @@ public class SchemaManagerLoadWithDepsTe
         schemaManager.loadWithDeps( "apacheMeta" );
 
         assertTrue( schemaManager.getErrors().isEmpty() );
-        assertEquals( 70, schemaManager.getAttributeTypeRegistry().size() );
+        assertEquals( 71, schemaManager.getAttributeTypeRegistry().size() );
         assertEquals( 40, schemaManager.getComparatorRegistry().size() );
         assertEquals( 40, schemaManager.getMatchingRuleRegistry().size() );
         assertEquals( 40, schemaManager.getNormalizerRegistry().size() );
         assertEquals( 22, schemaManager.getObjectClassRegistry().size() );
         assertEquals( 63, schemaManager.getSyntaxCheckerRegistry().size() );
         assertEquals( 64, schemaManager.getLdapSyntaxRegistry().size() );
-        assertEquals( 196, schemaManager.getGlobalOidRegistry().size() );
+        assertEquals( 197, schemaManager.getGlobalOidRegistry().size() );
 
         assertEquals( 2, schemaManager.getRegistries().getLoadedSchemas().size() );
         assertNotNull( schemaManager.getRegistries().getLoadedSchema( "system" ) );
@@ -254,14 +254,14 @@ public class SchemaManagerLoadWithDepsTe
         schemaManager.loadWithDeps( "other" );
 
         assertTrue( schemaManager.getErrors().isEmpty() );
-        assertEquals( 177, schemaManager.getAttributeTypeRegistry().size() );
+        assertEquals( 178, schemaManager.getAttributeTypeRegistry().size() );
         assertEquals( 48, schemaManager.getComparatorRegistry().size() );
         assertEquals( 48, schemaManager.getMatchingRuleRegistry().size() );
         assertEquals( 48, schemaManager.getNormalizerRegistry().size() );
         assertEquals( 66, schemaManager.getObjectClassRegistry().size() );
         assertEquals( 66, schemaManager.getSyntaxCheckerRegistry().size() );
         assertEquals( 71, schemaManager.getLdapSyntaxRegistry().size() );
-        assertEquals( 362, schemaManager.getGlobalOidRegistry().size() );
+        assertEquals( 363, schemaManager.getGlobalOidRegistry().size() );
 
         assertEquals( 5, schemaManager.getRegistries().getLoadedSchemas().size() );
         assertNotNull( schemaManager.getRegistries().getLoadedSchema( "system" ) );



Mime
View raw message