Add mkfolders
authorMathieu Baudier <mbaudier@argeo.org>
Wed, 9 May 2012 09:36:41 +0000 (09:36 +0000)
committerMathieu Baudier <mbaudier@argeo.org>
Wed, 9 May 2012 09:36:41 +0000 (09:36 +0000)
git-svn-id: https://svn.argeo.org/commons/trunk@5295 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc

server/runtime/org.argeo.server.jcr/src/main/java/org/argeo/jcr/JcrUtils.java

index 39bdf34ba3ad61e87978ab4f183e2d9a95c5d849..a1ddb3fcacb8bf47fd9bdc160056843a34d354ab 100644 (file)
@@ -340,6 +340,14 @@ public class JcrUtils implements ArgeoJcrConstants {
                return mkdirsSafe(session, path, null);
        }
 
+       /**
+        * Creates the nodes making the path as {@link NodeType#NT_FOLDER}
+        */
+       public static Node mkfolders(Session session, String path) {
+               return mkdirs(session, path, NodeType.NT_FOLDER, NodeType.NT_FOLDER,
+                               false);
+       }
+
        /**
         * Creates the nodes making path, if they don't exist. This is up to the
         * caller to save the session. Use with caution since it can create