jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1170270 - in /jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi: hierarchy/ nodetype/ operation/
Date Tue, 13 Sep 2011 17:49:28 GMT
Author: mduerig
Date: Tue Sep 13 17:49:27 2011
New Revision: 1170270

URL: http://svn.apache.org/viewvc?rev=1170270&view=rev
Log:
Microkernel based Jackrabbit prototype (WIP) 
refactor: replace int constants with enum

Modified:
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/NodeEntryImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/PropertyEntryImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/BitsetENTCacheImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AbstractCopy.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AbstractOperation.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AbstractRemove.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/Operation.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/Update.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/WorkspaceImport.java

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/NodeEntryImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/NodeEntryImpl.java?rev=1170270&r1=1170269&r2=1170270&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/NodeEntryImpl.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/NodeEntryImpl.java Tue Sep 13 17:49:27 2011
@@ -1369,14 +1369,16 @@ public class NodeEntryImpl extends Hiera
             HierarchyEntry he = itemState.getHierarchyEntry();
             if (he.getStatus() == Status.NEW) {
                 switch (operation.getStatus()) {
-                    case Operation.STATUS_PERSISTED:
+                    case PERSISTED:
                         ((HierarchyEntryImpl) he).internalGetItemState().setStatus(Status.EXISTING);
                         he.invalidate(false);
                         break;
-                    case Operation.STATUS_UNDO:
+                    case UNDO:
                         he.revert();
                         break;
-                    default: // ignore
+                    case PENDING:
+                        // ignore
+                        break;
                 }
             } // entry isn't NEW any more -> ignore
         }
@@ -1389,7 +1391,7 @@ public class NodeEntryImpl extends Hiera
         PropertyEntry pe = getPropertyEntry(operation.getPropertyName());
         if (pe != null && pe.getStatus() == Status.NEW) {
             switch (operation.getStatus()) {
-                case Operation.STATUS_PERSISTED:
+                case PERSISTED:
                     // for autocreated/protected props, mark to be reloaded
                     // upon next access.
                     PropertyState addedState = (PropertyState) ((PropertyEntryImpl) pe).internalGetItemState();
@@ -1399,10 +1401,12 @@ public class NodeEntryImpl extends Hiera
                         pe.invalidate(true);
                     } // else: assume added property is up to date.
                     break;
-                case Operation.STATUS_UNDO:
+                case UNDO:
                     pe.revert();
                     break;
-                default: // ignore
+                case PENDING:
+                    // ignore
+                    break;
             }
         } // else: no such prop entry or entry has already been persisted
           //       e.g due to external modifications merged into this NodeEntry.
@@ -1414,13 +1418,13 @@ public class NodeEntryImpl extends Hiera
             throw new IllegalArgumentException();
         }
         switch (operation.getStatus()) {
-            case Operation.STATUS_PERSISTED:
+            case PERSISTED:
                 if (Status.isTerminal(rmEntry.getStatus())) {
                     log.debug("Removal of State " + rmEntry + " has already been completed.");
                 }
                 rmEntry.remove();
                 break;
-            case Operation.STATUS_UNDO:
+            case UNDO:
                 if (!rmEntry.denotesNode()) {
                     Name propName = rmEntry.getName();
                     if (propertiesInAttic.containsKey(propName)) {
@@ -1429,7 +1433,9 @@ public class NodeEntryImpl extends Hiera
                 }
                 rmEntry.revert();
                 break;
-            default: // ignore
+            case PENDING:
+                // ignore
+                break;
         }
 
     }
@@ -1442,17 +1448,19 @@ public class NodeEntryImpl extends Hiera
         if (pe != null) {
             PropertyState pState = pe.getPropertyState();
             switch (operation.getStatus()) {
-                case Operation.STATUS_PERSISTED:
+                case PERSISTED:
                     Name[] mixins = StateUtility.getMixinNames(pState);
                     getNodeState().setMixinTypeNames(mixins);
                     if (pState.getStatus() == Status.NEW || pState.getStatus() == Status.EXISTING_MODIFIED) {
                         pState.setStatus(Status.EXISTING);
                     }
                     break;
-                case Operation.STATUS_UNDO:
+                case UNDO:
                     pe.revert();
                     break;
-                default: // ignore
+                case PENDING:
+                    // ignore
+                    break;
             }
         } // else: no such prop-Entry (should not occur)
     }
@@ -1465,7 +1473,7 @@ public class NodeEntryImpl extends Hiera
         if (pe != null) {
             PropertyState pState = pe.getPropertyState();
             switch (operation.getStatus()) {
-                case Operation.STATUS_PERSISTED:
+                case PERSISTED:
                     // NOTE: invalidation of this node entry is performed by
                     // ChangeLog.persisted...
                     // TODO: check if correct
@@ -1473,10 +1481,12 @@ public class NodeEntryImpl extends Hiera
                         pState.setStatus(Status.EXISTING);
                     }
                     break;
-                case Operation.STATUS_UNDO:
+                case UNDO:
                     pe.revert();
                     break;
-                default: // ignore
+                case PENDING:
+                    // ignore
+                    break;
             }
         } // else: no such prop-Entry (should not occur)
     }
@@ -1489,19 +1499,21 @@ public class NodeEntryImpl extends Hiera
         // NOTE: if reorder occurred in combination with a 'move' the clean-up
         // of the revertInfo is postponed until {@link #complete(Move)}.
         switch (operation.getStatus()) {
-            case Operation.STATUS_PERSISTED:
+            case PERSISTED:
                 if (revertInfo != null && !revertInfo.isMoved()) {
                     revertInfo.dispose(true);
                 }
                 break;
-            case Operation.STATUS_UNDO:
+            case UNDO:
                 if (he.getStatus() == Status.NEW) {
                     he.revert();
                 } else if (revertInfo != null && !revertInfo.isMoved()) {
                     revertInfo.dispose(false);
                 }
                 break;
-            default: // ignore
+            case PENDING:
+                // ignore
+                break;
         }
     }
 
@@ -1511,7 +1523,7 @@ public class NodeEntryImpl extends Hiera
             throw new IllegalArgumentException();
         }
         switch (operation.getStatus()) {
-            case Operation.STATUS_PERSISTED:
+            case PERSISTED:
                 if (getStatus() != Status.NEW && revertInfo != null) {
                     revertInfo.oldParent.childNodeAttic.remove(this);
                     revertInfo.dispose(true);
@@ -1519,7 +1531,7 @@ public class NodeEntryImpl extends Hiera
                 // and mark the moved state existing
                 // internalGetItemState().setStatus(Status.EXISTING);
                 break;
-            case Operation.STATUS_UNDO:
+            case UNDO:
                 if (getStatus() == Status.NEW) {
                     revert();
                 } else if (revertInfo != null) {
@@ -1527,7 +1539,9 @@ public class NodeEntryImpl extends Hiera
                     revertInfo.dispose(false);
                 }
                 break;
-            default: // ignore
+            case PENDING:
+                // ignore
+                break;
         }
     }
 

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/PropertyEntryImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/PropertyEntryImpl.java?rev=1170270&r1=1170269&r2=1170270&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/PropertyEntryImpl.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/PropertyEntryImpl.java Tue Sep 13 17:49:27 2011
@@ -108,7 +108,7 @@ public class PropertyEntryImpl extends H
             throw new IllegalArgumentException();
         }
         switch (operation.getStatus()) {
-            case Operation.STATUS_PERSISTED:
+            case PERSISTED:
                 // Property can only be the change log target if it was existing
                 // and has been modified. This includes the case where a property
                 // was changed and then removed by removing its parent. See JCR-2462.
@@ -119,11 +119,12 @@ public class PropertyEntryImpl extends H
                     state.setStatus(Status.EXISTING);
                 }
                 break;
