import javax.jcr.Node;
import javax.jcr.NodeIterator;
import javax.jcr.RepositoryException;
+import javax.jcr.Session;
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;
+ 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 JcrUtils.getUserHomePath(username) + '/' + SlcNames.SLC_RESULTS
- + '/' + JcrUtils.dateAsPath(now, true) + uuid;
+ return UserJcrUtils.getUserHome(session).getPath() + '/'
+ + SlcNames.SLC_RESULTS + '/' + JcrUtils.dateAsPath(now, true)
+ + uuid;
}
/**