]> git.argeo.org Git - lgpl/argeo-commons.git/blobdiff - server/runtime/org.argeo.server.jcr/src/main/java/org/argeo/jcr/security/SecurityJcrUtils.java
Refactor JCR utils and home usage
[lgpl/argeo-commons.git] / server / runtime / org.argeo.server.jcr / src / main / java / org / argeo / jcr / security / SecurityJcrUtils.java
index abf4347db4bc930ab24e2c53853415471d5b3c4c..1ba42197e049ae4ea955f64f2847df913ca74e36 100644 (file)
@@ -7,10 +7,10 @@ import javax.jcr.version.VersionManager;
 
 import org.argeo.ArgeoException;
 import org.argeo.jcr.ArgeoJcrConstants;
-import org.argeo.jcr.ArgeoJcrUtils;
 import org.argeo.jcr.ArgeoNames;
 import org.argeo.jcr.ArgeoTypes;
 import org.argeo.jcr.JcrUtils;
+import org.argeo.jcr.UserJcrUtils;
 
 /** Utilities related to Argeo security model in JCR */
 public class SecurityJcrUtils implements ArgeoJcrConstants {
@@ -39,7 +39,7 @@ public class SecurityJcrUtils implements ArgeoJcrConstants {
        }
 
        private static String generateUserHomePath(String username) {
-               String homeBasePath = DEFAULT_HOME_BASE_PATH;
+               String homeBasePath = UserJcrUtils.DEFAULT_HOME_BASE_PATH;
                return homeBasePath + '/' + JcrUtils.firstCharsToPath(username, 2)
                                + '/' + username;
        }
@@ -105,7 +105,7 @@ public class SecurityJcrUtils implements ArgeoJcrConstants {
         */
        public static Node getUserProfile(Session session, String username) {
                try {
-                       Node userHome = ArgeoJcrUtils.getUserHome(session, username);
+                       Node userHome = UserJcrUtils.getUserHome(session, username);
                        if (userHome == null)
                                return null;
                        if (userHome.hasNode(ArgeoNames.ARGEO_PROFILE))