directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r780345 - in /directory/apacheds/trunk: bootstrap-extract/src/main/java/org/apache/directory/server/schema/bootstrap/partition/ core/src/main/java/org/apache/directory/server/core/ core/src/main/java/org/apache/directory/server/core/operati...
Date Sat, 30 May 2009 22:22:40 GMT
Author: elecharny
Date: Sat May 30 22:22:39 2009
New Revision: 780345

URL: http://svn.apache.org/viewvc?rev=780345&view=rev
Log:
o Rename the apacheExistance AT to apacheExistence
o Adding EntryCSN and entryUUID to entries

Modified:
    directory/apacheds/trunk/bootstrap-extract/src/main/java/org/apache/directory/server/schema/bootstrap/partition/DbFileListing.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/operational/OperationalAttributeInterceptor.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/BTreePartition.java
    directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/schema/SchemaServiceTest.java
    directory/apacheds/trunk/schema-bootstrap/src/main/schema/apache.schema
    directory/apacheds/trunk/server-xml/src/main/resources/serverJdbmPartition.xml

Modified: directory/apacheds/trunk/bootstrap-extract/src/main/java/org/apache/directory/server/schema/bootstrap/partition/DbFileListing.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/bootstrap-extract/src/main/java/org/apache/directory/server/schema/bootstrap/partition/DbFileListing.java?rev=780345&r1=780344&r2=780345&view=diff
==============================================================================
--- directory/apacheds/trunk/bootstrap-extract/src/main/java/org/apache/directory/server/schema/bootstrap/partition/DbFileListing.java
(original)
+++ directory/apacheds/trunk/bootstrap-extract/src/main/java/org/apache/directory/server/schema/bootstrap/partition/DbFileListing.java
Sat May 30 22:22:39 2009
@@ -61,7 +61,7 @@
      * schema/apacheOnealias.db => SYSTEM_INDEX
      * schema/apacheSubalias.db => SYSTEM_INDEX
      * schema/apacheNdn.db => SYSTEM_INDEX
-     * schema/apacheExistance.db => SYSTEM_INDEX
+     * schema/apacheExistence.db => SYSTEM_INDEX
      * schema/apacheAlias.db => SYSTEM_INDEX
      * schema/apacheOneLevel.db => SYSTEM_INDEX
      * schema/apacheUpdn.db => SYSTEM_INDEX

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?rev=780345&r1=780344&r2=780345&view=diff
==============================================================================
--- 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 May 30 22:22:39 2009
@@ -20,6 +20,7 @@
 package org.apache.directory.server.core;
 
 
+import org.apache.directory.server.constants.ApacheSchemaConstants;
 import org.apache.directory.server.constants.ServerDNConstants;
 import org.apache.directory.server.core.authn.AuthenticationInterceptor;
 import org.apache.directory.server.core.authn.LdapPrincipal;
