]> git.argeo.org Git - lgpl/argeo-commons.git/blobdiff - org.argeo.node.api/src/org/argeo/node/NodeUtils.java
Merge branch 'master' of https://code.argeo.org/git/apache2/argeo-commons
[lgpl/argeo-commons.git] / org.argeo.node.api / src / org / argeo / node / NodeUtils.java
index b9281043d0efbe2e0f079ebc7be01fe4e994b1ba..8edea1a73579989b095929475223321886bbb641 100644 (file)
@@ -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()