jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1171101 - in /jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi: hierarchy/ operation/ state/
Date Thu, 15 Sep 2011 13:50:52 GMT
Author: mduerig
Date: Thu Sep 15 13:50:51 2011
New Revision: 1171101

URL: http://svn.apache.org/viewvc?rev=1171101&view=rev
Log:
Microkernel based Jackrabbit prototype (WIP) 
refactor: avoid down casting Operation 

Added:
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AbstractOperationVisitor.java
      - copied, changed from r1171011, jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/TransientOperationVisitor.java
Modified:
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/NodeEntry.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AddLabel.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AddNode.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AddProperty.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Checkin.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Checkout.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Checkpoint.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Clone.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Copy.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/CreateActivity.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/CreateConfiguration.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/LockOperation.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/LockRefresh.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/LockRelease.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Merge.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Move.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Remove.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/RemoveActivity.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/RemoveLabel.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/RemoveVersion.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/ReorderNodes.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/ResolveMergeConflict.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Restore.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/SetMixin.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/SetPrimaryType.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/SetPropertyValue.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/TransientOperationVisitor.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Update.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/WorkspaceImport.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/ChangeLog.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/SessionItemStateManager.java

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/NodeEntry.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/NodeEntry.java?rev=1171101&r1=1171100&r2=1171101&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/NodeEntry.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/NodeEntry.java
Thu Sep 15 13:50:51 2011
@@ -17,6 +17,7 @@
 package org.apache.jackrabbit.jcr2spi.hierarchy;
 
 import org.apache.commons.collections.iterators.IteratorChain;
+import org.apache.jackrabbit.jcr2spi.operation.AbstractOperationVisitor;
 import org.apache.jackrabbit.jcr2spi.operation.AddNode;
 import org.apache.jackrabbit.jcr2spi.operation.AddProperty;
 import org.apache.jackrabbit.jcr2spi.operation.Move;
@@ -103,6 +104,48 @@ public class NodeEntry extends Hierarchy
      */
     private final Map<Name, PropertyEntry> propertiesInAttic;
 
+    private final AbstractOperationVisitor operationVisitor = new AbstractOperationVisitor()
{
+        @Override
+        public void visit(AddNode operation) throws RepositoryException {
+            complete(operation);
+        }
+
+        @Override
+        public void visit(AddProperty operation) throws RepositoryException {
+            complete(operation);
+        }
+
+        @Override
+        public void visit(SetMixin operation) throws RepositoryException {
+            complete(operation);
+        }
+
+        @Override
+        public void visit(SetPrimaryType operation) throws RepositoryException {
+            complete(operation);
+        }
+
+        @Override
+        public void visit(Remove operation) throws RepositoryException {
+            complete(operation);
+        }
+
+        @Override
+        public void visit(ReorderNodes operation) throws RepositoryException {
+            complete(operation);
+        }
+
+        @Override
+        public void visit(Move operation) throws RepositoryException {
+            complete(operation);
+        }
+
+        @Override
+        protected void unimplemented(Operation operation) {
+            throw new IllegalArgumentException("Invalid operation: " + operation.getName());
+        }
+    };
+
     /**
      * Upon transient 'move' ('rename') or 'reorder' of SNSs this
      * {@code NodeEntry} remembers the original parent, name and index
@@ -259,23 +302,7 @@ public class NodeEntry extends Hierarchy
 
     @Override
     public void complete(Operation operation) throws RepositoryException {
-        if (operation instanceof AddNode) {
-            complete((AddNode) operation);
-        } else if (operation instanceof AddProperty) {
-            complete((AddProperty) operation);
-        } else if (operation instanceof SetMixin) {
-            complete((SetMixin) operation);
-        } else if (operation instanceof SetPrimaryType) {
-            complete((SetPrimaryType) operation);
-        } else if (operation instanceof Remove) {
-            complete((Remove) operation);
-        } else if (operation instanceof ReorderNodes) {
-            complete((ReorderNodes) operation);
-        } else if (operation instanceof Move) {
-            complete((Move) operation);
-        } else {
-            throw new IllegalArgumentException();
-        }
+        operation.accept(operationVisitor);
     }
 
     //----------------------------------------------------------< NodeEntry >---

Copied: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AbstractOperationVisitor.java
(from r1171011, jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/TransientOperationVisitor.java)
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AbstractOperationVisitor.java?p2=jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AbstractOperationVisitor.java&p1=jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/TransientOperationVisitor.java&r1=1171011&r2=1171101&rev=1171101&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/TransientOperationVisitor.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AbstractOperationVisitor.java
Thu Sep 15 13:50:51 2011
@@ -16,116 +16,159 @@
  */
 package org.apache.jackrabbit.jcr2spi.operation;
 