@@ -117,6 +118,7 @@
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
+import java.util.UUID;
 
 
 /**
@@ -1076,6 +1078,8 @@
             serverEntry.put( SchemaConstants.CREATORS_NAME_AT, ServerDNConstants.ADMIN_SYSTEM_DN_NORMALIZED
);
             serverEntry.put( SchemaConstants.CREATE_TIMESTAMP_AT, DateUtils.getGeneralizedTime()
);
             serverEntry.put( SchemaConstants.DISPLAY_NAME_AT, "Directory Superuser" );
+            serverEntry.add( ApacheSchemaConstants.ENTRY_CSN_AT, getCSN().toString() );
+            serverEntry.add( ApacheSchemaConstants.ENTRY_UUID_AT, StringTools.getBytesUtf8(
UUID.randomUUID().toString() ) );
 
             TlsKeyGenerator.addKeyPair( serverEntry );
             partitionNexus.add( new AddOperationContext( adminSession, serverEntry ) );
@@ -1102,6 +1106,8 @@
             serverEntry.put( SchemaConstants.OU_AT, "users" );
             serverEntry.put( SchemaConstants.CREATORS_NAME_AT, ServerDNConstants.ADMIN_SYSTEM_DN_NORMALIZED
);
             serverEntry.put( SchemaConstants.CREATE_TIMESTAMP_AT, DateUtils.getGeneralizedTime()
);
+            serverEntry.add( ApacheSchemaConstants.ENTRY_CSN_AT, getCSN().toString() );
+            serverEntry.add( ApacheSchemaConstants.ENTRY_UUID_AT, StringTools.getBytesUtf8(
UUID.randomUUID().toString() ) );
 
             partitionNexus.add( new AddOperationContext( adminSession, serverEntry ) );
         }
@@ -1126,6 +1132,8 @@
             serverEntry.put( SchemaConstants.OU_AT, "groups" );
             serverEntry.put( SchemaConstants.CREATORS_NAME_AT, ServerDNConstants.ADMIN_SYSTEM_DN_NORMALIZED
);
             serverEntry.put( SchemaConstants.CREATE_TIMESTAMP_AT, DateUtils.getGeneralizedTime()
);
+            serverEntry.add( ApacheSchemaConstants.ENTRY_CSN_AT, getCSN().toString() );
+            serverEntry.add( ApacheSchemaConstants.ENTRY_UUID_AT, StringTools.getBytesUtf8(
UUID.randomUUID().toString() ) );
 
             partitionNexus.add( new AddOperationContext( adminSession, serverEntry ) );
         }
@@ -1151,6 +1159,8 @@
             serverEntry.put( SchemaConstants.UNIQUE_MEMBER_AT, ServerDNConstants.ADMIN_SYSTEM_DN_NORMALIZED
);
             serverEntry.put( SchemaConstants.CREATORS_NAME_AT, ServerDNConstants.ADMIN_SYSTEM_DN_NORMALIZED
);
             serverEntry.put( SchemaConstants.CREATE_TIMESTAMP_AT, DateUtils.getGeneralizedTime()
);
+            serverEntry.add( ApacheSchemaConstants.ENTRY_CSN_AT, getCSN().toString() );
+            serverEntry.add( ApacheSchemaConstants.ENTRY_UUID_AT, StringTools.getBytesUtf8(
UUID.randomUUID().toString() ) );
 
             partitionNexus.add( new AddOperationContext( adminSession, serverEntry ) );
 
@@ -1195,6 +1205,8 @@
             serverEntry.put( SchemaConstants.OU_AT, "configuration" );
             serverEntry.put( SchemaConstants.CREATORS_NAME_AT, ServerDNConstants.ADMIN_SYSTEM_DN_NORMALIZED
);
             serverEntry.put( SchemaConstants.CREATE_TIMESTAMP_AT, DateUtils.getGeneralizedTime()
);
+            serverEntry.add( ApacheSchemaConstants.ENTRY_CSN_AT, getCSN().toString() );
+            serverEntry.add( ApacheSchemaConstants.ENTRY_UUID_AT, StringTools.getBytesUtf8(
UUID.randomUUID().toString() ) );
 
             partitionNexus.add( new AddOperationContext( adminSession, serverEntry ) );
         }
@@ -1212,10 +1224,11 @@
 
             ServerEntry serverEntry = new DefaultServerEntry( registries, partitionsDn );
             serverEntry.put( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC, SchemaConstants.ORGANIZATIONAL_UNIT_OC
);
-
             serverEntry.put( SchemaConstants.OU_AT, "partitions" );
             serverEntry.put( SchemaConstants.CREATORS_NAME_AT, ServerDNConstants.ADMIN_SYSTEM_DN_NORMALIZED
);
             serverEntry.put( SchemaConstants.CREATE_TIMESTAMP_AT, DateUtils.getGeneralizedTime()
);
+            serverEntry.add( ApacheSchemaConstants.ENTRY_CSN_AT, getCSN().toString() );
+            serverEntry.add( ApacheSchemaConstants.ENTRY_UUID_AT, StringTools.getBytesUtf8(
UUID.randomUUID().toString() ) );
 
             partitionNexus.add( new AddOperationContext( adminSession, serverEntry ) );
         }
@@ -1237,6 +1250,8 @@
             serverEntry.put( SchemaConstants.OU_AT, "services" );
             serverEntry.put( SchemaConstants.CREATORS_NAME_AT, ServerDNConstants.ADMIN_SYSTEM_DN_NORMALIZED
);
             serverEntry.put( SchemaConstants.CREATE_TIMESTAMP_AT, DateUtils.getGeneralizedTime()
);
+            serverEntry.add( ApacheSchemaConstants.ENTRY_CSN_AT, getCSN().toString() );
+            serverEntry.add( ApacheSchemaConstants.ENTRY_UUID_AT, StringTools.getBytesUtf8(
UUID.randomUUID().toString() ) );
 
             partitionNexus.add( new AddOperationContext( adminSession, serverEntry ) );
         }
@@ -1258,6 +1273,8 @@
             serverEntry.put( SchemaConstants.OU_AT, "interceptors" );
             serverEntry.put( SchemaConstants.CREATORS_NAME_AT, ServerDNConstants.ADMIN_SYSTEM_DN_NORMALIZED
);
             serverEntry.put( SchemaConstants.CREATE_TIMESTAMP_AT, DateUtils.getGeneralizedTime()
);
+            serverEntry.add( ApacheSchemaConstants.ENTRY_CSN_AT, getCSN().toString() );
+            serverEntry.add( ApacheSchemaConstants.ENTRY_UUID_AT, StringTools.getBytesUtf8(
UUID.randomUUID().toString() ) );
 
             partitionNexus.add( new AddOperationContext( adminSession, serverEntry ) );
         }
@@ -1282,6 +1299,8 @@
             serverEntry.put( "prefNodeName", "sysPrefRoot" );
             serverEntry.put( SchemaConstants.CREATORS_NAME_AT, ServerDNConstants.ADMIN_SYSTEM_DN_NORMALIZED
);
             serverEntry.put( SchemaConstants.CREATE_TIMESTAMP_AT, DateUtils.getGeneralizedTime()
);
+            serverEntry.add( ApacheSchemaConstants.ENTRY_CSN_AT, getCSN().toString() );
+            serverEntry.add( ApacheSchemaConstants.ENTRY_UUID_AT, StringTools.getBytesUtf8(
UUID.randomUUID().toString() ) );
 
             partitionNexus.add( new AddOperationContext( adminSession, serverEntry ) );
         }

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeInterceptor.java?rev=780345&r1=780344&r2=780345&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeInterceptor.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeInterceptor.java
Sat May 30 22:22:39 2009
@@ -158,7 +158,7 @@
     /**
      * Adds extra operational attributes to the entry before it is added.
      * 
-     * We add thos attributes :
+     * We add those attributes :
      * - creatorsName
      * - createTimestamp
      * - entryCSN
@@ -197,7 +197,7 @@
         // Add the UUID and the entryCSN. The UUID is stored as a byte[] representation of

         // its String value
         entry.put( ApacheSchemaConstants.ENTRY_UUID_AT, StringTools.getBytesUtf8( UUID.randomUUID().toString()
) );
-        entry.put( ApacheSchemaConstants.ENTRY_CSN_AT, service.getCSN().getBytes() );
+        entry.put( ApacheSchemaConstants.ENTRY_CSN_AT, service.getCSN().toString() );
         
         nextInterceptor.add( opContext );
     }

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?rev=780345&r1=780344&r2=780345&view=diff
==============================================================================
--- 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 May 30 22:22:39 2009
@@ -20,6 +20,7 @@
 package org.apache.directory.server.core.partition;
 
 
+import org.apache.directory.server.constants.ApacheSchemaConstants;
 import org.apache.directory.server.constants.ServerDNConstants;
 import org.apache.directory.server.core.CoreSession;
 import org.apache.directory.server.core.DefaultCoreSession;
@@ -106,6 +107,7 @@
 import java.util.Map;
 import java.util.Properties;
 import java.util.Set;
+import java.util.UUID;
 
 
 /**
@@ -421,6 +423,8 @@
         // Add some operational attributes
         systemEntry.put( SchemaConstants.CREATORS_NAME_AT, ServerDNConstants.ADMIN_SYSTEM_DN
);
         systemEntry.put( SchemaConstants.CREATE_TIMESTAMP_AT, DateUtils.getGeneralizedTime()
);
+        systemEntry.add( ApacheSchemaConstants.ENTRY_CSN_AT, directoryService.getCSN().toString()
);
+        systemEntry.add( ApacheSchemaConstants.ENTRY_UUID_AT, StringTools.getBytesUtf8( UUID.randomUUID().toString()
) );
         systemEntry.put( NamespaceTools.getRdnAttribute( ServerDNConstants.SYSTEM_DN ),
             NamespaceTools.getRdnValue( ServerDNConstants.SYSTEM_DN ) );
         LdapDN adminDn = new LdapDN( ServerDNConstants.ADMIN_SYSTEM_DN_NORMALIZED );

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java?rev=780345&r1=780344&r2=780345&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java
Sat May 30 22:22:39 2009
@@ -405,10 +405,10 @@
 
 
     /**
-     * Sets the attribute existance Index.
+     * Sets the attribute existence Index.
      *
      * @org.apache.xbean.Property hidden="true"
-     * @param index the attribute existance Index
+     * @param index the attribute existence Index
      * @throws Exception if there is a problem setting up the index
      */
     public abstract void setPresenceIndexOn( Index<String,ServerEntry> index ) throws