-            case Operation.STATUS_UNDO:
+            case UNDO:
                 revert();
                 break;
-            default:
+            case PENDING:
                 // ignore
+                break;
         }
     }
 

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/BitsetENTCacheImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/BitsetENTCacheImpl.java?rev=1170270&r1=1170269&r2=1170270&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/BitsetENTCacheImpl.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/BitsetENTCacheImpl.java Tue Sep 13 17:49:27 2011
@@ -77,6 +77,7 @@ class BitsetENTCacheImpl implements Effe
     }
 
     //---------------------------------------------< EffectiveNodeTypeCache >---
+    
     @Override
     public Key getKey(Name[] ntNames) {
         return new BitsetKey(ntNames, nameIndex.size() + ntNames.length);
@@ -469,4 +470,4 @@ class BitsetENTCacheImpl implements Effe
             return buf.toString();
         }
     }
-}
\ No newline at end of file
+}

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AbstractCopy.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AbstractCopy.java?rev=1170270&r1=1170269&r2=1170270&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AbstractCopy.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AbstractCopy.java Tue Sep 13 17:49:27 2011
@@ -71,8 +71,8 @@ public abstract class AbstractCopy exten
      */
     @Override
     public void persisted() {
-        assert status == STATUS_PENDING;
-        status = STATUS_PERSISTED;
+        assert status == Status.PENDING;
+        status = Status.PERSISTED;
         destParentState.getHierarchyEntry().invalidate(false);
     }
 
@@ -93,4 +93,4 @@ public abstract class AbstractCopy exten
     public Name getDestinationName() {
         return destName;
     }
-}
\ No newline at end of file
+}

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AbstractOperation.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AbstractOperation.java?rev=1170270&r1=1170269&r2=1170270&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AbstractOperation.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AbstractOperation.java Tue Sep 13 17:49:27 2011
@@ -16,18 +16,17 @@
  */
 package org.apache.jackrabbit.jcr2spi.operation;
 
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-
-import javax.jcr.PathNotFoundException;
-import javax.jcr.RepositoryException;
-
 import org.apache.jackrabbit.jcr2spi.hierarchy.HierarchyManager;
 import org.apache.jackrabbit.jcr2spi.state.ItemState;
 import org.apache.jackrabbit.jcr2spi.state.NodeState;
 import org.apache.jackrabbit.spi.Path;
 
+import javax.jcr.PathNotFoundException;
+import javax.jcr.RepositoryException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+
 /**
  * {@code AbstractOperation}...
  */
@@ -37,7 +36,7 @@ public abstract class AbstractOperation 
      * The collection of affected ItemStates.
      */
     private final Collection<ItemState> affectedStates = new ArrayList<ItemState>();
-    protected int status;
+    protected Status status = Status.PENDING;
 
     /**
      * Returns the name of the class
@@ -62,12 +61,12 @@ public abstract class AbstractOperation 
 
     @Override
     public void undo() throws RepositoryException {
-        assert status == STATUS_PENDING;
+        assert status == Status.PENDING;
         throw new UnsupportedOperationException("Undo not supported.");
     }
 
     @Override
-    public int getStatus() {
+    public Status getStatus() {
         return status;
     }
 
@@ -101,4 +100,4 @@ public abstract class AbstractOperation 
     protected static void assertChildNodeEntries(NodeState parentState) throws RepositoryException {
         parentState.getNodeEntry().getNodeEntries();
     }
-}
\ No newline at end of file
+}

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AbstractRemove.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AbstractRemove.java?rev=1170270&r1=1170269&r2=1170270&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AbstractRemove.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AbstractRemove.java Tue Sep 13 17:49:27 2011
@@ -17,16 +17,10 @@
 package org.apache.jackrabbit.jcr2spi.operation;
 
 import org.apache.jackrabbit.jcr2spi.state.ItemState;
-import org.apache.jackrabbit.jcr2spi.state.ItemStateValidator;
 import org.apache.jackrabbit.jcr2spi.state.NodeState;
 import org.apache.jackrabbit.spi.ItemId;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
-import javax.jcr.AccessDeniedException;
 import javax.jcr.RepositoryException;
-import javax.jcr.UnsupportedRepositoryOperationException;
-import javax.jcr.version.VersionException;
 
 /**
  * {@code AbstractRemove} is the base class for non-transient remove
@@ -50,8 +44,8 @@ public abstract class AbstractRemove ext
      */
     @Override
     public void undo() throws RepositoryException {
-        assert status == STATUS_PENDING;
-        status = STATUS_UNDO;
+        assert status == Status.PENDING;
+        status = Status.UNDO;
         parent.getHierarchyEntry().complete(this);
     }
 

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=1170270&r1=1170269&r2=1170270&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 Tue Sep 13 17:49:27 2011
@@ -67,7 +67,7 @@ public class AddLabel extends AbstractOp
      */
     @Override
     public void accept(OperationVisitor visitor) throws RepositoryException {
-        assert status == STATUS_PENDING;
+        assert status == Status.PENDING;
         visitor.visit(this);
     }
 
@@ -80,8 +80,8 @@ public class AddLabel extends AbstractOp
      */
     @Override
     public void persisted() {
-        assert status == STATUS_PENDING;
-        status = STATUS_PERSISTED;
+        assert status == Status.PENDING;
+        status = Status.PERSISTED;
         try {
             NodeEntry vhEntry = (NodeEntry) versionHistoryState.getHierarchyEntry();
             NodeEntry lnEntry = vhEntry.getNodeEntry(NameConstants.JCR_VERSIONLABELS, Path.INDEX_DEFAULT);
@@ -123,4 +123,4 @@ public class AddLabel extends AbstractOp
     public static Operation create(NodeState versionHistoryState, NodeState versionState, Name label, boolean moveLabel) {
         return new AddLabel(versionHistoryState, versionState, label, moveLabel);
     }
-}
\ No newline at end of file
+}

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=1170270&r1=1170269&r2=1170270&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 Tue Sep 13 17:49:27 2011
@@ -16,25 +16,14 @@
  */
 package org.apache.jackrabbit.jcr2spi.operation;
 
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.jcr.AccessDeniedException;
-import javax.jcr.ItemExistsException;
-import javax.jcr.RepositoryException;
-import javax.jcr.UnsupportedRepositoryOperationException;
-import javax.jcr.lock.LockException;
-import javax.jcr.nodetype.ConstraintViolationException;
-import javax.jcr.nodetype.NoSuchNodeTypeException;
-import javax.jcr.version.VersionException;
-
 import org.apache.jackrabbit.jcr2spi.state.ItemState;
-import org.apache.jackrabbit.jcr2spi.state.ItemStateValidator;
 import org.apache.jackrabbit.jcr2spi.state.NodeState;
 import org.apache.jackrabbit.spi.Name;
 import org.apache.jackrabbit.spi.NodeId;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+
+import javax.jcr.RepositoryException;
+import java.util.ArrayList;
+import java.util.List;
 
 /**
  * {@code AddNode}...
@@ -74,7 +63,7 @@ public class AddNode extends TransientOp
      */
     @Override
     public void accept(OperationVisitor visitor) throws RepositoryException {
-        assert status == STATUS_PENDING;
+        assert status == Status.PENDING;
         visitor.visit(this);
     }
 
