Improve workgroups and JCR file system.
[lgpl/argeo-commons.git] / org.argeo.jcr / src / org / argeo / jcr / fs / JcrFileSystemProvider.java
index dcc59476ff646b59a97a54567958c325f19bbb84..1e2864d248a8b9d998a34f874a773710f7a63ca0 100644 (file)
@@ -197,6 +197,9 @@ public abstract class JcrFileSystemProvider extends FileSystemProvider {
                try {
                        // TODO check if assignable
                        Node node = toNode(path);
+                       if(node==null) {
+                               throw new JcrFsException("JCR node not found for "+path);
+                       }
                        return (A) new JcrBasicfileAttributes(node);
                } catch (RepositoryException e) {
                        throw new JcrFsException("Cannot read basic attributes of " + path, e);
@@ -264,4 +267,13 @@ public abstract class JcrFileSystemProvider extends FileSystemProvider {
                return ((JcrPath) path).getNode();
        }
 
+       /**
+        * To be overriden in order to support the ~ path, with an implementation
+        * specific concept of user home.
+        * 
+        * @return null by default
+        */
+       public Node getUserHome(Session session) {
+               return null;
+       }
 }