X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=runtime%2Forg.argeo.slc.support.jcr%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fslc%2Fjcr%2FSlcJcrUtils.java;h=52931218bcbe1c15142c9ec4744b16c6b55c9304;hb=d50c0fe50cd69947bc7146991afa0826a8c8f53b;hp=df69c93f7752d5c4672b411ff98d9b6b3f448223;hpb=2541d68abde22de8b5e1001d6291a1afb2bbcc09;p=gpl%2Fargeo-slc.git diff --git a/runtime/org.argeo.slc.support.jcr/src/main/java/org/argeo/slc/jcr/SlcJcrUtils.java b/runtime/org.argeo.slc.support.jcr/src/main/java/org/argeo/slc/jcr/SlcJcrUtils.java index df69c93f7..52931218b 100644 --- a/runtime/org.argeo.slc.support.jcr/src/main/java/org/argeo/slc/jcr/SlcJcrUtils.java +++ b/runtime/org.argeo.slc.support.jcr/src/main/java/org/argeo/slc/jcr/SlcJcrUtils.java @@ -21,9 +21,10 @@ import java.util.GregorianCalendar; import javax.jcr.Node; import javax.jcr.NodeIterator; import javax.jcr.RepositoryException; +import javax.jcr.Session; -import org.argeo.jcr.ArgeoJcrUtils; import org.argeo.jcr.JcrUtils; +import org.argeo.jcr.UserJcrUtils; import org.argeo.slc.SlcException; import org.argeo.slc.core.execution.PrimitiveAccessor; import org.argeo.slc.core.execution.PrimitiveUtils; @@ -81,11 +82,16 @@ public class SlcJcrUtils implements SlcNames { + JcrUtils.dateAsPath(now, true) + uuid; } - /** Create a new execution result path based on the current time */ - public static String createResultPath(String username, String uuid) { + /** + * Create a new execution result path in the user home based on the current + * time + */ + public static String createResultPath(Session session, String uuid) + throws RepositoryException { Calendar now = new GregorianCalendar(); - return ArgeoJcrUtils.getUserHomePath(username) + '/' + SlcNames.SLC_RESULTS - + '/' + JcrUtils.dateAsPath(now, true) + uuid; + return UserJcrUtils.getUserHome(session).getPath() + '/' + + SlcNames.SLC_RESULTS + '/' + JcrUtils.dateAsPath(now, true) + + uuid; } /**