@@ -85,8 +74,8 @@ public class AddNode extends TransientOp
      */
     @Override
     public void persisted() throws RepositoryException {
-        assert status == STATUS_PENDING;
-        status = STATUS_PERSISTED;
+        assert status == Status.PENDING;
+        status = Status.PERSISTED;
         parentState.getHierarchyEntry().complete(this);
     }
 
@@ -95,8 +84,8 @@ public class AddNode extends TransientOp
      */
     @Override
     public void undo() throws RepositoryException {
-        assert status == STATUS_PENDING;
-        status = STATUS_UNDO;
+        assert status == Status.PENDING;
+        status = Status.UNDO;
         parentState.getHierarchyEntry().complete(this);
     }
 
@@ -148,4 +137,4 @@ public class AddNode extends TransientOp
 
         return new AddNode(parentState, nodeName, nodeTypeName, uuid);
     }
-}
\ No newline at end of file
+}

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=1170270&r1=1170269&r2=1170270&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 Tue Sep 13 17:49:27 2011
@@ -16,21 +16,14 @@
  */
 package org.apache.jackrabbit.jcr2spi.operation;
 
-import javax.jcr.AccessDeniedException;
-import javax.jcr.ItemExistsException;
-import javax.jcr.RepositoryException;
-import javax.jcr.UnsupportedRepositoryOperationException;
-import javax.jcr.ValueFormatException;
-import javax.jcr.lock.LockException;
-import javax.jcr.nodetype.ConstraintViolationException;
-import javax.jcr.version.VersionException;
-
 import org.apache.jackrabbit.jcr2spi.state.NodeState;
 import org.apache.jackrabbit.spi.Name;
 import org.apache.jackrabbit.spi.NodeId;
 import org.apache.jackrabbit.spi.QPropertyDefinition;
 import org.apache.jackrabbit.spi.QValue;
 
+import javax.jcr.RepositoryException;
+
 /**
  * {@code AddProperty}...
  */
@@ -71,7 +64,7 @@ public class AddProperty extends Transie
      */
     @Override
     public void accept(OperationVisitor visitor) throws RepositoryException {
-        assert status == STATUS_PENDING;
+        assert status == Status.PENDING;
         visitor.visit(this);
     }
 
@@ -80,8 +73,8 @@ public class AddProperty extends Transie
      */
     @Override
     public void persisted() throws RepositoryException {
-        assert status == STATUS_PENDING;
-        status = STATUS_PERSISTED;
+        assert status == Status.PENDING;
+        status = Status.PERSISTED;
         parentState.getHierarchyEntry().complete(this);
     }
 
@@ -90,7 +83,7 @@ public class AddProperty extends Transie
      */
     @Override
     public void undo() throws RepositoryException {
-        status = STATUS_UNDO;
+        status = Status.UNDO;
         parentState.getHierarchyEntry().complete(this);
     }
 
@@ -140,4 +133,4 @@ public class AddProperty extends Transie
         
         return new AddProperty(parentState, propName, propertyType, values, def);
     }
-}
\ No newline at end of file
+}

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=1170270&r1=1170269&r2=1170270&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 Tue Sep 13 17:49:27 2011
@@ -24,13 +24,7 @@ import org.apache.jackrabbit.spi.NodeId;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import javax.jcr.AccessDeniedException;
-import javax.jcr.ItemExistsException;
 import javax.jcr.RepositoryException;
-import javax.jcr.UnsupportedRepositoryOperationException;
-import javax.jcr.nodetype.ConstraintViolationException;
-import javax.jcr.nodetype.NoSuchNodeTypeException;
-import javax.jcr.version.VersionException;
 import java.util.Iterator;
 
 /**
@@ -57,7 +51,7 @@ public class Checkin extends AbstractOpe
      */
     @Override
     public void accept(OperationVisitor visitor) throws RepositoryException {
-        assert status == STATUS_PENDING;
+        assert status == Status.PENDING;
         visitor.visit(this);
     }
 
@@ -68,8 +62,8 @@ public class Checkin extends AbstractOpe
      */
     @Override
     public void persisted() {
-        assert status == STATUS_PENDING;
-        status = STATUS_PERSISTED;
+        assert status == Status.PENDING;
+        status = Status.PERSISTED;
         try {
             NodeEntry vhe = mgr.getVersionHistoryEntry(nodeState);
             if (vhe != null) {
@@ -116,4 +110,4 @@ public class Checkin extends AbstractOpe
     public static Checkin create(NodeState nodeState, VersionManager mgr) {
         return new Checkin(nodeState, mgr);
     }
-}
\ No newline at end of file
+}

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=1170270&r1=1170269&r2=1170270&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 Tue Sep 13 17:49:27 2011
@@ -24,13 +24,7 @@ import org.apache.jackrabbit.spi.NodeId;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import javax.jcr.AccessDeniedException;
-import javax.jcr.ItemExistsException;
 import javax.jcr.RepositoryException;
-import javax.jcr.UnsupportedRepositoryOperationException;
-import javax.jcr.nodetype.ConstraintViolationException;
-import javax.jcr.nodetype.NoSuchNodeTypeException;
-import javax.jcr.version.VersionException;
 import java.util.Iterator;
 
 /**
@@ -64,7 +58,7 @@ public class Checkout extends AbstractOp
 
     @Override
     public void accept(OperationVisitor visitor) throws RepositoryException {
-        assert status == STATUS_PENDING;
+        assert status == Status.PENDING;
         visitor.visit(this);
     }
 
@@ -75,8 +69,8 @@ public class Checkout extends AbstractOp
      */
     @Override
     public void persisted() {
-        assert status == STATUS_PENDING;
-        status = STATUS_PERSISTED;
+        assert status == Status.PENDING;
+        status = Status.PERSISTED;
         try {
             NodeEntry vhe = mgr.getVersionHistoryEntry(nodeState);
             if (vhe != null) {
@@ -134,4 +128,4 @@ public class Checkout extends AbstractOp
     public static Operation create(NodeState nodeState, NodeId activityId, VersionManager mgr) {
         return new Checkout(nodeState, activityId, mgr);
     }
-}
\ No newline at end of file
+}

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=1170270&r1=1170269&r2=1170270&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 Tue Sep 13 17:49:27 2011
@@ -24,13 +24,7 @@ import org.apache.jackrabbit.spi.NodeId;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import javax.jcr.AccessDeniedException;
-import javax.jcr.ItemExistsException;
 import javax.jcr.RepositoryException;
-import javax.jcr.UnsupportedRepositoryOperationException;
-import javax.jcr.nodetype.ConstraintViolationException;
-import javax.jcr.nodetype.NoSuchNodeTypeException;
-import javax.jcr.version.VersionException;
 import java.util.Iterator;
 
 /**
@@ -67,7 +61,7 @@ public class Checkpoint extends Abstract
 
     @Override
     public void accept(OperationVisitor visitor) throws RepositoryException {
-        assert status == STATUS_PENDING;
+        assert status == Status.PENDING;
         visitor.visit(this);
     }
 
@@ -78,8 +72,8 @@ public class Checkpoint extends Abstract
      */
     @Override
     public void persisted() {
-        assert status == STATUS_PENDING;
-        status = STATUS_PERSISTED;
+        assert status == Status.PENDING;
+        status = Status.PERSISTED;
         try {
             NodeEntry vhe = mgr.getVersionHistoryEntry(nodeState);
             if (vhe != null) {
@@ -145,4 +139,4 @@ public class Checkpoint extends Abstract
     public static Checkpoint create(NodeState nodeState, NodeId activityId, VersionManager mgr) {
         return new Checkpoint(nodeState, activityId, mgr);
     }
-}
\ No newline at end of file
+}

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=1170270&r1=1170269&r2=1170270&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 Tue Sep 13 17:49:27 2011
@@ -45,7 +45,7 @@ public class Clone extends AbstractCopy 
      */
     @Override
     public void accept(OperationVisitor visitor) throws RepositoryException {
-        assert status == STATUS_PENDING;
+        assert status == Status.PENDING;
         visitor.visit(this);
     }
 
@@ -54,9 +54,9 @@ public class Clone extends AbstractCopy 
      */
     @Override
     public void persisted() {
-        assert status == STATUS_PENDING;
+        assert status == Status.PENDING;
         if (removeExisting) {
-            status = STATUS_PERSISTED;
+            status = Status.PERSISTED;
             // invalidate the complete tree -> find root-hierarchy-entry
             HierarchyEntry he = destParentState.getHierarchyEntry();
             while (he.getParent() != null) {
@@ -82,4 +82,4 @@ public class Clone extends AbstractCopy 
 
         return new Clone(srcPath, destPath, srcWorkspaceName, removeExisting, srcHierarchyManager, destHierarchyManager);
     }
-}
\ No newline at end of file
+}

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=1170270&r1=1170269&r2=1170270&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 Tue Sep 13 17:49:27 2011
@@ -40,7 +40,7 @@ public class Copy extends AbstractCopy  
      */
     @Override
     public void accept(OperationVisitor visitor) throws RepositoryException {
-        assert status == STATUS_PENDING;
+        assert status == Status.PENDING;
         visitor.visit(this);
     }
 
@@ -51,4 +51,4 @@ public class Copy extends AbstractCopy  
 
         return new Copy(srcPath, destPath, srcWorkspaceName, srcHierarchyManager, destHierarchyManager);
     }
-}
\ No newline at end of file
+}

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=1170270&r1=1170269&r2=1170270&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 Tue Sep 13 17:49:27 2011
@@ -38,7 +38,7 @@ public class CreateActivity extends Abst
 
     @Override
     public void accept(OperationVisitor visitor) throws RepositoryException {
-        assert status == STATUS_PENDING;
+        assert status == Status.PENDING;
         visitor.visit(this);
     }
 
