]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - runtime/org.argeo.slc.support.jcr/src/main/java/org/argeo/slc/jcr/SlcJcrUtils.java
Refactor JCR utils and home usage
[gpl/argeo-slc.git] / runtime / org.argeo.slc.support.jcr / src / main / java / org / argeo / slc / jcr / SlcJcrUtils.java
index 57d8ce55c65563dbb8f22057fce32a2138235ff3..df69c93f7752d5c4672b411ff98d9b6b3f448223 100644 (file)
@@ -22,6 +22,7 @@ import javax.jcr.Node;
 import javax.jcr.NodeIterator;
 import javax.jcr.RepositoryException;
 
+import org.argeo.jcr.ArgeoJcrUtils;
 import org.argeo.jcr.JcrUtils;
 import org.argeo.slc.SlcException;
 import org.argeo.slc.core.execution.PrimitiveAccessor;
@@ -81,10 +82,10 @@ public class SlcJcrUtils implements SlcNames {
        }
 
        /** Create a new execution result path based on the current time */
-       public static String createResultPath(String uuid) {
+       public static String createResultPath(String username, String uuid) {
                Calendar now = new GregorianCalendar();
-               return SlcJcrConstants.RESULTS_BASE_PATH + '/'
-                               + JcrUtils.dateAsPath(now, true) + uuid;
+               return ArgeoJcrUtils.getUserHomePath(username) + '/' + SlcNames.SLC_RESULTS
+                               + '/' + JcrUtils.dateAsPath(now, true) + uuid;
        }
 
        /**