Exception;

Modified: directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/schema/SchemaServiceTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/schema/SchemaServiceTest.java?rev=780345&r1=780344&r2=780345&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/schema/SchemaServiceTest.java
(original)
+++ directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/schema/SchemaServiceTest.java
Sat May 30 22:22:39 2009
@@ -83,7 +83,7 @@
         assertTrue( nameAttrs.contains( "sn" ) );
         assertTrue( nameAttrs.contains( "title" ) );
         assertTrue( nameAttrs.contains( "l" ) );
-        assertTrue( nameAttrs.contains( "apacheExistance" ) );
+        assertTrue( nameAttrs.contains( "apacheExistence" ) );
         assertTrue( nameAttrs.contains( "cn" ) );
         assertTrue( nameAttrs.contains( "st" ) );
         assertTrue( nameAttrs.contains( "givenName" ) );

Modified: directory/apacheds/trunk/schema-bootstrap/src/main/schema/apache.schema
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/schema-bootstrap/src/main/schema/apache.schema?rev=780345&r1=780344&r2=780345&view=diff
==============================================================================
--- directory/apacheds/trunk/schema-bootstrap/src/main/schema/apache.schema (original)
+++ directory/apacheds/trunk/schema-bootstrap/src/main/schema/apache.schema Sat May 30 22:22:39
2009
@@ -45,7 +45,7 @@
 #            +------------------------------+----------------------------------+
 #            | 1.3.6.1.4.1.18060.0.4.1.2.1  | apacheNdn                        |
 #            | 1.3.6.1.4.1.18060.0.4.1.2.2  | apacheUpdn                       |