@@ -49,8 +49,8 @@ public class CreateActivity extends Abst
      */
     @Override
     public void persisted() {
-        assert status == STATUS_PENDING;
-        status = STATUS_PERSISTED;
+        assert status == Status.PENDING;
+        status = Status.PERSISTED;
         
         // TODO: check if invalidation of the activity store is required.
     }
@@ -78,4 +78,4 @@ public class CreateActivity extends Abst
     public static CreateActivity create(String title, VersionManager mgr) {
         return new CreateActivity(title, mgr);
     }
-}
\ No newline at end of file
+}

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=1170270&r1=1170269&r2=1170270&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 Tue Sep 13 17:49:27 2011
@@ -16,19 +16,11 @@
  */
 package org.apache.jackrabbit.jcr2spi.operation;
 
-import org.apache.jackrabbit.jcr2spi.version.VersionManager;
 import org.apache.jackrabbit.jcr2spi.state.NodeState;
+import org.apache.jackrabbit.jcr2spi.version.VersionManager;
 import org.apache.jackrabbit.spi.NodeId;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
-import javax.jcr.AccessDeniedException;
-import javax.jcr.ItemExistsException;
 import javax.jcr.RepositoryException;
-import javax.jcr.UnsupportedRepositoryOperationException;
-import javax.jcr.nodetype.ConstraintViolationException;
-import javax.jcr.nodetype.NoSuchNodeTypeException;
-import javax.jcr.version.VersionException;
 
 /**
  * {@code CreateConfiguration}...
@@ -46,7 +38,7 @@ public class CreateConfiguration extends
 
     @Override
     public void accept(OperationVisitor visitor) throws RepositoryException {
-        assert status == STATUS_PENDING;
+        assert status == Status.PENDING;
         visitor.visit(this);
     }
 
@@ -57,8 +49,8 @@ public class CreateConfiguration extends
      */
     @Override
     public void persisted() {
-        assert status == STATUS_PENDING;
-        status = STATUS_PERSISTED;
+        assert status == Status.PENDING;
+        status = Status.PERSISTED;
 
         // TODO: check if the configuration store needs to be invalidated.
 
@@ -89,4 +81,4 @@ public class CreateConfiguration extends
     public static CreateConfiguration create(NodeState nodeState, VersionManager mgr) {
         return new CreateConfiguration(nodeState, mgr);
     }
-}
\ No newline at end of file
+}

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=1170270&r1=1170269&r2=1170270&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 Tue Sep 13 17:49:27 2011
@@ -21,18 +21,11 @@ import org.apache.jackrabbit.spi.LockInf
 import org.apache.jackrabbit.spi.NodeId;
 
 import javax.jcr.RepositoryException;
-import javax.jcr.AccessDeniedException;
-import javax.jcr.ItemExistsException;
-import javax.jcr.UnsupportedRepositoryOperationException;
-import javax.jcr.version.VersionException;
-import javax.jcr.nodetype.ConstraintViolationException;
-import javax.jcr.nodetype.NoSuchNodeTypeException;
 
 /**
  * {@code LockOperation}...
  */
 public class LockOperation extends AbstractOperation {
-
     private final NodeState nodeState;
     private final boolean isDeep;
     private final boolean isSessionScoped;
@@ -60,7 +53,7 @@ public class LockOperation extends Abstr
      */
     @Override
     public void accept(OperationVisitor visitor) throws RepositoryException {
-        assert status == STATUS_PENDING;
+        assert status == Status.PENDING;
         visitor.visit(this);
     }
 
@@ -71,8 +64,8 @@ public class LockOperation extends Abstr
      */
     @Override
     public void persisted() {
-        assert status == STATUS_PENDING;
-        status = STATUS_PERSISTED;
+        assert status == Status.PENDING;
+        status = Status.PERSISTED;
         // non-recursive invalidation
         nodeState.getHierarchyEntry().invalidate(false);
     }
@@ -120,4 +113,4 @@ public class LockOperation extends Abstr
     public static LockOperation create(NodeState nodeState, boolean isDeep, boolean isSessionScoped, long timeoutHint, String ownerHint) {
         return new LockOperation(nodeState, isDeep, isSessionScoped, timeoutHint, ownerHint);
     }
-}
\ No newline at end of file
+}

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=1170270&r1=1170269&r2=1170270&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 Tue Sep 13 17:49:27 2011
@@ -16,22 +16,15 @@
  */
 package org.apache.jackrabbit.jcr2spi.operation;
 
-import javax.jcr.RepositoryException;
-import javax.jcr.AccessDeniedException;
-import javax.jcr.ItemExistsException;
-import javax.jcr.UnsupportedRepositoryOperationException;
 import org.apache.jackrabbit.jcr2spi.state.NodeState;
 import org.apache.jackrabbit.spi.NodeId;
 
