directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r732163 - /directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/operation/
Date Tue, 06 Jan 2009 22:43:37 GMT
Author: elecharny
Date: Tue Jan  6 14:43:36 2009
New Revision: 732163

URL: http://svn.apache.org/viewvc?rev=732163&view=rev
Log:
Remove all the executeX methods and replaced them by more explicit method names.

Modified:
    directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/operation/AddAttributeOperation.java
    directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/operation/AddEntryOperation.java
    directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/operation/AttributeOperation.java
    directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/operation/CompositeOperation.java
    directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/operation/DeleteAttributeOperation.java
    directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/operation/Operation.java
    directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/operation/ReplaceAttributeOperation.java

Modified: directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/operation/AddAttributeOperation.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/operation/AddAttributeOperation.java?rev=732163&r1=732162&r2=732163&view=diff
==============================================================================
--- directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/operation/AddAttributeOperation.java
(original)
+++ directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/operation/AddAttributeOperation.java
Tue Jan  6 14:43:36 2009
@@ -82,7 +82,7 @@
      * @param nexus the partition which will be modified
      * @param coreSession the current session
      */
-    protected void execute1( PartitionNexus nexus, CoreSession coreSession ) throws Exception
+    protected void modifyAttribute( PartitionNexus nexus, CoreSession coreSession ) throws
Exception
     {
         DirectoryService ds = coreSession.getDirectoryService();
         ServerEntry serverEntry = ds.newEntry( LdapDN.EMPTY_LDAPDN );

Modified: directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/operation/AddEntryOperation.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/operation/AddEntryOperation.java?rev=732163&r1=732162&r2=732163&view=diff
==============================================================================
--- directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/operation/AddEntryOperation.java
(original)
+++ directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/operation/AddEntryOperation.java
Tue Jan  6 14:43:36 2009
@@ -45,11 +45,11 @@
 public class AddEntryOperation extends Operation
 {
     /**
-     * Declares the Serial Version Uid.
+     * Declares the Serial Version UID.
      *
      * @see <a
      *      href="http://c2.com/cgi/wiki?AlwaysDeclareSerialVersionUid">Always
-     *      Declare Serial Version Uid</a>
+     *      Declare Serial Version UID</a>
      */
     private static final long serialVersionUID = 2294492811671880570L;
 
@@ -60,7 +60,7 @@
     /**
      * Creates a new operation that adds the specified entry. This 
      * constructor will not be visible out of this package, as it is 
-     * only used for the deserialization process.
+     * only used for the de-serialization process.
      * 
      * @param registries the registries instance
      */
@@ -89,10 +89,10 @@
      * Inject the entry into the local server
      * 
      * @param nexus the local partition to update
-     * @param store not used... Just for inheritence sake.
+     * @param store not used... Just for inheritance sake.
      * @param coreSession the current session
      */
-    protected void execute0( PartitionNexus nexus, ReplicationStore store, CoreSession coreSession
)
+    protected void applyOperation( PartitionNexus nexus, ReplicationStore store, CoreSession
coreSession )
         throws Exception
     {
         if ( ! EntryUtil.isEntryUpdatable( coreSession, entry.getDn(), getCSN() ) )

Modified: directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/operation/AttributeOperation.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/operation/AttributeOperation.java?rev=732163&r1=732162&r2=732163&view=diff
==============================================================================
--- directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/operation/AttributeOperation.java
(original)
+++ directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/operation/AttributeOperation.java
Tue Jan  6 14:43:36 2009
@@ -96,7 +96,7 @@
      * @param store the replication storage
      * @param coreSession the current session
      */
-    protected final void execute0( PartitionNexus nexus, ReplicationStore store, CoreSession
coreSession ) 
+    protected final void applyOperation( PartitionNexus nexus, ReplicationStore store, CoreSession
coreSession ) 
         throws Exception
     {
         if ( ! EntryUtil.isEntryUpdatable( coreSession, dn, getCSN() ) )
@@ -106,7 +106,7 @@
         
         EntryUtil.createGlueEntries( coreSession, dn, true );
 
-        execute1( nexus, coreSession );
+        modifyAttribute( nexus, coreSession );
     }
 
 
@@ -117,7 +117,7 @@
      * @param coreSession the current session
      * @throws Exception 
      */
-    protected abstract void execute1( PartitionNexus nexus, CoreSession coreSession ) throws
Exception;
+    protected abstract void modifyAttribute( PartitionNexus nexus, CoreSession coreSession
) throws Exception;
 
 
     /**

Modified: directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/operation/CompositeOperation.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/operation/CompositeOperation.java?rev=732163&r1=732162&r2=732163&view=diff
==============================================================================
--- directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/operation/CompositeOperation.java
(original)
+++ directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/operation/CompositeOperation.java
Tue Jan  6 14:43:36 2009
@@ -205,7 +205,7 @@
      * @param store the replication store
      * @param coreSession the current session
      */
-    protected void execute0( PartitionNexus nexus, ReplicationStore store, CoreSession coreSession
) 
+    protected void applyOperation( PartitionNexus nexus, ReplicationStore store, CoreSession
coreSession ) 
         throws Exception
     {
         for ( Operation op : children )

Modified: directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/operation/DeleteAttributeOperation.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/operation/DeleteAttributeOperation.java?rev=732163&r1=732162&r2=732163&view=diff
==============================================================================
--- directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/operation/DeleteAttributeOperation.java
(original)
+++ directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/operation/DeleteAttributeOperation.java
Tue Jan  6 14:43:36 2009
@@ -83,7 +83,7 @@
      * @param nexus the partition which will be modified
      * @param coreSession the current session
      */
-    protected void execute1( PartitionNexus nexus, CoreSession coreSession ) throws Exception
+    protected void modifyAttribute( PartitionNexus nexus, CoreSession coreSession ) throws
Exception
     {
         DirectoryService ds = coreSession.getDirectoryService();
         ServerEntry serverEntry = ds.newEntry( LdapDN.EMPTY_LDAPDN );

Modified: directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/operation/Operation.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/operation/Operation.java?rev=732163&r1=732162&r2=732163&view=diff
==============================================================================
--- directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/operation/Operation.java
(original)
+++ directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/operation/Operation.java
Tue Jan  6 14:43:36 2009
@@ -44,7 +44,7 @@
 
 /**
  * Represents an operation performed on one or more entries in replicated
- * {@link Partition}.  Each {@link Operation} has its own {@link CSN} which
+ * {@link Partition}. Each {@link Operation} has its own {@link CSN} which
  * identifies itself.
  * <p>
  * An {@link Operation} is usually created by calling factory methods in
@@ -62,11 +62,11 @@
 public class Operation implements Externalizable
 {
     /**
-     * Declares the Serial Version Uid.
+     * Declares the Serial Version UID.
      *
      * @see <a
      *      href="http://c2.com/cgi/wiki?AlwaysDeclareSerialVersionUid">Always
-     *      Declare Serial Version Uid</a>
+     *      Declare Serial Version UID</a>
      */
     private static final long serialVersionUID = 1L;
 
@@ -82,8 +82,8 @@
 
     /**
      * Creates a new instance of Operation, for the entry which
-     * csn is given as a parameter. This constructor is not visible
-     * out of this package, as it's only used for the deserialization 
+     * CSN is given as a parameter. This constructor is not visible
+     * out of this package, as it's only used for the de-serialization 
      * process.
      *
      * @param registries the server registries
@@ -102,7 +102,7 @@
      *
      * @param registries the server registries
      * @param operationType the operation type
-     * @param csn The entry's csn.
+     * @param csn The entry's CSN.
      */
     protected Operation( Registries registries, OperationType operationType, CSN csn )
     {
@@ -134,20 +134,20 @@
     {
         synchronized ( nexus )
         {
-            execute0( nexus, store, coreSession );
+            applyOperation( nexus, store, coreSession );
             store.putLog( this );
         }
     }
 
     /**
-     * Not supported. We should neve call this method directly.
+     * Not supported. We should never call this method directly.
      * 
      * @param nexus the partition nexus
      * @param store the replication store
      * @param coreSession the current session
      * @throws Exception
      */
-    protected void execute0( PartitionNexus nexus, ReplicationStore store, CoreSession coreSession
) 
+    protected void applyOperation( PartitionNexus nexus, ReplicationStore store, CoreSession
coreSession ) 
         throws Exception
     {
         throw new OperationNotSupportedException( nexus.getSuffixDn().toString() );
@@ -155,7 +155,7 @@
 
     
     /**
-     * Deserialize an Attribute Operation
+     * De-serialize an Attribute Operation
      *
      * @param in the stream from which we will read an AttributeOperation
      * @param registries the server registries
@@ -179,7 +179,7 @@
             // Get the AttributeType
             AttributeType at = registries.getAttributeTypeRegistry().lookup( id );
             
-            // Deserialize the attribute
+            // De-serialize the attribute
             DefaultServerAttribute attribute = new DefaultServerAttribute( id, at );
             attribute.deserialize( in );
             
@@ -197,11 +197,11 @@
     
     
     /**
-     * Deserialize an operation. This is a recursive method, as we may have 
+     * De-serialize an operation. This is a recursive method, as we may have 
      * composite operations.
      *
      * @param registries The server registries
-     * @param in the stream wrom which we will read an operation
+     * @param in the stream from which we will read an operation
      * @return an operation
      * @throws ClassNotFoundException
      * @throws IOException

Modified: directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/operation/ReplaceAttributeOperation.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/operation/ReplaceAttributeOperation.java?rev=732163&r1=732162&r2=732163&view=diff
==============================================================================
--- directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/operation/ReplaceAttributeOperation.java
(original)
+++ directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/operation/ReplaceAttributeOperation.java
Tue Jan  6 14:43:36 2009
@@ -85,7 +85,7 @@
      * @param nexus the partition which will be modified
      * @param coreSession the current session
      */
-    protected void execute1( PartitionNexus nexus, CoreSession coreSession ) throws Exception
+    protected void modifyAttribute( PartitionNexus nexus, CoreSession coreSession ) throws
Exception
     {
         DirectoryService ds = coreSession.getDirectoryService();
         ServerEntry serverEntry = ds.newEntry( LdapDN.EMPTY_LDAPDN );



Mime
View raw message