X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=org.argeo.node.api%2Fsrc%2Forg%2Fargeo%2Fnode%2FNodeUtils.java;h=8edea1a73579989b095929475223321886bbb641;hb=f06ad11d9b3c77604dbf439a7047a71b47abf06f;hp=b9281043d0efbe2e0f079ebc7be01fe4e994b1ba;hpb=0243aa5633af84d8608ba912483dbaaaefac42f1;p=lgpl%2Fargeo-commons.git diff --git a/org.argeo.node.api/src/org/argeo/node/NodeUtils.java b/org.argeo.node.api/src/org/argeo/node/NodeUtils.java index b9281043d..8edea1a73 100644 --- a/org.argeo.node.api/src/org/argeo/node/NodeUtils.java +++ b/org.argeo.node.api/src/org/argeo/node/NodeUtils.java @@ -111,7 +111,7 @@ public class NodeUtils { * a session with a different user ID than the one searched, * typically when a system or admin session is used. * @param cn - * the username of the user + * the name of the group */ public static Node getGroupHome(Session session, String cn) { try { @@ -159,6 +159,13 @@ public class NodeUtils { return getUserHome(session, userID); } + public static String getDataPath(String cn, Node node) throws RepositoryException { + assert node != null; + StringBuilder buf = new StringBuilder(NodeConstants.PATH_DATA); + return buf.append('/').append(cn).append('/').append(node.getSession().getWorkspace().getName()) + .append(node.getPath()).toString(); + } + // public static Node getUserProfile(Session session, String username) { // try { // QueryObjectModelFactory qomf = session.getWorkspace()