jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danisevsky <danisev...@gmail.com>
Subject newbie question - JCRUtils
Date Mon, 26 Apr 2010 19:38:17 GMT
Hello, is there better way to create some folders (path) ?

My code:

    public static final String TMP_PATH = "my:root/tmp/incoming";
    public static final String GALLERY_PATH = "my:root/data/gallery/";


    public static initWorkspace() {
            ...
            JcrNode root = getCurrentSession(workspaceId).getRootNode();
            root.addNode("my:root").addNode("data").addNode("gallery");
            root.addNode("my:root/tmp").addNode("incomming");
            getCurrentSession(workspaceId).save();
            ...
    }

Is there some Utils class which can do something like this:

JCRUtils.createNodes(TMP_PATH);
JCRUtils.createNodes(GALLERY_PATH);

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message