import javax.jcr.Node;
import javax.jcr.RepositoryException;
import javax.jcr.Session;
+import javax.jcr.nodetype.NodeType;
import org.argeo.jcr.JcrUtils;
private final Session session;
private String userHomePath = null;
- public JcrFileSystem(JcrFileSystemProvider provider, Session session) {
+ public JcrFileSystem(JcrFileSystemProvider provider, Session session) throws IOException {
super();
this.provider = provider;
this.session = session;
try {
userHomePath = userHome.getPath();
} catch (RepositoryException e) {
- throw new JcrFsException("Cannot retrieve user home path", e);
+ throw new IOException("Cannot retrieve user home path", e);
}
}
+ /** Whetehr this node should be skippe din directory listings */
+ public boolean skipNode(Node node) throws RepositoryException {
+ if (node.isNodeType(NodeType.NT_HIERARCHY_NODE) || node.isNodeType("node:userHome")
+ || node.isNodeType("node:groupHome"))
+ return false;
+ return true;
+ }
+
public String getUserHomePath() {
return userHomePath;
}