jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1160800 - /jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java
Date Tue, 23 Aug 2011 16:57:28 GMT
Author: mduerig
Date: Tue Aug 23 16:57:28 2011
New Revision: 1160800

URL: http://svn.apache.org/viewvc?rev=1160800&view=rev
Log:
Microkernel based Jackrabbit prototype (WIP)
- uuid handling

Modified:
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java?rev=1160800&r1=1160799&r2=1160800&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java
Tue Aug 23 16:57:28 2011
@@ -60,6 +60,7 @@ import org.slf4j.LoggerFactory;
 
 import javax.jcr.Credentials;
 import javax.jcr.GuestCredentials;
+import javax.jcr.ItemNotFoundException;
 import javax.jcr.NamespaceException;
 import javax.jcr.NoSuchWorkspaceException;
 import javax.jcr.PathNotFoundException;
@@ -325,6 +326,10 @@ public class RepositoryServiceImpl exten
     public Iterator<? extends ItemInfo> getItemInfos(SessionInfo sessionInfo, ItemId
itemId) throws RepositoryException {
         try {
             Path itemPath = getPath(itemId);
+            if (!itemPath.isAbsolute()) {
+                throw new ItemNotFoundException(itemId.toString());
+            }
+
             Path nodePath = itemId.denotesNode() ? itemPath : itemPath.getAncestor(1);
             String rev = microKernel.getHeadRevision();
             String mkPath = Paths.pathToString(sessionInfo.getWorkspaceName(), nodePath);
@@ -363,8 +368,8 @@ public class RepositoryServiceImpl exten
     }
 
     @Override
-    public Iterator<PropertyId> getReferences(SessionInfo sessionInfo, NodeId nodeId,
Name propertyName, boolean weakReferences)
-            throws RepositoryException {
+    public Iterator<PropertyId> getReferences(SessionInfo sessionInfo, NodeId nodeId,
Name propertyName,
+        boolean weakReferences) throws RepositoryException {
 
         // todo implement getReferences
         throw new UnsupportedRepositoryOperationException();



Mime
View raw message