-import javax.jcr.version.VersionException;
-import javax.jcr.nodetype.ConstraintViolationException;
-import javax.jcr.nodetype.NoSuchNodeTypeException;
+import javax.jcr.RepositoryException;
 
 /**
  * {@code LockRefresh}...
  */
 public class LockRefresh extends AbstractOperation {
-
     private final NodeState nodeState;
 
     private LockRefresh(NodeState nodeState) {
@@ -47,7 +40,7 @@ public class LockRefresh extends Abstrac
      */
     @Override
     public void accept(OperationVisitor visitor) throws RepositoryException {
-        assert status == STATUS_PENDING;
+        assert status == Status.PENDING;
         visitor.visit(this);
     }
 
@@ -56,8 +49,8 @@ public class LockRefresh extends Abstrac
      */
     @Override
     public void persisted() {
-        assert status == STATUS_PENDING;
-        status = STATUS_PERSISTED;
+        assert status == Status.PENDING;
+        status = Status.PERSISTED;
         // nothing to do.
     }
 
@@ -77,4 +70,4 @@ public class LockRefresh extends Abstrac
     public static Operation create(NodeState nodeState) {
         return new LockRefresh(nodeState);
     }
-}
\ No newline at end of file
+}

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=1170270&r1=1170269&r2=1170270&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 Tue Sep 13 17:49:27 2011
@@ -16,18 +16,12 @@
  */
 package org.apache.jackrabbit.jcr2spi.operation;
 
-import org.apache.jackrabbit.jcr2spi.state.NodeState;
-import org.apache.jackrabbit.jcr2spi.hierarchy.PropertyEntry;
 import org.apache.jackrabbit.jcr2spi.hierarchy.NodeEntry;
+import org.apache.jackrabbit.jcr2spi.hierarchy.PropertyEntry;
+import org.apache.jackrabbit.jcr2spi.state.NodeState;
 import org.apache.jackrabbit.spi.NodeId;
 
 import javax.jcr.RepositoryException;
-import javax.jcr.AccessDeniedException;
-import javax.jcr.ItemExistsException;
-import javax.jcr.UnsupportedRepositoryOperationException;
-import javax.jcr.version.VersionException;
-import javax.jcr.nodetype.ConstraintViolationException;
-import javax.jcr.nodetype.NoSuchNodeTypeException;
 import java.util.Iterator;
 
 /**
@@ -49,7 +43,7 @@ public class LockRelease extends Abstrac
      */
     @Override
     public void accept(OperationVisitor visitor) throws RepositoryException {
-        assert status == STATUS_PENDING;
+        assert status == Status.PENDING;
         visitor.visit(this);
     }
 
@@ -61,8 +55,8 @@ public class LockRelease extends Abstrac
      */
     @Override
     public void persisted() {
-        assert status == STATUS_PENDING;
-        status = STATUS_PERSISTED;
+        assert status == Status.PENDING;
+        status = Status.PERSISTED;
         // non-recursive invalidation but including all properties
         NodeEntry nodeEntry = nodeState.getNodeEntry();
         Iterator<PropertyEntry> entries = nodeEntry.getPropertyEntries();
@@ -89,4 +83,4 @@ public class LockRelease extends Abstrac
     public static Operation create(NodeState nodeState) {
         return new LockRelease(nodeState);
     }
-}
\ No newline at end of file
+}

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=1170270&r1=1170269&r2=1170270&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 Tue Sep 13 17:49:27 2011
@@ -16,16 +16,6 @@
  */
 package org.apache.jackrabbit.jcr2spi.operation;
 
-import java.util.Iterator;
-
-import javax.jcr.AccessDeniedException;
-import javax.jcr.ItemExistsException;
-import javax.jcr.RepositoryException;
-import javax.jcr.UnsupportedRepositoryOperationException;
-import javax.jcr.nodetype.ConstraintViolationException;
-import javax.jcr.nodetype.NoSuchNodeTypeException;
-import javax.jcr.version.VersionException;
-
 import org.apache.jackrabbit.jcr2spi.hierarchy.HierarchyEntry;
 import org.apache.jackrabbit.jcr2spi.hierarchy.NodeEntry;
 import org.apache.jackrabbit.jcr2spi.state.NodeState;
@@ -34,6 +24,9 @@ import org.apache.jackrabbit.spi.NodeId;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import javax.jcr.RepositoryException;
+import java.util.Iterator;
+
 /**
  * {@code Merge}...
  */
@@ -65,7 +58,7 @@ public class Merge extends AbstractOpera
      */
     @Override
     public void accept(OperationVisitor visitor) throws RepositoryException {
-        assert status == STATUS_PENDING;
+        assert status == Status.PENDING;
         visitor.visit(this);
     }
 
@@ -76,8 +69,8 @@ public class Merge extends AbstractOpera
      */
     @Override
     public void persisted() {
-        assert status == STATUS_PENDING;
-        status = STATUS_PERSISTED;
+        assert status == Status.PENDING;
+        status = Status.PERSISTED;
         if (isActivityMerge()) {
             // TODO be more specific about what needs to be invalidated
             // look for the root entry and invalidate the complete tree
@@ -151,4 +144,4 @@ public class Merge extends AbstractOpera
         
         return new Merge(nodeState, srcWorkspaceName, bestEffort, isShallow, mgr);
     }
-}
\ No newline at end of file
+}

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=1170270&r1=1170269&r2=1170270&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 Tue Sep 13 17:49:27 2011
@@ -16,16 +16,6 @@
  */
 package org.apache.jackrabbit.jcr2spi.operation;
 
-import javax.jcr.AccessDeniedException;
-import javax.jcr.ItemExistsException;
-import javax.jcr.ItemNotFoundException;
-import javax.jcr.RepositoryException;
-import javax.jcr.UnsupportedRepositoryOperationException;
-import javax.jcr.lock.LockException;
-import javax.jcr.nodetype.ConstraintViolationException;
-import javax.jcr.nodetype.NoSuchNodeTypeException;
-import javax.jcr.version.VersionException;
-
 import org.apache.jackrabbit.jcr2spi.hierarchy.HierarchyManager;
 import org.apache.jackrabbit.jcr2spi.hierarchy.NodeEntry;
 import org.apache.jackrabbit.jcr2spi.state.ItemStateValidator;
@@ -38,6 +28,10 @@ import org.apache.jackrabbit.spi.commons
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import javax.jcr.ItemExistsException;
+import javax.jcr.ItemNotFoundException;
+import javax.jcr.RepositoryException;
+
 /**
  * {@code Move}...
  */
@@ -87,7 +81,7 @@ public class Move extends TransientOpera
      */
     @Override
     public void accept(OperationVisitor visitor) throws RepositoryException {
-        assert status == STATUS_PENDING;
+        assert status == Status.PENDING;
         visitor.visit(this);
     }
 