-import javax.jcr.AccessDeniedException;
-import javax.jcr.InvalidItemStateException;
-import javax.jcr.ItemExistsException;
-import javax.jcr.MergeException;
-import javax.jcr.NoSuchWorkspaceException;
-import javax.jcr.PathNotFoundException;
-import javax.jcr.ReferentialIntegrityException;
 import javax.jcr.RepositoryException;
-import javax.jcr.UnsupportedRepositoryOperationException;
-import javax.jcr.lock.LockException;
-import javax.jcr.nodetype.ConstraintViolationException;
-import javax.jcr.version.VersionException;
 
 /**
- * {@code TransientOperationVisitor}...
+ * This abstract base class implements the {@code OperationVisitor} interface
+ * by forwarding all visit method calls to the {@link #unimplemented(Operation)}
+ * method. Implementations may decide how to handle unimplemented operations here. 
  */
-public abstract class TransientOperationVisitor implements OperationVisitor {
+public abstract class AbstractOperationVisitor implements OperationVisitor {
+
+    /**
+     * Calls to this method indicate that a concrete implementation did not overwrite
+     * the visit method for the given operation. The default implementation of this
+     * method does nothing.
+     * 
+     * @param operation
+     * @throws RepositoryException
+     */
+    protected void unimplemented(Operation operation) throws RepositoryException {
+        //empty
+    }
+    
+    @Override
+    public void visit(AddNode operation) throws RepositoryException {
+        unimplemented(operation);
+    }
+
+    @Override
+    public void visit(AddProperty operation) throws RepositoryException {
+        unimplemented(operation);
+    }
+
+    @Override
+    public void visit(Remove operation) throws RepositoryException {
+        unimplemented(operation);
+    }
+
+    @Override
+    public void visit(SetMixin operation) throws RepositoryException {
+        unimplemented(operation);
+    }
+
+    @Override
+    public void visit(SetPrimaryType operation) throws RepositoryException {
+        unimplemented(operation);
+    }
+
+    @Override
+    public void visit(SetPropertyValue operation) throws RepositoryException {
+        unimplemented(operation);
+    }
+
+    @Override
+    public void visit(ReorderNodes operation) throws RepositoryException {
+        unimplemented(operation);
+    }
 
     @Override
     public void visit(Clone operation) throws RepositoryException {
-        throw new UnsupportedOperationException("Internal error: Clone isn't a transient
operation.");
+        unimplemented(operation);
     }
 
     @Override
     public void visit(Copy operation) throws RepositoryException {
-        throw new UnsupportedOperationException("Internal error: Copy  isn't a transient
operation.");
+        unimplemented(operation);
+    }
+
+    @Override
+    public void visit(Move operation) throws RepositoryException {
+        unimplemented(operation);
     }
 
     @Override
     public void visit(Checkout operation) throws RepositoryException {
-        throw new UnsupportedOperationException("Internal error: Checkout isn't a transient
operation.");
+        unimplemented(operation);
     }
 
     @Override
     public void visit(Checkin operation) throws RepositoryException {
-        throw new UnsupportedOperationException("Internal error: Checkin isn't a transient
operation.");
+        unimplemented(operation);
     }
 
     @Override
     public void visit(Checkpoint operation) throws RepositoryException {
-        throw new UnsupportedOperationException("Internal error: Checkin isn't a transient
operation.");
+        unimplemented(operation);
     }
 
     @Override
     public void visit(Update operation) throws RepositoryException {
-        throw new UnsupportedOperationException("Internal error: Update isn't a transient
operation.");
+        unimplemented(operation);
     }
 
     @Override
     public void visit(Restore operation) throws RepositoryException {
-        throw new UnsupportedOperationException("Internal error: Restore isn't a transient
operation.");
+        unimplemented(operation);
     }
 
     @Override
     public void visit(Merge operation) throws RepositoryException {
-        throw new UnsupportedOperationException("Internal error: Merge isn't a transient
operation.");
+        unimplemented(operation);
     }
 
     @Override
     public void visit(ResolveMergeConflict operation) throws RepositoryException {
-        throw new UnsupportedOperationException("Internal error: ResolveMergeConflict isn't
a transient operation.");
+        unimplemented(operation);
     }
 
     @Override
     public void visit(LockOperation operation) throws RepositoryException {
-        throw new UnsupportedOperationException("Internal error: Lock isn't a transient operation.");
+        unimplemented(operation);
     }
 
     @Override
     public void visit(LockRefresh operation) throws RepositoryException {
-        throw new UnsupportedOperationException("Internal error: LockRefresh isn't a transient
operation.");
+        unimplemented(operation);
     }
 
     @Override
     public void visit(LockRelease operation) throws RepositoryException {
-        throw new UnsupportedOperationException("Internal error: LockRelease isn't a transient
operation.");
+        unimplemented(operation);
     }
 
     @Override
     public void visit(AddLabel operation) throws RepositoryException {
-        throw new UnsupportedOperationException("Internal error: AddLabel isn't a transient
operation.");
+        unimplemented(operation);
     }
 
     @Override
     public void visit(RemoveLabel operation) throws RepositoryException {
-        throw new UnsupportedOperationException("Internal error: RemoveLabel isn't a transient
operation.");
+        unimplemented(operation);
     }
 
     @Override
     public void visit(RemoveVersion operation) throws RepositoryException {
-        throw new UnsupportedOperationException("Internal error: RemoveVersion isn't a transient
operation.");
+        unimplemented(operation);
     }
 
     @Override
     public void visit(WorkspaceImport operation) throws RepositoryException {
-        throw new UnsupportedOperationException("Internal error: WorkspaceImport isn't a
transient operation.");
+        unimplemented(operation);
     }
 
     @Override
     public void visit(CreateActivity operation) throws RepositoryException {
-        throw new UnsupportedOperationException("Internal error: CreateActivity isn't a transient
operation.");
+        unimplemented(operation);
     }
 
     @Override
     public void visit(RemoveActivity operation) throws RepositoryException {
-        throw new UnsupportedOperationException("Internal error: RemoveActivity isn't a transient
operation.");
+        unimplemented(operation);
     }
 
     @Override
     public void visit(CreateConfiguration operation) throws RepositoryException {
-        throw new UnsupportedOperationException("Internal error: CreateConfiguration isn't
a transient operation.");
+        unimplemented(operation);
     }
 }
\ No newline at end of file

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AddLabel.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AddLabel.java?rev=1171101&r1=1171100&r2=1171101&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AddLabel.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AddLabel.java
Thu Sep 15 13:50:51 2011
@@ -67,7 +67,6 @@ public class AddLabel extends AbstractOp
      */
     @Override
     public void accept(OperationVisitor visitor) throws RepositoryException {
-        assertStatus(Status.PENDING);
         visitor.visit(this);
     }
 

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AddNode.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AddNode.java?rev=1171101&r1=1171100&r2=1171101&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AddNode.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AddNode.java
Thu Sep 15 13:50:51 2011
@@ -63,7 +63,6 @@ public class AddNode extends TransientOp
      */
     @Override
     public void accept(OperationVisitor visitor) throws RepositoryException {
-        assertStatus(Status.PENDING);
         visitor.visit(this);
     }
 

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AddProperty.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AddProperty.java?rev=1171101&r1=1171100&r2=1171101&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AddProperty.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AddProperty.java
Thu Sep 15 13:50:51 2011
@@ -64,7 +64,6 @@ public class AddProperty extends Transie
      */
     @Override
     public void accept(OperationVisitor visitor) throws RepositoryException {
-        assertStatus(Status.PENDING);
         visitor.visit(this);
     }
 

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Checkin.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Checkin.java?rev=1171101&r1=1171100&r2=1171101&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Checkin.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Checkin.java
Thu Sep 15 13:50:51 2011
@@ -51,7 +51,6 @@ public class Checkin extends AbstractOpe
      */
     @Override
     public void accept(OperationVisitor visitor) throws RepositoryException {
-        assertStatus(Status.PENDING);
         visitor.visit(this);
     }
 

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Checkout.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Checkout.java?rev=1171101&r1=1171100&r2=1171101&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Checkout.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Checkout.java
Thu Sep 15 13:50:51 2011
@@ -58,8 +58,6 @@ public class Checkout extends AbstractOp
 
     @Override
     public void accept(OperationVisitor visitor) throws RepositoryException {
-        assertStatus(Status.PENDING);
-        visitor.visit(this);
     }
 
     /**

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Checkpoint.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Checkpoint.java?rev=1171101&r1=1171100&r2=1171101&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Checkpoint.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Checkpoint.java
Thu Sep 15 13:50:51 2011
@@ -61,7 +61,6 @@ public class Checkpoint extends Abstract
 
     @Override
     public void accept(OperationVisitor visitor) throws RepositoryException {
-        assertStatus(Status.PENDING);
         visitor.visit(this);
     }
 

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Clone.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Clone.java?rev=1171101&r1=1171100&r2=1171101&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Clone.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Clone.java
Thu Sep 15 13:50:51 2011
@@ -45,7 +45,6 @@ public class Clone extends AbstractCopy 
      */
     @Override
     public void accept(OperationVisitor visitor) throws RepositoryException {
-        assertStatus(Status.PENDING);
         visitor.visit(this);
     }
 

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Copy.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Copy.java?rev=1171101&r1=1171100&r2=1171101&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Copy.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Copy.java
Thu Sep 15 13:50:51 2011
@@ -40,7 +40,6 @@ public class Copy extends AbstractCopy  
      */
     @Override
     public void accept(OperationVisitor visitor) throws RepositoryException {
-        assertStatus(Status.PENDING);
         visitor.visit(this);
     }
 

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/CreateActivity.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/CreateActivity.java?rev=1171101&r1=1171100&r2=1171101&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/CreateActivity.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/CreateActivity.java
Thu Sep 15 13:50:51 2011
@@ -38,7 +38,6 @@ public class CreateActivity extends Abst
 
     @Override
     public void accept(OperationVisitor visitor) throws RepositoryException {
-        assertStatus(Status.PENDING);
         visitor.visit(this);
     }
 

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/CreateConfiguration.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/CreateConfiguration.java?rev=1171101&r1=1171100&r2=1171101&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/CreateConfiguration.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/CreateConfiguration.java
Thu Sep 15 13:50:51 2011
@@ -38,7 +38,6 @@ public class CreateConfiguration extends
 
     @Override
     public void accept(OperationVisitor visitor) throws RepositoryException {
-        assertStatus(Status.PENDING);
         visitor.visit(this);
     }
 

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/LockOperation.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/LockOperation.java?rev=1171101&r1=1171100&r2=1171101&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/LockOperation.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/LockOperation.java
Thu Sep 15 13:50:51 2011
@@ -53,7 +53,6 @@ public class LockOperation extends Abstr
      */
     @Override
     public void accept(OperationVisitor visitor) throws RepositoryException {
-        assertStatus(Status.PENDING);
         visitor.visit(this);
     }
 

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/LockRefresh.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/LockRefresh.java?rev=1171101&r1=1171100&r2=1171101&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/LockRefresh.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/LockRefresh.java
Thu Sep 15 13:50:51 2011
@@ -40,7 +40,6 @@ public class LockRefresh extends Abstrac
      */
     @Override
     public void accept(OperationVisitor visitor) throws RepositoryException {
-        assertStatus(Status.PENDING);
         visitor.visit(this);
     }
 

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/LockRelease.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/LockRelease.java?rev=1171101&r1=1171100&r2=1171101&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/LockRelease.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/LockRelease.java
Thu Sep 15 13:50:51 2011
@@ -43,7 +43,6 @@ public class LockRelease extends Abstrac
      */
     @Override
     public void accept(OperationVisitor visitor) throws RepositoryException {
-        assertStatus(Status.PENDING);
         visitor.visit(this);
     }
 

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Merge.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Merge.java?rev=1171101&r1=1171100&r2=1171101&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Merge.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Merge.java
Thu Sep 15 13:50:51 2011
@@ -58,7 +58,6 @@ public class Merge extends AbstractOpera
      */
     @Override
     public void accept(OperationVisitor visitor) throws RepositoryException {
-        assertStatus(Status.PENDING);
         visitor.visit(this);
     }
 

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Move.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Move.java?rev=1171101&r1=1171100&r2=1171101&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Move.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Move.java
Thu Sep 15 13:50:51 2011
@@ -81,7 +81,6 @@ public class Move extends TransientOpera
      */
     @Override
     public void accept(OperationVisitor visitor) throws RepositoryException {
-        assertStatus(Status.PENDING);
         visitor.visit(this);
     }
 

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Remove.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Remove.java?rev=1171101&r1=1171100&r2=1171101&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Remove.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Remove.java
Thu Sep 15 13:50:51 2011
@@ -56,7 +56,6 @@ public class Remove extends TransientOpe
      */
     @Override
     public void accept(OperationVisitor visitor) throws RepositoryException {
-        assertStatus(Status.PENDING);
         visitor.visit(this);
     }
 

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/RemoveActivity.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/RemoveActivity.java?rev=1171101&r1=1171100&r2=1171101&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/RemoveActivity.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/RemoveActivity.java
Thu Sep 15 13:50:51 2011
@@ -46,7 +46,6 @@ public class RemoveActivity extends Abst
      */
     @Override
     public void accept(OperationVisitor visitor) throws RepositoryException {
-        assertStatus(Status.PENDING);
         visitor.visit(this);
     }
 

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/RemoveLabel.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/RemoveLabel.java?rev=1171101&r1=1171100&r2=1171101&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/RemoveLabel.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/RemoveLabel.java
Thu Sep 15 13:50:51 2011
@@ -66,7 +66,6 @@ public class RemoveLabel extends Abstrac
      */
     @Override
     public void accept(OperationVisitor visitor) throws RepositoryException {
-        assertStatus(Status.PENDING);
         visitor.visit(this);
     }
 

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/RemoveVersion.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/RemoveVersion.java?rev=1171101&r1=1171100&r2=1171101&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/RemoveVersion.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/RemoveVersion.java
Thu Sep 15 13:50:51 2011
@@ -50,7 +50,6 @@ public class RemoveVersion extends Abstr
      */
     @Override
     public void accept(OperationVisitor visitor) throws RepositoryException {
-        assertStatus(Status.PENDING);
         visitor.visit(this);
     }
 

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/ReorderNodes.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/ReorderNodes.java?rev=1171101&r1=1171100&r2=1171101&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/ReorderNodes.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/ReorderNodes.java
Thu Sep 15 13:50:51 2011
@@ -57,7 +57,6 @@ public class ReorderNodes extends Transi
      */
     @Override
     public void accept(OperationVisitor visitor) throws RepositoryException {
-        assertStatus(Status.PENDING);
         visitor.visit(this);
     }
 

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/ResolveMergeConflict.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/ResolveMergeConflict.java?rev=1171101&r1=1171100&r2=1171101&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/ResolveMergeConflict.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/ResolveMergeConflict.java
Thu Sep 15 13:50:51 2011
@@ -48,7 +48,6 @@ public class ResolveMergeConflict extend
      */
     @Override
     public void accept(OperationVisitor visitor) throws RepositoryException {
-        assertStatus(Status.PENDING);
         visitor.visit(this);
     }
 

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Restore.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Restore.java?rev=1171101&r1=1171100&r2=1171101&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Restore.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Restore.java
Thu Sep 15 13:50:51 2011
@@ -49,7 +49,6 @@ public class Restore extends AbstractOpe
      */
     @Override
     public void accept(OperationVisitor visitor) throws RepositoryException {
-        assertStatus(Status.PENDING);
         visitor.visit(this);
     }
 

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/SetMixin.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/SetMixin.java?rev=1171101&r1=1171100&r2=1171101&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/SetMixin.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/SetMixin.java
Thu Sep 15 13:50:51 2011
@@ -67,7 +67,6 @@ public class SetMixin extends TransientO
      */
     @Override
     public void accept(OperationVisitor visitor) throws RepositoryException {
-        assertStatus(Status.PENDING);
         visitor.visit(this);
     }
 

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/SetPrimaryType.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/SetPrimaryType.java?rev=1171101&r1=1171100&r2=1171101&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/SetPrimaryType.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/SetPrimaryType.java
Thu Sep 15 13:50:51 2011
@@ -58,7 +58,6 @@ public class SetPrimaryType extends Tran
      */
     @Override
     public void accept(OperationVisitor visitor) throws RepositoryException {
-        assertStatus(Status.PENDING);
         visitor.visit(this);
     }
 

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/SetPropertyValue.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/SetPropertyValue.java?rev=1171101&r1=1171100&r2=1171101&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/SetPropertyValue.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/SetPropertyValue.java
Thu Sep 15 13:50:51 2011
@@ -71,7 +71,6 @@ public class SetPropertyValue extends Tr
      */
     @Override
     public void accept(OperationVisitor visitor) throws RepositoryException {
-        assertStatus(Status.PENDING);
         visitor.visit(this);
     }
 

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Update.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Update.java?rev=1171101&r1=1171100&r2=1171101&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Update.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Update.java
Thu Sep 15 13:50:51 2011
@@ -42,7 +42,6 @@ public class Update extends AbstractOper
      */
     @Override
     public void accept(OperationVisitor visitor) throws RepositoryException {
-        assertStatus(Status.PENDING);
         visitor.visit(this);
     }
 

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/WorkspaceImport.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/WorkspaceImport.java?rev=1171101&r1=1171100&r2=1171101&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/WorkspaceImport.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/WorkspaceImport.java
Thu Sep 15 13:50:51 2011
@@ -50,7 +50,6 @@ public class WorkspaceImport extends Abs
      */
     @Override
     public void accept(OperationVisitor visitor) throws RepositoryException {
-        assertStatus(Status.PENDING);
         visitor.visit(this);
     }
 

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/ChangeLog.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/ChangeLog.java?rev=1171101&r1=1171100&r2=1171101&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/ChangeLog.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/ChangeLog.java
Thu Sep 15 13:50:51 2011
@@ -17,7 +17,9 @@
 package org.apache.jackrabbit.jcr2spi.state;
 
 import org.apache.jackrabbit.jcr2spi.hierarchy.HierarchyEntry;
+import org.apache.jackrabbit.jcr2spi.operation.AbstractOperationVisitor;
 import org.apache.jackrabbit.jcr2spi.operation.Operation;
+import org.apache.jackrabbit.jcr2spi.operation.OperationVisitor;
 import org.apache.jackrabbit.jcr2spi.operation.SetMixin;
 import org.apache.jackrabbit.jcr2spi.operation.SetPrimaryType;
 import org.slf4j.Logger;
@@ -79,17 +81,25 @@ public class ChangeLog {
      * states to EXISTING.
      */
     public void persisted() throws RepositoryException {
-        List<NodeState> changedMixins = new ArrayList<NodeState>();
-        List<NodeState> changedPrimaryTypes = new ArrayList<NodeState>();
+        final List<NodeState> changedMixins = new ArrayList<NodeState>();
+        final List<NodeState> changedPrimaryTypes = new ArrayList<NodeState>();
 
+        OperationVisitor operationVisitor = new AbstractOperationVisitor() {
+            @Override
+            public void visit(SetMixin operation) {
+                changedMixins.add(operation.getNodeState());
+            }
+
+            @Override
+            public void visit(SetPrimaryType operation) {
+                changedPrimaryTypes.add(operation.getNodeState());
+            }
+        };
+        
         Operation[] ops = operations.toArray(new Operation[operations.size()]);
         for (Operation op : ops) {
             op.persisted();
-            if (op instanceof SetMixin) {
-                changedMixins.add(((SetMixin) op).getNodeState());
-            } else if (op instanceof SetPrimaryType) {
-                changedPrimaryTypes.add(((SetPrimaryType) op).getNodeState());
-            }
+            op.accept(operationVisitor);
         }
 
         // process all remaining states that were not covered by the

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/SessionItemStateManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/SessionItemStateManager.java?rev=1171101&r1=1171100&r2=1171101&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/SessionItemStateManager.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/SessionItemStateManager.java
Thu Sep 15 13:50:51 2011
@@ -32,7 +32,7 @@ import org.apache.jackrabbit.jcr2spi.ope
 import org.apache.jackrabbit.jcr2spi.operation.SetMixin;
 import org.apache.jackrabbit.jcr2spi.operation.SetPrimaryType;
 import org.apache.jackrabbit.jcr2spi.operation.SetPropertyValue;
-import org.apache.jackrabbit.jcr2spi.operation.TransientOperationVisitor;
+import org.apache.jackrabbit.jcr2spi.operation.AbstractOperationVisitor;
 import org.apache.jackrabbit.jcr2spi.xml.ReferenceChangeTracker;
 import org.apache.jackrabbit.spi.Name;
 import org.apache.jackrabbit.spi.QNodeDefinition;
@@ -64,7 +64,7 @@ import java.util.List;
 /**
  * {@code SessionItemStateManager} ...
  */
-public class SessionItemStateManager extends TransientOperationVisitor implements UpdateableItemStateManager
{
+public class SessionItemStateManager extends AbstractOperationVisitor implements UpdateableItemStateManager
{
     private static final Logger log = LoggerFactory.getLogger(SessionItemStateManager.class);
 
     /**
@@ -221,6 +221,11 @@ public class SessionItemStateManager ext
 
     //---------------------------------------------------< OperationVisitor >---
 
+    @Override
+    protected void unimplemented(Operation operation) throws RepositoryException {
+        throw new UnsupportedOperationException("Internal error: unsupported operation "
+ operation.getName());
+    }
+
     /**
      * @see OperationVisitor#visit(AddNode)
      */



Mime
View raw message