jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1539443 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/state/MoveDetector.java
Date Wed, 06 Nov 2013 19:56:56 GMT
Author: mduerig
Date: Wed Nov  6 19:56:55 2013
New Revision: 1539443

URL: http://svn.apache.org/r1539443
Log:
OAK-144 Implement observation
MoveDetector should call leave and enter methods of wrapped validator

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/state/MoveDetector.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/state/MoveDetector.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/state/MoveDetector.java?rev=1539443&r1=1539442&r2=1539443&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/state/MoveDetector.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/state/MoveDetector.java
Wed Nov  6 19:56:55 2013
@@ -24,7 +24,6 @@ import static org.apache.jackrabbit.oak.
 
 import org.apache.jackrabbit.oak.api.CommitFailedException;
 import org.apache.jackrabbit.oak.api.PropertyState;
-import org.apache.jackrabbit.oak.spi.commit.DefaultValidator;
 import org.apache.jackrabbit.oak.spi.commit.Validator;
 
 /**
@@ -50,7 +49,7 @@ import org.apache.jackrabbit.oak.spi.com
  *     <li>Moving a node back and forth to its original location is not reported at
all.</li>
  * </ul>
  */
-public class MoveDetector extends DefaultValidator {
+public class MoveDetector implements Validator {
     public static final String SOURCE_PATH = ":source-path";
 
     private final MoveValidator moveValidator;
@@ -66,6 +65,16 @@ public class MoveDetector extends Defaul
     }
 
     @Override
+    public void enter(NodeState before, NodeState after) throws CommitFailedException {
+        moveValidator.enter(before, after);
+    }
+
+    @Override
+    public void leave(NodeState before, NodeState after) throws CommitFailedException {
+        moveValidator.enter(before, after);
+    }
+
+    @Override
     public void propertyAdded(PropertyState after) throws CommitFailedException {
         moveValidator.propertyAdded(after);
     }



Mime
View raw message