@@ -100,8 +94,8 @@ public class Move extends TransientOpera
      */
     @Override
     public void persisted() throws RepositoryException {
-        assert status == STATUS_PENDING;
-        status = STATUS_PERSISTED;
+        assert status == Status.PENDING;
+        status = Status.PERSISTED;
         if (sessionMove) {
             srcState.getNodeEntry().complete(this);
         } else {
@@ -124,9 +118,9 @@ public class Move extends TransientOpera
      */
     @Override
     public void undo() throws RepositoryException {
-        assert status == STATUS_PENDING;
+        assert status == Status.PENDING;
         if (sessionMove) {
-            status = STATUS_UNDO;
+            status = Status.UNDO;
             srcState.getHierarchyEntry().complete(this);
         } else {
             super.undo();
@@ -217,4 +211,4 @@ public class Move extends TransientOpera
 
         return new Move(srcState, srcParentState, destParentState, destName, sessionMove);
     }
-}
\ No newline at end of file
+}

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Operation.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Operation.java?rev=1170270&r1=1170269&r2=1170270&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Operation.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Operation.java Tue Sep 13 17:49:27 2011
@@ -16,14 +16,14 @@
  */
 package org.apache.jackrabbit.jcr2spi.operation;
 
-import javax.jcr.nodetype.ConstraintViolationException;
-import javax.jcr.nodetype.NoSuchNodeTypeException;
+import org.apache.jackrabbit.jcr2spi.state.ItemState;
+
 import javax.jcr.AccessDeniedException;
 import javax.jcr.ItemExistsException;
-import javax.jcr.UnsupportedRepositoryOperationException;
 import javax.jcr.RepositoryException;
-import org.apache.jackrabbit.jcr2spi.state.ItemState;
-
+import javax.jcr.UnsupportedRepositoryOperationException;
+import javax.jcr.nodetype.ConstraintViolationException;
+import javax.jcr.nodetype.NoSuchNodeTypeException;
 import javax.jcr.version.VersionException;
 import java.util.Collection;
 
@@ -31,9 +31,7 @@ import java.util.Collection;
  * {@code Operation}...
  */
 public interface Operation {
-    int STATUS_PENDING = 0;
-    int STATUS_PERSISTED = 1;
-    int STATUS_UNDO = 2;
+    enum Status { PENDING, PERSISTED, UNDO }
 
     /**
      * Returns the name of {@code this} operation.
@@ -78,5 +76,5 @@ public interface Operation {
      *
      * @return status of this operation.
      */
-    int getStatus();
+    Status getStatus();
 }
\ No newline at end of file

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=1170270&r1=1170269&r2=1170270&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 Tue Sep 13 17:49:27 2011
@@ -16,17 +16,12 @@
  */
 package org.apache.jackrabbit.jcr2spi.operation;
 
-import javax.jcr.AccessDeniedException;
-import javax.jcr.RepositoryException;
-import javax.jcr.UnsupportedRepositoryOperationException;
-import javax.jcr.version.VersionException;
-
 import org.apache.jackrabbit.jcr2spi.state.ItemState;
 import org.apache.jackrabbit.jcr2spi.state.ItemStateValidator;
 import org.apache.jackrabbit.jcr2spi.state.NodeState;
 import org.apache.jackrabbit.spi.ItemId;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+
+import javax.jcr.RepositoryException;
 
 /**
  * {@code Remove}...
@@ -61,7 +56,7 @@ public class Remove extends TransientOpe
      */
     @Override
     public void accept(OperationVisitor visitor) throws RepositoryException {
-        assert status == STATUS_PENDING;
+        assert status == Status.PENDING;
         visitor.visit(this);
     }
 
@@ -70,8 +65,8 @@ public class Remove extends TransientOpe
      */
     @Override
     public void persisted() throws RepositoryException {
-        assert status == STATUS_PENDING;
-        status = STATUS_PERSISTED;
+        assert status == Status.PENDING;
+        status = Status.PERSISTED;
         parent.getHierarchyEntry().complete(this);
     }
 
@@ -80,8 +75,8 @@ public class Remove extends TransientOpe
      */
     @Override
     public void undo() throws RepositoryException {
-        assert status == STATUS_PENDING;
-        status = STATUS_UNDO;
+        assert status == Status.PENDING;
+        status = Status.UNDO;
         parent.getHierarchyEntry().complete(this);
     }
 
@@ -109,4 +104,4 @@ public class Remove extends TransientOpe
         }
         return new Remove(state, state.getParent());
     }
-}
\ No newline at end of file
+}

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=1170270&r1=1170269&r2=1170270&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 Tue Sep 13 17:49:27 2011
@@ -16,19 +16,13 @@
  */
 package org.apache.jackrabbit.jcr2spi.operation;
 
-import java.util.Iterator;
-
-import javax.jcr.AccessDeniedException;
-import javax.jcr.RepositoryException;
-import javax.jcr.UnsupportedRepositoryOperationException;
-import javax.jcr.version.VersionException;
-
 import org.apache.jackrabbit.jcr2spi.hierarchy.HierarchyEntry;
 import org.apache.jackrabbit.jcr2spi.hierarchy.HierarchyManager;
 import org.apache.jackrabbit.jcr2spi.state.NodeState;
 import org.apache.jackrabbit.spi.PropertyId;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+
+import javax.jcr.RepositoryException;
+import java.util.Iterator;
 
 /**
  * {@code RemoveActivity}...
@@ -52,7 +46,7 @@ public class RemoveActivity extends Abst
      */
     @Override
     public void accept(OperationVisitor visitor) throws RepositoryException {
-        assert status == STATUS_PENDING;
+        assert status == Status.PENDING;
         visitor.visit(this);
     }
 
@@ -64,8 +58,8 @@ public class RemoveActivity extends Abst
      */
     @Override
     public void persisted() {
-        assert status == STATUS_PENDING;
-        status = STATUS_PERSISTED;
+        assert status == Status.PENDING;
+        status = Status.PERSISTED;
 
         // invalidate all references to the removed activity
         while (refs.hasNext()) {
@@ -86,4 +80,4 @@ public class RemoveActivity extends Abst
         
         return new RemoveActivity(activityState, hierarchyMgr);
     }
-}
\ No newline at end of file
+}

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=1170270&r1=1170269&r2=1170270&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 Tue Sep 13 17:49:27 2011
@@ -66,7 +66,7 @@ public class RemoveLabel extends Abstrac
      */
     @Override
     public void accept(OperationVisitor visitor) throws RepositoryException {
-        assert status == STATUS_PENDING;
+        assert status == Status.PENDING;
         visitor.visit(this);
     }
 
