jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r523334 - in /jackrabbit/trunk/contrib/spi: ./ jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/ jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/
Date Wed, 28 Mar 2007 14:05:33 GMT
Author: angela
Date: Wed Mar 28 07:05:32 2007
New Revision: 523334

URL: http://svn.apache.org/viewvc?view=rev&rev=523334
Log:
- Operation.persisted -> remove CacheBehaviour param (as suggested with TODO in WorkspaceManager).
- adjust TODO.txt

Modified:
    jackrabbit/trunk/contrib/spi/TODO.txt
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/WorkspaceManager.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AbstractCopy.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AddLabel.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AddNode.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AddProperty.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Checkin.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Checkout.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Clone.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/LockOperation.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/LockRefresh.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/LockRelease.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Merge.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Move.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Operation.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Remove.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/RemoveLabel.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/RemoveVersion.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/ReorderNodes.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/ResolveMergeConflict.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Restore.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/SetMixin.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/SetPropertyValue.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Update.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/WorkspaceImport.java

Modified: jackrabbit/trunk/contrib/spi/TODO.txt
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/TODO.txt?view=diff&rev=523334&r1=523333&r2=523334
==============================================================================
--- jackrabbit/trunk/contrib/spi/TODO.txt (original)
+++ jackrabbit/trunk/contrib/spi/TODO.txt Wed Mar 28 07:05:32 2007
@@ -21,10 +21,12 @@
 Known Issues and TODOs with jcr2spi
 --------------------------------------------------------------------------------
 
-- BUG: CacheBehaviour.OBSERVATION doesn't work properly
+- BUG: observation && CacheBehaviour.OBSERVATION 
 
 - BUG: Observation: filtering events by nodetype, uuid doesn't work
 
+- BUG: Reverting combined move/reorder operations
+
 - IMPROVE: Replace ItemState-duality by copy on write behaviour
 
 - IMPROVE: AddNode 
@@ -32,8 +34,8 @@
    In order to be able to return the created Node, it would be required to
    now its Id if the operation succeeded, since the Node name passed to the
    call may not identify the new Node in case of same-name-siblings.