-#            | 1.3.6.1.4.1.18060.0.4.1.2.3  | apacheExistance                  |
+#            | 1.3.6.1.4.1.18060.0.4.1.2.3  | apacheExistence                  |
 #            | 1.3.6.1.4.1.18060.0.4.1.2.4  | apacheOneLevel                   |
 #            | 1.3.6.1.4.1.18060.0.4.1.2.5  | apacheOneAlias                   |
 #            | 1.3.6.1.4.1.18060.0.4.1.2.6  | apacheSubAlias                   |
@@ -115,7 +115,7 @@
     NO-USER-MODIFICATION
     USAGE dSAOperation )
 
-attributetype ( 1.3.6.1.4.1.18060.0.4.1.2.3 NAME 'apacheExistance'
+attributetype ( 1.3.6.1.4.1.18060.0.4.1.2.3 NAME 'apacheExistence'
     DESC 'Index attribute used to track the existence of attributes'
     SUP name
     EQUALITY caseIgnoreMatch

Modified: directory/apacheds/trunk/server-xml/src/main/resources/serverJdbmPartition.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-xml/src/main/resources/serverJdbmPartition.xml?rev=780345&r1=780344&r2=780345&view=diff
==============================================================================
--- directory/apacheds/trunk/server-xml/src/main/resources/serverJdbmPartition.xml (original)
+++ directory/apacheds/trunk/server-xml/src/main/resources/serverJdbmPartition.xml Sat May
30 22:22:39 2009
@@ -37,7 +37,7 @@
         <indexedAttributes>
           <jdbmIndex attributeId="apacheNdn" cacheSize="100"/>
           <jdbmIndex attributeId="apacheUpdn" cacheSize="100"/>
-          <jdbmIndex attributeId="apacheExistance" cacheSize="100"/>
+          <jdbmIndex attributeId="apacheExistence" cacheSize="100"/>
           <jdbmIndex attributeId="apacheOneLevel" cacheSize="100"/>
           <jdbmIndex attributeId="apacheOneAlias" cacheSize="10"/>
           <jdbmIndex attributeId="apacheSubAlias" cacheSize="10"/>
@@ -58,7 +58,7 @@
         <indexedAttributes>
           <jdbmIndex attributeId="apacheNdn" cacheSize="100"/>
           <jdbmIndex attributeId="apacheUpdn" cacheSize="100"/>
-          <jdbmIndex attributeId="apacheExistance" cacheSize="100"/>
+          <jdbmIndex attributeId="apacheExistence" cacheSize="100"/>
           <jdbmIndex attributeId="apacheOneLevel" cacheSize="100"/>
           <jdbmIndex attributeId="apacheOneAlias" cacheSize="10"/>
           <jdbmIndex attributeId="apacheSubAlias" cacheSize="10"/>



Mime
View raw message