@@ -78,7 +78,7 @@ public class RemoveLabel extends Abstrac
      */
     @Override
     public void persisted() throws RepositoryException {
-        status = STATUS_PERSISTED;
+        status = Status.PERSISTED;
         try {
             NodeEntry vhEntry = (NodeEntry) versionHistoryState.getHierarchyEntry();
             NodeEntry lnEntry = vhEntry.getNodeEntry(NameConstants.JCR_VERSIONLABELS, Path.INDEX_DEFAULT);

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=1170270&r1=1170269&r2=1170270&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 Tue Sep 13 17:49:27 2011
@@ -16,13 +16,6 @@
  */
 package org.apache.jackrabbit.jcr2spi.operation;
 
-import java.util.Iterator;
-
-import javax.jcr.AccessDeniedException;
-import javax.jcr.RepositoryException;
-import javax.jcr.UnsupportedRepositoryOperationException;
-import javax.jcr.version.VersionException;
-
 import org.apache.jackrabbit.jcr2spi.hierarchy.NodeEntry;
 import org.apache.jackrabbit.jcr2spi.hierarchy.PropertyEntry;
 import org.apache.jackrabbit.jcr2spi.state.ItemState;
@@ -31,6 +24,9 @@ import org.apache.jackrabbit.jcr2spi.ver
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import javax.jcr.RepositoryException;
+import java.util.Iterator;
+
 /**
  * {@code RemoveVersion}...
  */
@@ -55,7 +51,7 @@ public class RemoveVersion extends Abstr
      */
     @Override
     public void accept(OperationVisitor visitor) throws RepositoryException {
-        assert status == STATUS_PENDING;
+        assert status == Status.PENDING;
         visitor.visit(this);
     }
 
@@ -67,8 +63,8 @@ public class RemoveVersion extends Abstr
      */
     @Override
     public void persisted() {
-        assert status == STATUS_PENDING;
-        status = STATUS_PERSISTED;
+        assert status == Status.PENDING;
+        status = Status.PERSISTED;
         // Invalidate the versionable node as well (version related properties)
         if (versionableEntry != null) {
             Iterator<PropertyEntry> propEntries = versionableEntry.getPropertyEntries();

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=1170270&r1=1170269&r2=1170270&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 Tue Sep 13 17:49:27 2011
@@ -16,17 +16,12 @@
  */
 package org.apache.jackrabbit.jcr2spi.operation;
 
-import javax.jcr.AccessDeniedException;
-import javax.jcr.ItemNotFoundException;
-import javax.jcr.RepositoryException;
-import javax.jcr.UnsupportedRepositoryOperationException;
-import javax.jcr.nodetype.ConstraintViolationException;
-import javax.jcr.version.VersionException;
-
 import org.apache.jackrabbit.jcr2spi.state.NodeState;
 import org.apache.jackrabbit.spi.NodeId;
 import org.apache.jackrabbit.spi.Path;
 
+import javax.jcr.RepositoryException;
+
 /**
  * {@code ReorderNodes}...
  */
@@ -62,7 +57,7 @@ public class ReorderNodes extends Transi
      */
     @Override
     public void accept(OperationVisitor visitor) throws RepositoryException {
-        assert status == STATUS_PENDING;
+        assert status == Status.PENDING;
         visitor.visit(this);
     }
 
@@ -73,8 +68,8 @@ public class ReorderNodes extends Transi
      */
     @Override
     public void persisted() throws RepositoryException {
-        assert status == STATUS_PENDING;
-        status = STATUS_PERSISTED;
+        assert status == Status.PENDING;
+        status = Status.PERSISTED;
         insert.getHierarchyEntry().complete(this);
     }
 
@@ -83,8 +78,8 @@ public class ReorderNodes extends Transi
      */
     @Override
     public void undo() throws RepositoryException {
-        assert status == STATUS_PENDING;
-        status = STATUS_UNDO;
+        assert status == Status.PENDING;
+        status = Status.UNDO;
         insert.getHierarchyEntry().complete(this);
     }
 
@@ -129,4 +124,4 @@ public class ReorderNodes extends Transi
         }
         return new ReorderNodes(parentState, insert, before);
     }
-}
\ No newline at end of file
+}

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=1170270&r1=1170269&r2=1170270&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 Tue Sep 13 17:49:27 2011
@@ -21,13 +21,7 @@ import org.apache.jackrabbit.jcr2spi.hie
 import org.apache.jackrabbit.jcr2spi.state.NodeState;
 import org.apache.jackrabbit.spi.NodeId;
 
-import javax.jcr.AccessDeniedException;
-import javax.jcr.ItemExistsException;
 import javax.jcr.RepositoryException;
-import javax.jcr.UnsupportedRepositoryOperationException;
-import javax.jcr.nodetype.ConstraintViolationException;
-import javax.jcr.nodetype.NoSuchNodeTypeException;
-import javax.jcr.version.VersionException;
 import java.util.Iterator;
 
 /**
@@ -54,7 +48,7 @@ public class ResolveMergeConflict extend
      */
     @Override
     public void accept(OperationVisitor visitor) throws RepositoryException {
-        assert status == STATUS_PENDING;
+        assert status == Status.PENDING;
         visitor.visit(this);
     }
 
@@ -66,8 +60,8 @@ public class ResolveMergeConflict extend
      */
     @Override
     public void persisted() {
-        assert status == STATUS_PENDING;
-        status = STATUS_PERSISTED;
+        assert status == Status.PENDING;
+        status = Status.PERSISTED;
         // non-recursive invalidation BUT including all properties
         Iterator<PropertyEntry> propEntries = ((NodeEntry) nodeState.getHierarchyEntry()).getPropertyEntries();
         while (propEntries.hasNext()) {
@@ -105,4 +99,4 @@ public class ResolveMergeConflict extend
         
         return new ResolveMergeConflict(nodeState, mergeFailedIds, predecessorIds, resolveDone);
     }
-}
\ No newline at end of file
+}

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=1170270&r1=1170269&r2=1170270&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 Tue Sep 13 17:49:27 2011
@@ -16,20 +16,13 @@
  */
 package org.apache.jackrabbit.jcr2spi.operation;
 
-import org.apache.jackrabbit.jcr2spi.state.NodeState;
 import org.apache.jackrabbit.jcr2spi.hierarchy.NodeEntry;
-import org.apache.jackrabbit.spi.Path;
+import org.apache.jackrabbit.jcr2spi.state.NodeState;
 import org.apache.jackrabbit.spi.NodeId;
+import org.apache.jackrabbit.spi.Path;
 
 import javax.jcr.RepositoryException;
-import javax.jcr.ItemExistsException;
-import javax.jcr.UnsupportedRepositoryOperationException;
-import javax.jcr.PathNotFoundException;
-import javax.jcr.InvalidItemStateException;
-import javax.jcr.lock.LockException;
-import javax.jcr.version.VersionException;
 import javax.jcr.version.Version;
-import javax.jcr.nodetype.ConstraintViolationException;
 
 /**
  * {@code Restore}...
@@ -56,7 +49,7 @@ public class Restore extends AbstractOpe
      */
     @Override
     public void accept(OperationVisitor visitor) throws RepositoryException {
-        assert status == STATUS_PENDING;
+        assert status == Status.PENDING;
         visitor.visit(this);
     }
 
@@ -69,8 +62,8 @@ public class Restore extends AbstractOpe
      */
     @Override
     public void persisted() {
-        assert status == STATUS_PENDING;
-        status = STATUS_PERSISTED;
+        assert status == Status.PENDING;
+        status = Status.PERSISTED;
         NodeEntry entry;
         if (nodeState == null || removeExisting) {
             // invalidate the complete tree
@@ -147,4 +140,4 @@ public class Restore extends AbstractOpe
         }
         return new Restore(null, null, versionStates, removeExisting);
     }
-}
\ No newline at end of file
+}

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=1170270&r1=1170269&r2=1170270&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 Tue Sep 13 17:49:27 2011
@@ -67,7 +67,7 @@ public class SetMixin extends TransientO
      */
     @Override
     public void accept(OperationVisitor visitor) throws RepositoryException {
-        assert status == STATUS_PENDING;
+        assert status == Status.PENDING;
         visitor.visit(this);
     }
 
@@ -76,8 +76,8 @@ public class SetMixin extends TransientO
      */
     @Override
     public void persisted() throws RepositoryException {
-        assert status == STATUS_PENDING;
-        status = STATUS_PERSISTED;
+        assert status == Status.PENDING;
+        status = Status.PERSISTED;
         nodeState.getHierarchyEntry().complete(this);
     }
 
@@ -86,8 +86,8 @@ public class SetMixin extends TransientO
      */
     @Override
     public void undo() throws RepositoryException {
-        assert status == STATUS_PENDING;
-        status = STATUS_UNDO;
+        assert status == Status.PENDING;
+        status = Status.UNDO;
         nodeState.getHierarchyEntry().complete(this);
     }
 
@@ -113,4 +113,4 @@ public class SetMixin extends TransientO
         }
         return new SetMixin(nodeState, mixinNames);
     }
-}
\ No newline at end of file
+}

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=1170270&r1=1170269&r2=1170270&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 Tue Sep 13 17:49:27 2011
@@ -16,17 +16,13 @@
  */
 package org.apache.jackrabbit.jcr2spi.operation;
 
