jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1224978 - /jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/ChangeTree.java
Date Tue, 27 Dec 2011 19:06:31 GMT
Author: mduerig
Date: Tue Dec 27 19:06:30 2011
New Revision: 1224978

URL: http://svn.apache.org/viewvc?rev=1224978&view=rev
Log:
Microkernel based prototype of JCR implementation (WIP)
- clean up

Modified:
    jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/ChangeTree.java

Modified: jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/ChangeTree.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/ChangeTree.java?rev=1224978&r1=1224977&r2=1224978&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/ChangeTree.java
(original)
+++ jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/ChangeTree.java
Tue Dec 27 19:06:30 2011
@@ -8,6 +8,7 @@ import org.apache.jackrabbit.utils.Funct
 
 import javax.jcr.ItemExistsException;
 import javax.jcr.ItemNotFoundException;
+import javax.jcr.PathNotFoundException;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
@@ -75,10 +76,10 @@ public class ChangeTree {
         return getNodeOrNull(path) != null;
     }
 
-    public NodeDelta getNode(Path path) throws ItemNotFoundException {
+    public NodeDelta getNode(Path path) throws PathNotFoundException {
         NodeDelta delta = getNodeOrNull(path);
         if (delta == null) {
-            throw new ItemNotFoundException(path.getPath());
+            throw new PathNotFoundException(path.getPath());
         }
 
         return delta;
@@ -249,7 +250,9 @@ public class ChangeTree {
             return delta.remove();
         }
 
-        public void moveNode(String name, Path destination) throws ItemNotFoundException,
ItemExistsException {
+        public void moveNode(String name, Path destination) throws ItemNotFoundException,
ItemExistsException,
+                PathNotFoundException {
+
             NodeDelta source = getNode(name);
             if (source == null) {
                 throw new ItemNotFoundException(name);
@@ -261,7 +264,7 @@ public class ChangeTree {
 
             Path destParentPath = destination.getParent();
             if (!nodeExists(destParentPath)) {
-                throw new ItemNotFoundException(destParentPath.getPath());
+                throw new PathNotFoundException(destParentPath.getPath());
             }
 
             if (source.isTransient()) {
@@ -488,7 +491,9 @@ public class ChangeTree {
         }
 
         @Override
-        public void moveNode(String name, Path destination) throws ItemNotFoundException,
ItemExistsException {
+        public void moveNode(String name, Path destination) throws ItemNotFoundException,
ItemExistsException,
+                PathNotFoundException {
+
             source.moveNode(name, destination);
         }
 



Mime
View raw message