-   
-   
+
+
 --------------------------------------------------------------------------------
 Known Issues and TODOs with spi2dav
 --------------------------------------------------------------------------------

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/WorkspaceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/WorkspaceManager.java?view=diff&rev=523334&r1=523333&r2=523334
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/WorkspaceManager.java (original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/WorkspaceManager.java Wed Mar 28 07:05:32 2007
@@ -465,8 +465,7 @@
             the HierarchyEventListener.
             */
             new OperationVisitorImpl(sessionInfo).execute(operation);
-            // TODO: remove parameter CacheBehaviour
-            operation.persisted(CacheBehaviour.INVALIDATE);
+            operation.persisted();
         } finally {
             updateSync.release();
         }

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AbstractCopy.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AbstractCopy.java?view=diff&rev=523334&r1=523333&r2=523334
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AbstractCopy.java (original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AbstractCopy.java Wed Mar 28 07:05:32 2007
@@ -19,7 +19,6 @@
 import org.apache.jackrabbit.jcr2spi.state.ItemState;
 import org.apache.jackrabbit.jcr2spi.state.NodeState;
 import org.apache.jackrabbit.jcr2spi.ManagerProvider;
-import org.apache.jackrabbit.jcr2spi.config.CacheBehaviour;
 import org.apache.jackrabbit.jcr2spi.util.LogUtil;
 import org.apache.jackrabbit.name.Path;
 import org.apache.jackrabbit.name.QName;
@@ -78,13 +77,10 @@
     /**
      * Invalidate the destination parent <code>NodeState</code>.
      *
-     * @see Operation#persisted(CacheBehaviour)
-     * @param cacheBehaviour
+     * @see Operation#persisted()
      */
-    public void persisted(CacheBehaviour cacheBehaviour) {
-        if (cacheBehaviour == CacheBehaviour.INVALIDATE) {
-            destParentState.getHierarchyEntry().invalidate(false);
-        }
+    public void persisted() {
+        destParentState.getHierarchyEntry().invalidate(false);
     }
 
     //----------------------------------------< Access Operation Parameters >---

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AddLabel.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AddLabel.java?view=diff&rev=523334&r1=523333&r2=523334
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AddLabel.java (original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AddLabel.java Wed Mar 28 07:05:32 2007
@@ -22,7 +22,6 @@
 import org.apache.jackrabbit.name.Path;
 import org.apache.jackrabbit.jcr2spi.state.NodeState;
 import org.apache.jackrabbit.jcr2spi.hierarchy.NodeEntry;
-import org.apache.jackrabbit.jcr2spi.config.CacheBehaviour;
 import org.apache.jackrabbit.spi.NodeId;
 
 import javax.jcr.RepositoryException;
@@ -74,18 +73,15 @@
      * version history. If '<code>moveLabel</code>' is true, all decendant states
      * (property states) are invalidated as well.
      *
-     * @see Operation#persisted(CacheBehaviour)
-     * @param cacheBehaviour
+     * @see Operation#persisted()
      */
-    public void persisted(CacheBehaviour cacheBehaviour) {
-        if (cacheBehaviour == CacheBehaviour.INVALIDATE) {
-            try {
-                NodeEntry vhEntry = (NodeEntry) versionHistoryState.getHierarchyEntry();
-                NodeEntry lnEntry = vhEntry.getNodeEntry(QName.JCR_VERSIONLABELS, Path.INDEX_DEFAULT);
-                lnEntry.invalidate(moveLabel);
-            } catch (RepositoryException e) {
-                log.debug(e.getMessage());
-            }
+    public void persisted() {
+        try {
+            NodeEntry vhEntry = (NodeEntry) versionHistoryState.getHierarchyEntry();
+            NodeEntry lnEntry = vhEntry.getNodeEntry(QName.JCR_VERSIONLABELS, Path.INDEX_DEFAULT);
+            lnEntry.invalidate(moveLabel);
+        } catch (RepositoryException e) {
+            log.debug(e.getMessage());
         }
     }
     //----------------------------------------< Access Operation Parameters >---

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AddNode.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AddNode.java?view=diff&rev=523334&r1=523333&r2=523334
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AddNode.java (original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AddNode.java Wed Mar 28 07:05:32 2007
@@ -17,7 +17,6 @@
 package org.apache.jackrabbit.jcr2spi.operation;
 
 import org.apache.jackrabbit.jcr2spi.state.NodeState;
-import org.apache.jackrabbit.jcr2spi.config.CacheBehaviour;
 import org.apache.jackrabbit.name.QName;
 import org.apache.jackrabbit.spi.NodeId;
 import org.slf4j.LoggerFactory;
@@ -67,10 +66,9 @@
     /**
      * Throws UnsupportedOperationException
      *
-     * @see Operation#persisted(CacheBehaviour)
-     * @param cacheBehaviour
+     * @see Operation#persisted()
      */
-    public void persisted(CacheBehaviour cacheBehaviour) {
+    public void persisted() {
         throw new UnsupportedOperationException("persisted() not implemented for transient modification.");
     }
     //----------------------------------------< Access Operation Parameters >---

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AddProperty.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AddProperty.java?view=diff&rev=523334&r1=523333&r2=523334
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AddProperty.java (original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AddProperty.java Wed Mar 28 07:05:32 2007
@@ -21,7 +21,6 @@
 import org.apache.jackrabbit.spi.NodeId;
 import org.apache.jackrabbit.name.QName;
 import org.apache.jackrabbit.jcr2spi.state.NodeState;
-import org.apache.jackrabbit.jcr2spi.config.CacheBehaviour;
 
 import javax.jcr.RepositoryException;
 import javax.jcr.ItemExistsException;
@@ -68,10 +67,9 @@
     /**
      * Throws UnsupportedOperationException
      *
-     * @see Operation#persisted(CacheBehaviour)
-     * @param cacheBehaviour
+     * @see Operation#persisted()
      */
-    public void persisted(CacheBehaviour cacheBehaviour) {
+    public void persisted() {
         throw new UnsupportedOperationException("persisted() not implemented for transient modification.");
     }
     //----------------------------------------< Access Operation Parameters >---

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Checkin.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Checkin.java?view=diff&rev=523334&r1=523333&r2=523334
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Checkin.java (original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Checkin.java Wed Mar 28 07:05:32 2007
@@ -17,7 +17,6 @@
 package org.apache.jackrabbit.jcr2spi.operation;
 
 import org.apache.jackrabbit.jcr2spi.state.NodeState;
-import org.apache.jackrabbit.jcr2spi.config.CacheBehaviour;
 import org.apache.jackrabbit.jcr2spi.version.VersionManager;
 import org.apache.jackrabbit.jcr2spi.hierarchy.NodeEntry;
 import org.apache.jackrabbit.jcr2spi.hierarchy.PropertyEntry;
@@ -62,23 +61,20 @@
     /**
      * Invalidate the target <code>NodeState</code>.
      *
-     * @see Operation#persisted(CacheBehaviour)
-     * @param cacheBehaviour
+     * @see Operation#persisted()
      */
-    public void persisted(CacheBehaviour cacheBehaviour) {
-        if (cacheBehaviour == CacheBehaviour.INVALIDATE) {
-            try {
-                mgr.getVersionHistoryNodeState(nodeState).invalidate(true);
-            } catch (RepositoryException e) {
-                log.warn("Internal error", e);
-            }
-            Iterator entries = ((NodeEntry) nodeState.getHierarchyEntry()).getPropertyEntries();
-            while (entries.hasNext()) {
-                PropertyEntry pe = (PropertyEntry) entries.next();
-                pe.invalidate(false);
-            }
-            nodeState.getHierarchyEntry().invalidate(false);
+    public void persisted() {
+        try {
+            mgr.getVersionHistoryNodeState(nodeState).invalidate(true);
+        } catch (RepositoryException e) {
+            log.warn("Internal error", e);
         }
+        Iterator entries = ((NodeEntry) nodeState.getHierarchyEntry()).getPropertyEntries();
+        while (entries.hasNext()) {
+            PropertyEntry pe = (PropertyEntry) entries.next();
+            pe.invalidate(false);
+        }
+        nodeState.getHierarchyEntry().invalidate(false);
     }
     //----------------------------------------< Access Operation Parameters >---
     /**

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Checkout.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Checkout.java?view=diff&rev=523334&r1=523333&r2=523334
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Checkout.java (original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Checkout.java Wed Mar 28 07:05:32 2007
@@ -17,7 +17,6 @@
 package org.apache.jackrabbit.jcr2spi.operation;
 
 import org.apache.jackrabbit.jcr2spi.state.NodeState;
-import org.apache.jackrabbit.jcr2spi.config.CacheBehaviour;
 import org.apache.jackrabbit.jcr2spi.version.VersionManager;
 import org.apache.jackrabbit.jcr2spi.hierarchy.NodeEntry;
 import org.apache.jackrabbit.jcr2spi.hierarchy.PropertyEntry;
@@ -58,25 +57,22 @@
     /**
      * Invalidate the target <code>NodeState</code>.
      *
-     * @see Operation#persisted(CacheBehaviour)
-     * @param cacheBehaviour
+     * @see Operation#persisted()
      */
-    public void persisted(CacheBehaviour cacheBehaviour) {
-        if (cacheBehaviour == CacheBehaviour.INVALIDATE) {
-            try {
-                mgr.getVersionHistoryNodeState(nodeState).invalidate(true);
-            } catch (RepositoryException e) {
-                log.warn("Internal error", e);
-            }
-            // non-recursive invalidation (but including all properties)
-            NodeEntry nodeEntry = (NodeEntry) nodeState.getHierarchyEntry();
-            Iterator entries = nodeEntry.getPropertyEntries();
-            while (entries.hasNext()) {
-                PropertyEntry pe = (PropertyEntry) entries.next();
-                pe.invalidate(false);
-            }
-            nodeEntry.invalidate(false);
+    public void persisted() {
+        try {
+            mgr.getVersionHistoryNodeState(nodeState).invalidate(true);
+        } catch (RepositoryException e) {
+            log.warn("Internal error", e);
         }
+        // non-recursive invalidation (but including all properties)
+        NodeEntry nodeEntry = (NodeEntry) nodeState.getHierarchyEntry();
+        Iterator entries = nodeEntry.getPropertyEntries();
+        while (entries.hasNext()) {
+            PropertyEntry pe = (PropertyEntry) entries.next();
+            pe.invalidate(false);
+        }
+        nodeEntry.invalidate(false);
     }
 
     //----------------------------------------< Access Operation Parameters >---

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Clone.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Clone.java?view=diff&rev=523334&r1=523333&r2=523334
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Clone.java (original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Clone.java Wed Mar 28 07:05:32 2007
@@ -17,7 +17,6 @@
 package org.apache.jackrabbit.jcr2spi.operation;
 
 import org.apache.jackrabbit.jcr2spi.ManagerProvider;
-import org.apache.jackrabbit.jcr2spi.config.CacheBehaviour;
 import org.apache.jackrabbit.jcr2spi.hierarchy.HierarchyEntry;
 import org.apache.jackrabbit.name.Path;
 import org.slf4j.Logger;
@@ -60,21 +59,18 @@
     }
 
     /**
-     * @see Operation#persisted(CacheBehaviour)
-     * @param cacheBehaviour
+     * @see Operation#persisted()
      */
-    public void persisted(CacheBehaviour cacheBehaviour) {
-        if (cacheBehaviour == CacheBehaviour.INVALIDATE) {
-            if (removeExisting) {
-                // invalidate the complete tree -> find root-hierarchy-entry
-                HierarchyEntry he = destParentState.getHierarchyEntry();
-                while (he.getParent() != null) {
-                    he = he.getParent();
-                }
-                he.invalidate(true);
-            } else {
-                super.persisted(cacheBehaviour);
+    public void persisted() {
+        if (removeExisting) {
+            // invalidate the complete tree -> find root-hierarchy-entry
+            HierarchyEntry he = destParentState.getHierarchyEntry();
+            while (he.getParent() != null) {
+                he = he.getParent();
             }
+            he.invalidate(true);
+        } else {
+            super.persisted();
         }
     }
 

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/LockOperation.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/LockOperation.java?view=diff&rev=523334&r1=523333&r2=523334
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/LockOperation.java (original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/LockOperation.java Wed Mar 28 07:05:32 2007
@@ -17,7 +17,6 @@
 package org.apache.jackrabbit.jcr2spi.operation;
 
 import org.apache.jackrabbit.jcr2spi.state.NodeState;
-import org.apache.jackrabbit.jcr2spi.config.CacheBehaviour;
 import org.apache.jackrabbit.spi.LockInfo;
 import org.apache.jackrabbit.spi.NodeId;
 
@@ -59,14 +58,11 @@
     /**
      * Invalidates the <code>NodeState</code> that has been locked.
      *
-     * @see Operation#persisted(CacheBehaviour)
-     * @param cacheBehaviour
+     * @see Operation#persisted()
      */
-    public void persisted(CacheBehaviour cacheBehaviour) {
-        if (cacheBehaviour == CacheBehaviour.INVALIDATE) {
-            // non-recursive invalidation
-            nodeState.getHierarchyEntry().invalidate(false);
-        }
+    public void persisted() {
+        // non-recursive invalidation
+        nodeState.getHierarchyEntry().invalidate(false);
     }
 
     //----------------------------------------< Access Operation Parameters >---

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/LockRefresh.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/LockRefresh.java?view=diff&rev=523334&r1=523333&r2=523334
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/LockRefresh.java (original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/LockRefresh.java Wed Mar 28 07:05:32 2007
@@ -21,7 +21,6 @@
 import javax.jcr.ItemExistsException;
 import javax.jcr.UnsupportedRepositoryOperationException;
 import org.apache.jackrabbit.jcr2spi.state.NodeState;
-import org.apache.jackrabbit.jcr2spi.config.CacheBehaviour;
 import org.apache.jackrabbit.spi.NodeId;
 
 import javax.jcr.version.VersionException;
@@ -50,10 +49,9 @@
     }
 
     /**
-     * @see Operation#persisted(CacheBehaviour)
-     * @param cacheBehaviour
+     * @see Operation#persisted()
      */
-    public void persisted(CacheBehaviour cacheBehaviour) {
+    public void persisted() {
         // nothing to do.
     }
     

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/LockRelease.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/LockRelease.java?view=diff&rev=523334&r1=523333&r2=523334
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/LockRelease.java (original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/LockRelease.java Wed Mar 28 07:05:32 2007
@@ -19,7 +19,6 @@
 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.config.CacheBehaviour;
 import org.apache.jackrabbit.spi.NodeId;
 
 import javax.jcr.RepositoryException;
@@ -56,20 +55,17 @@
      * Invalidates the <code>NodeState</code> that has been unlocked and all its
      * child properties.
      *
-     * @see Operation#persisted(CacheBehaviour)
-     * @param cacheBehaviour
+     * @see Operation#persisted()
      */
-    public void persisted(CacheBehaviour cacheBehaviour) {
-        if (cacheBehaviour == CacheBehaviour.INVALIDATE) {
-            // non-recursive invalidation but including all properties
-            NodeEntry nodeEntry = nodeState.getNodeEntry();
-            Iterator entries = nodeEntry.getPropertyEntries();
-            while (entries.hasNext()) {
-                PropertyEntry pe = (PropertyEntry) entries.next();
-                pe.invalidate(false);
-            }
-            nodeEntry.invalidate(false);
+    public void persisted() {
+        // non-recursive invalidation but including all properties
+        NodeEntry nodeEntry = nodeState.getNodeEntry();
+        Iterator entries = nodeEntry.getPropertyEntries();
+        while (entries.hasNext()) {
+            PropertyEntry pe = (PropertyEntry) entries.next();
+            pe.invalidate(false);
         }
+        nodeEntry.invalidate(false);
     }
 
     //----------------------------------------< Access Operation Parameters >---

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Merge.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Merge.java?view=diff&rev=523334&r1=523333&r2=523334
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Merge.java (original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Merge.java Wed Mar 28 07:05:32 2007
@@ -17,7 +17,6 @@
 package org.apache.jackrabbit.jcr2spi.operation;
 
 import org.apache.jackrabbit.jcr2spi.state.NodeState;
-import org.apache.jackrabbit.jcr2spi.config.CacheBehaviour;
 import org.apache.jackrabbit.jcr2spi.version.VersionManager;
 import org.apache.jackrabbit.spi.IdIterator;
 import org.apache.jackrabbit.spi.NodeId;
@@ -66,18 +65,15 @@
     /**
      * Invalidates the target nodestate and all descendants.
      *
-     * @see Operation#persisted(CacheBehaviour)
-     * @param cacheBehaviour
+     * @see Operation#persisted()
      */
-    public void persisted(CacheBehaviour cacheBehaviour) {
-        if (cacheBehaviour == CacheBehaviour.INVALIDATE) {
-            try {
-                mgr.getVersionHistoryNodeState(nodeState).invalidate(true);
-            } catch (RepositoryException e) {
-                log.warn("Error while retrieving VersionHistory state:", e.getMessage());
-            }
-            nodeState.getHierarchyEntry().invalidate(true);
+    public void persisted() {
+        try {
+            mgr.getVersionHistoryNodeState(nodeState).invalidate(true);
+        } catch (RepositoryException e) {
+            log.warn("Error while retrieving VersionHistory state:", e.getMessage());
         }
+        nodeState.getHierarchyEntry().invalidate(true);
     }
 
     //----------------------------------------< Access Operation Parameters >---

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Move.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Move.java?view=diff&rev=523334&r1=523333&r2=523334
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Move.java (original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Move.java Wed Mar 28 07:05:32 2007
@@ -20,7 +20,6 @@
 import org.apache.jackrabbit.jcr2spi.hierarchy.HierarchyManager;
 import org.apache.jackrabbit.jcr2spi.hierarchy.NodeEntry;
 import org.apache.jackrabbit.jcr2spi.state.NodeState;
-import org.apache.jackrabbit.jcr2spi.config.CacheBehaviour;
 import org.apache.jackrabbit.name.Path;
 import org.apache.jackrabbit.name.QName;
 import org.apache.jackrabbit.name.MalformedPathException;
@@ -82,22 +81,19 @@
      * modification. Otherwise, the moved state as well as both parent states
      * are invalidated.
      *
-     * @see Operation#persisted(CacheBehaviour)
-     * @param cacheBehaviour
+     * @see Operation#persisted()
      */
-    public void persisted(CacheBehaviour cacheBehaviour) {
-        if (cacheBehaviour == CacheBehaviour.INVALIDATE) {
-            // non-recursive invalidation
-            try {
-                srcState.getNodeEntry().move(destName, destParentState.getNodeEntry(), false);
-                // TODO: TOBEFIXED. moved state ev. got a new definition.
-            } catch (RepositoryException e) {
-                // should not occure
-                log.error("Internal error", e);
-                srcParentState.getHierarchyEntry().invalidate(false);
-                destParentState.getHierarchyEntry().invalidate(false);
-                srcState.getHierarchyEntry().invalidate(false);
-            }
+    public void persisted() {
+        // non-recursive invalidation
+        try {
+            srcState.getNodeEntry().move(destName, destParentState.getNodeEntry(), false);
+            // TODO: TOBEFIXED. moved state ev. got a new definition.
+        } catch (RepositoryException e) {
+            // should not occure
+            log.error("Internal error", e);
+            srcParentState.getHierarchyEntry().invalidate(false);
+            destParentState.getHierarchyEntry().invalidate(false);
+            srcState.getHierarchyEntry().invalidate(false);
         }
     }
     //----------------------------------------< Access Operation Parameters >---

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Operation.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Operation.java?view=diff&rev=523334&r1=523333&r2=523334
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Operation.java (original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Operation.java Wed Mar 28 07:05:32 2007
@@ -23,7 +23,6 @@
 import javax.jcr.UnsupportedRepositoryOperationException;
 import javax.jcr.RepositoryException;
 import org.apache.jackrabbit.jcr2spi.state.ItemState;
-import org.apache.jackrabbit.jcr2spi.config.CacheBehaviour;
 
 import javax.jcr.version.VersionException;
 import java.util.Collection;
@@ -58,5 +57,5 @@
     /**
      * Informs this Operation that it has been successfully executed.
      */
-    public void persisted(CacheBehaviour cacheBehaviour);
+    public void persisted();
 }

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Remove.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Remove.java?view=diff&rev=523334&r1=523333&r2=523334
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Remove.java (original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Remove.java Wed Mar 28 07:05:32 2007
@@ -18,7 +18,6 @@
 
 import org.apache.jackrabbit.jcr2spi.state.ItemState;
 import org.apache.jackrabbit.jcr2spi.state.NodeState;
-import org.apache.jackrabbit.jcr2spi.config.CacheBehaviour;
 import org.apache.jackrabbit.spi.ItemId;
 
 import javax.jcr.AccessDeniedException;
@@ -55,10 +54,9 @@
     /**
      * Throws UnsupportedOperationException
      *
-     * @see Operation#persisted(CacheBehaviour)
-     * @param cacheBehaviour
+     * @see Operation#persisted()
      */
-    public void persisted(CacheBehaviour cacheBehaviour) {
+    public void persisted() {
         throw new UnsupportedOperationException("persisted() not implemented for transient modification.");
     }
 

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/RemoveLabel.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/RemoveLabel.java?view=diff&rev=523334&r1=523333&r2=523334
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/RemoveLabel.java (original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/RemoveLabel.java Wed Mar 28 07:05:32 2007
@@ -22,7 +22,6 @@
 import org.apache.jackrabbit.name.Path;
 import org.apache.jackrabbit.jcr2spi.state.NodeState;
 import org.apache.jackrabbit.jcr2spi.hierarchy.NodeEntry;
-import org.apache.jackrabbit.jcr2spi.config.CacheBehaviour;
 import org.apache.jackrabbit.spi.NodeId;
 
 import javax.jcr.RepositoryException;
@@ -71,18 +70,15 @@
      * Invalidates the jcr:versionlabel nodestate present with the given
      * version history and all decendant states (property states).
      *
-     * @see Operation#persisted(CacheBehaviour)
-     * @param cacheBehaviour
+     * @see Operation#persisted()
      */
-    public void persisted(CacheBehaviour cacheBehaviour) {
-        if (cacheBehaviour == CacheBehaviour.INVALIDATE) {
-            try {
-                NodeEntry vhEntry = (NodeEntry) versionHistoryState.getHierarchyEntry();
-                NodeEntry lnEntry = vhEntry.getNodeEntry(QName.JCR_VERSIONLABELS, Path.INDEX_DEFAULT);
-                lnEntry.invalidate(true);
-            } catch (RepositoryException e) {
-                log.debug(e.getMessage());
-            }
+    public void persisted() {
+        try {
+            NodeEntry vhEntry = (NodeEntry) versionHistoryState.getHierarchyEntry();
+            NodeEntry lnEntry = vhEntry.getNodeEntry(QName.JCR_VERSIONLABELS, Path.INDEX_DEFAULT);
+            lnEntry.invalidate(true);
+        } catch (RepositoryException e) {
+            log.debug(e.getMessage());
         }
     }
 

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/RemoveVersion.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/RemoveVersion.java?view=diff&rev=523334&r1=523333&r2=523334
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/RemoveVersion.java (original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/RemoveVersion.java Wed Mar 28 07:05:32 2007
@@ -20,7 +20,6 @@
 import org.apache.jackrabbit.jcr2spi.state.NodeState;
 import org.apache.jackrabbit.jcr2spi.hierarchy.NodeEntry;
 import org.apache.jackrabbit.jcr2spi.hierarchy.PropertyEntry;
-import org.apache.jackrabbit.jcr2spi.config.CacheBehaviour;
 import org.apache.jackrabbit.jcr2spi.version.VersionManager;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -61,25 +60,22 @@
      * Invalidates the <code>NodeState</code> that has been updated and all
      * its decendants. Second, the parent state gets invalidated.
      *
-     * @see Operation#persisted(CacheBehaviour)
-     * @param cacheBehaviour
+     * @see Operation#persisted()
      */
-    public void persisted(CacheBehaviour cacheBehaviour) {
-        if (cacheBehaviour == CacheBehaviour.INVALIDATE) {
-            // invaliate the versionable node as well (version related properties)
-            if (versionableEntry != null) {
-                Iterator propEntries = versionableEntry.getPropertyEntries();
-                while (propEntries.hasNext()) {
-                    PropertyEntry pe = (PropertyEntry) propEntries.next();
-                    pe.invalidate(false);
-                }
-                versionableEntry.invalidate(false);
+    public void persisted() {
+        // invaliate the versionable node as well (version related properties)
+        if (versionableEntry != null) {
+            Iterator propEntries = versionableEntry.getPropertyEntries();
+            while (propEntries.hasNext()) {
+                PropertyEntry pe = (PropertyEntry) propEntries.next();
+                pe.invalidate(false);
             }
-
-            // invalidate the versionhistory entry and all its children
-            // in order to the the v-graph recalculated
-            removeState.getHierarchyEntry().getParent().invalidate(true);
+            versionableEntry.invalidate(false);
         }
+
+        // invalidate the versionhistory entry and all its children
+        // in order to the the v-graph recalculated
+        removeState.getHierarchyEntry().getParent().invalidate(true);
     }
 
     //------------------------------------------------------------< Factory >---

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/ReorderNodes.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/ReorderNodes.java?view=diff&rev=523334&r1=523333&r2=523334
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/ReorderNodes.java (original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/ReorderNodes.java Wed Mar 28 07:05:32 2007
@@ -17,7 +17,6 @@
 package org.apache.jackrabbit.jcr2spi.operation;
 
 import org.apache.jackrabbit.jcr2spi.state.NodeState;
-import org.apache.jackrabbit.jcr2spi.config.CacheBehaviour;
 import org.apache.jackrabbit.name.Path;
 import org.apache.jackrabbit.spi.NodeId;
 
@@ -65,10 +64,9 @@
     /**
      * Throws UnsupportedOperationException
      *
-     * @see Operation#persisted(CacheBehaviour)
-     * @param cacheBehaviour
+     * @see Operation#persisted()
      */
-    public void persisted(CacheBehaviour cacheBehaviour) {
+    public void persisted() {
         throw new UnsupportedOperationException("persisted() not implemented for transient modification.");
     }
     //----------------------------------------< Access Operation Parameters >---

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/ResolveMergeConflict.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/ResolveMergeConflict.java?view=diff&rev=523334&r1=523333&r2=523334
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/ResolveMergeConflict.java (original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/ResolveMergeConflict.java Wed Mar 28 07:05:32 2007
@@ -19,7 +19,6 @@
 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.config.CacheBehaviour;
 import org.apache.jackrabbit.spi.NodeId;
 
 import javax.jcr.RepositoryException;
@@ -63,19 +62,16 @@
      * Invalidates the <code>NodeState</code> that had a merge conflict pending
      * and all its child properties.
      *
-     * @see Operation#persisted(CacheBehaviour)
-     * @param cacheBehaviour
+     * @see Operation#persisted()
      */
-    public void persisted(CacheBehaviour cacheBehaviour) {
-        if (cacheBehaviour == CacheBehaviour.INVALIDATE) {
-            // non-recursive invalidation BUT including all properties
-            Iterator propEntries = ((NodeEntry) nodeState.getHierarchyEntry()).getPropertyEntries();
-            while (propEntries.hasNext()) {
-                PropertyEntry pe = (PropertyEntry) propEntries.next();
-                pe.invalidate(false);
-            }
-            nodeState.getHierarchyEntry().invalidate(false);
+    public void persisted() {
+        // non-recursive invalidation BUT including all properties
+        Iterator propEntries = ((NodeEntry) nodeState.getHierarchyEntry()).getPropertyEntries();
+        while (propEntries.hasNext()) {
+            PropertyEntry pe = (PropertyEntry) propEntries.next();
+            pe.invalidate(false);
         }
+        nodeState.getHierarchyEntry().invalidate(false);
     }
     //----------------------------------------< Access Operation Parameters >---
     public NodeId getNodeId() {

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Restore.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Restore.java?view=diff&rev=523334&r1=523333&r2=523334
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Restore.java (original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Restore.java Wed Mar 28 07:05:32 2007
@@ -17,7 +17,6 @@
 package org.apache.jackrabbit.jcr2spi.operation;
 
 import org.apache.jackrabbit.jcr2spi.state.NodeState;
-import org.apache.jackrabbit.jcr2spi.config.CacheBehaviour;
 import org.apache.jackrabbit.jcr2spi.hierarchy.NodeEntry;
 import org.apache.jackrabbit.name.Path;
 import org.apache.jackrabbit.spi.NodeId;
@@ -64,25 +63,22 @@
      * invalidated, otherwise the given <code>NodeState</code> that has been
      * updated and all its decendants.
      *
-     * @see Operation#persisted(CacheBehaviour)
-     * @param cacheBehaviour
+     * @see Operation#persisted()
      */
-    public void persisted(CacheBehaviour cacheBehaviour) {
-        if (cacheBehaviour == CacheBehaviour.INVALIDATE) {
-            NodeEntry entry;
-            if (nodeState == null || removeExisting) {
-                // invalidate the complete tree
-                // -> start searching root-entry from any version-entry or
-                //    from the given nodestate
-                entry = (nodeState == null) ? versionStates[0].getNodeEntry() : nodeState.getNodeEntry();
-                while (entry.getParent() != null) {
-                    entry = entry.getParent();
-                }
-            } else {
-                entry = nodeState.getNodeEntry();
+    public void persisted() {
+        NodeEntry entry;
+        if (nodeState == null || removeExisting) {
+            // invalidate the complete tree
+            // -> start searching root-entry from any version-entry or
+            //    from the given nodestate
+            entry = (nodeState == null) ? versionStates[0].getNodeEntry() : nodeState.getNodeEntry();
+            while (entry.getParent() != null) {
+                entry = entry.getParent();
             }
-            entry.invalidate(true);
+        } else {
+            entry = nodeState.getNodeEntry();
         }
+        entry.invalidate(true);
     }
     //----------------------------------------< Access Operation Parameters >---
 

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/SetMixin.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/SetMixin.java?view=diff&rev=523334&r1=523333&r2=523334
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/SetMixin.java (original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/SetMixin.java Wed Mar 28 07:05:32 2007
@@ -20,7 +20,6 @@
 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.config.CacheBehaviour;
 import org.apache.jackrabbit.spi.NodeId;
 
 import javax.jcr.RepositoryException;
@@ -70,10 +69,9 @@
     /**
      * Throws UnsupportedOperationException
      *
-     * @see Operation#persisted(CacheBehaviour)
-     * @param cacheBehaviour
+     * @see Operation#persisted()
      */
-    public void persisted(CacheBehaviour cacheBehaviour) {
+    public void persisted() {
         throw new UnsupportedOperationException("persisted() not implemented for transient modification.");
     }
 

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/SetPropertyValue.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/SetPropertyValue.java?view=diff&rev=523334&r1=523333&r2=523334
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/SetPropertyValue.java (original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/SetPropertyValue.java Wed Mar 28 07:05:32 2007
@@ -17,7 +17,6 @@
 package org.apache.jackrabbit.jcr2spi.operation;
 
 import org.apache.jackrabbit.jcr2spi.state.PropertyState;
-import org.apache.jackrabbit.jcr2spi.config.CacheBehaviour;
 import org.apache.jackrabbit.spi.QValue;
 import org.apache.jackrabbit.spi.PropertyId;
 
@@ -65,10 +64,9 @@
     /**
      * Throws UnsupportedOperationException
      *
-     * @see Operation#persisted(CacheBehaviour)
-     * @param cacheBehaviour
+     * @see Operation#persisted()
      */
-    public void persisted(CacheBehaviour cacheBehaviour) {
+    public void persisted() {
         throw new UnsupportedOperationException("persisted() not implemented for transient modification.");
     }
 

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Update.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Update.java?view=diff&rev=523334&r1=523333&r2=523334
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Update.java (original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Update.java Wed Mar 28 07:05:32 2007
@@ -17,7 +17,6 @@
 package org.apache.jackrabbit.jcr2spi.operation;
 
 import org.apache.jackrabbit.jcr2spi.state.NodeState;
-import org.apache.jackrabbit.jcr2spi.config.CacheBehaviour;
 import org.apache.jackrabbit.spi.NodeId;
 
 import javax.jcr.RepositoryException;
@@ -55,13 +54,10 @@
      * Invalidates the <code>NodeState</code> that has been updated and all
      * its decendants.
      * 
-     * @see Operation#persisted(CacheBehaviour)
-     * @param cacheBehaviour
+     * @see Operation#persisted()
      */
-    public void persisted(CacheBehaviour cacheBehaviour) {
-        if (cacheBehaviour == CacheBehaviour.INVALIDATE) {
-            nodeState.getHierarchyEntry().invalidate(true);
-        }
+    public void persisted() {
+        nodeState.getHierarchyEntry().invalidate(true);
     }
 
     //----------------------------------------< Access Operation Parameters >---

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/WorkspaceImport.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/WorkspaceImport.java?view=diff&rev=523334&r1=523333&r2=523334
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/WorkspaceImport.java (original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/WorkspaceImport.java Wed Mar 28 07:05:32 2007
@@ -1,7 +1,6 @@
 package org.apache.jackrabbit.jcr2spi.operation;
 
 import org.apache.jackrabbit.jcr2spi.state.NodeState;
-import org.apache.jackrabbit.jcr2spi.config.CacheBehaviour;
 import org.apache.jackrabbit.jcr2spi.hierarchy.NodeEntry;
 import org.apache.jackrabbit.spi.NodeId;
 
@@ -47,25 +46,22 @@
      * Invalidates the <code>NodeState</code> that has been updated and all
      * its decendants.
      *
-     * @see Operation#persisted(CacheBehaviour)
-     * @param cacheBehaviour
+     * @see Operation#persisted()
      */
-    public void persisted(CacheBehaviour cacheBehaviour) {
-        if (cacheBehaviour == CacheBehaviour.INVALIDATE) {
-            NodeEntry entry;
-            if (uuidBehaviour == ImportUUIDBehavior.IMPORT_UUID_COLLISION_REMOVE_EXISTING ||
+    public void persisted() {
+        NodeEntry entry;
+        if (uuidBehaviour == ImportUUIDBehavior.IMPORT_UUID_COLLISION_REMOVE_EXISTING ||
                 uuidBehaviour == ImportUUIDBehavior.IMPORT_UUID_COLLISION_REPLACE_EXISTING) {
-                // invalidate the complete tree
-                entry = nodeState.getNodeEntry();
-                while (entry.getParent() != null) {
-                    entry = entry.getParent();
-                }
-                entry.invalidate(true);
-            } else {
-                // import only added new items below the import target. therefore
-                // recursive invalidation is not required. // TODO correct?
-                nodeState.getNodeEntry().invalidate(false);
+            // invalidate the complete tree
+            entry = nodeState.getNodeEntry();
+            while (entry.getParent() != null) {
+                entry = entry.getParent();
             }
+            entry.invalidate(true);
+        } else {
+            // import only added new items below the import target. therefore
+            // recursive invalidation is not required. // TODO correct?
+            nodeState.getNodeEntry().invalidate(false);
         }
     }
 



Mime
View raw message