-import javax.jcr.AccessDeniedException;
-import javax.jcr.RepositoryException;
-import javax.jcr.UnsupportedRepositoryOperationException;
-import javax.jcr.nodetype.NoSuchNodeTypeException;
-import javax.jcr.version.VersionException;
-
 import org.apache.jackrabbit.jcr2spi.state.ItemStateValidator;
 import org.apache.jackrabbit.jcr2spi.state.NodeState;
 import org.apache.jackrabbit.spi.Name;
 import org.apache.jackrabbit.spi.NodeId;
 
+import javax.jcr.RepositoryException;
+
 /**
  * {@code SetPrimaryNodeType}...
  */
@@ -62,7 +58,7 @@ public class SetPrimaryType extends Tran
      */
     @Override
     public void accept(OperationVisitor visitor) throws RepositoryException {
-        assert status == STATUS_PENDING;
+        assert status == Status.PENDING;
         visitor.visit(this);
     }
 
@@ -71,8 +67,8 @@ public class SetPrimaryType extends Tran
      */
     @Override
     public void persisted() throws RepositoryException {
-        assert status == STATUS_PENDING;
-        status = STATUS_PERSISTED;
+        assert status == Status.PENDING;
+        status = Status.PERSISTED;
         nodeState.getHierarchyEntry().complete(this);
     }
 
@@ -81,8 +77,8 @@ public class SetPrimaryType extends Tran
      */
     @Override
     public void undo() throws RepositoryException {
-        assert status == STATUS_PENDING;
-        status = STATUS_UNDO;
+        assert status == Status.PENDING;
+        status = Status.UNDO;
         nodeState.getHierarchyEntry().complete(this);
     }
 
@@ -109,4 +105,4 @@ public class SetPrimaryType extends Tran
         }
         return new SetPrimaryType(nodeState, primaryTypeName);
     }
-}
\ No newline at end of file
+}

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=1170270&r1=1170269&r2=1170270&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 Tue Sep 13 17:49:27 2011
@@ -16,23 +16,15 @@
  */
 package org.apache.jackrabbit.jcr2spi.operation;
 
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.jcr.AccessDeniedException;
-import javax.jcr.ItemExistsException;
-import javax.jcr.RepositoryException;
-import javax.jcr.UnsupportedRepositoryOperationException;
-import javax.jcr.ValueFormatException;
-import javax.jcr.lock.LockException;
-import javax.jcr.nodetype.ConstraintViolationException;
-import javax.jcr.version.VersionException;
-
 import org.apache.jackrabbit.jcr2spi.state.ItemStateValidator;
 import org.apache.jackrabbit.jcr2spi.state.PropertyState;
 import org.apache.jackrabbit.spi.PropertyId;
 import org.apache.jackrabbit.spi.QValue;
 
+import javax.jcr.RepositoryException;
+import java.util.ArrayList;
+import java.util.List;
+
 /**
  * {@code SetPropertyValue}...
  */
@@ -79,7 +71,7 @@ public class SetPropertyValue extends Tr
      */
     @Override
     public void accept(OperationVisitor visitor) throws RepositoryException {
-        assert status == STATUS_PENDING;
+        assert status == Status.PENDING;
         visitor.visit(this);
     }
 
@@ -88,8 +80,8 @@ public class SetPropertyValue extends Tr
      */
     @Override
     public void persisted() throws RepositoryException {
-        assert status == STATUS_PENDING;
-        status = STATUS_PERSISTED;
+        assert status == Status.PENDING;
+        status = Status.PERSISTED;
         try {
             propertyState.getHierarchyEntry().complete(this);
         } finally {
@@ -105,8 +97,8 @@ public class SetPropertyValue extends Tr
      */
     @Override
     public void undo() throws RepositoryException {
-        assert status == STATUS_PENDING;
-        status = STATUS_UNDO;
+        assert status == Status.PENDING;
+        status = Status.UNDO;
         propertyState.getHierarchyEntry().complete(this);
 
         // NOTE: new values don't need to be disposed as the transient change
@@ -148,4 +140,4 @@ public class SetPropertyValue extends Tr
         QValue[] cleanValues = list.toArray(new QValue[list.size()]);
         return new SetPropertyValue(propState, valueType, cleanValues);
     }
-}
\ No newline at end of file
+}

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=1170270&r1=1170269&r2=1170270&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 Tue Sep 13 17:49:27 2011
@@ -19,13 +19,7 @@ package org.apache.jackrabbit.jcr2spi.op
 import org.apache.jackrabbit.jcr2spi.state.NodeState;
 import org.apache.jackrabbit.spi.NodeId;
 
-import javax.jcr.AccessDeniedException;
-import javax.jcr.ItemExistsException;
 import javax.jcr.RepositoryException;
-import javax.jcr.UnsupportedRepositoryOperationException;
-import javax.jcr.nodetype.ConstraintViolationException;
-import javax.jcr.nodetype.NoSuchNodeTypeException;
-import javax.jcr.version.VersionException;
 
 /**
  * {@code Update}...
@@ -48,7 +42,7 @@ public class Update extends AbstractOper
      */
     @Override
     public void accept(OperationVisitor visitor) throws RepositoryException {
-        assert status == STATUS_PENDING;
+        assert status == Status.PENDING;
         visitor.visit(this);
     }
 
@@ -60,8 +54,8 @@ public class Update extends AbstractOper
      */
     @Override
     public void persisted() {
-        assert status == STATUS_PENDING;
-        status = STATUS_PERSISTED;
+        assert status == Status.PENDING;
+        status = Status.PERSISTED;
         nodeState.getHierarchyEntry().invalidate(true);
     }
 
@@ -86,4 +80,4 @@ public class Update extends AbstractOper
     public static Operation create(NodeState nodeState, String srcWorkspaceName) {
         return new Update(nodeState, srcWorkspaceName);
     }
-}
\ No newline at end of file
+}

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=1170270&r1=1170269&r2=1170270&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 Tue Sep 13 17:49:27 2011
@@ -16,18 +16,12 @@
  */
 package org.apache.jackrabbit.jcr2spi.operation;
 
-import org.apache.jackrabbit.jcr2spi.state.NodeState;
 import org.apache.jackrabbit.jcr2spi.hierarchy.NodeEntry;
+import org.apache.jackrabbit.jcr2spi.state.NodeState;
 import org.apache.jackrabbit.spi.NodeId;
 
-import javax.jcr.RepositoryException;
-import javax.jcr.AccessDeniedException;
-import javax.jcr.ItemExistsException;
-import javax.jcr.UnsupportedRepositoryOperationException;
 import javax.jcr.ImportUUIDBehavior;
-import javax.jcr.version.VersionException;
-import javax.jcr.nodetype.ConstraintViolationException;
-import javax.jcr.nodetype.NoSuchNodeTypeException;
+import javax.jcr.RepositoryException;
 import java.io.InputStream;
 
 /**
@@ -56,7 +50,7 @@ public class WorkspaceImport extends Abs
      */
     @Override
     public void accept(OperationVisitor visitor) throws RepositoryException {
-        assert status == STATUS_PENDING;
+        assert status == Status.PENDING;
         visitor.visit(this);
     }
 
@@ -68,8 +62,8 @@ public class WorkspaceImport extends Abs
      */
     @Override
     public void persisted() {
-        assert status == STATUS_PENDING;
-        status = STATUS_PERSISTED;
+        assert status == Status.PENDING;
+        status = Status.PERSISTED;
         NodeEntry entry;
         if (uuidBehaviour == ImportUUIDBehavior.IMPORT_UUID_COLLISION_REMOVE_EXISTING ||
                 uuidBehaviour == ImportUUIDBehavior.IMPORT_UUID_COLLISION_REPLACE_EXISTING) {



Mime
View raw message