Package javax.jcr

Examples of javax.jcr.Workspace.clone()


        Workspace workspace = b1.getSession().getWorkspace();

        try {
            // clone to same parent
            workspace.clone(workspace.getName(), b1.getPath(),
                    a.getPath() + "/b2", false);
            fail("Cloning inside same parent should fail.");
        } catch (UnsupportedRepositoryOperationException e) {
            // expected
        }
View Full Code Here


        b1.save();

        // clone
        Session session = b1.getSession();
        Workspace workspace = b1.getSession().getWorkspace();
        workspace.clone(workspace.getName(), b1.getPath(),
                a2.getPath() + "/b2", false);

        // add child node c to b1
        Node c = b1.addNode("c");
        b1.save();
View Full Code Here

        b1.save();

        // clone
        Session session = b1.getSession();
        Workspace workspace = b1.getSession().getWorkspace();
        workspace.clone(workspace.getName(), b1.getPath(),
                a2.getPath() + "/b2", false);

        // add child node c to b1
        Node c = b1.addNode("c");
        b1.save();
View Full Code Here

        ensureMixinType(b1, mixShareable);
        b1.save();

        // clone
        Workspace workspace = b1.getSession().getWorkspace();
        workspace.clone(workspace.getName(), b1.getPath(),
                a2.getPath() + "/b2", false);

        // add child node c to b1
        Node c = b1.addNode("c");
        b1.save();
View Full Code Here

        ensureMixinType(b1, mixShareable);
        b1.save();

        // clone
        Workspace workspace = b1.getSession().getWorkspace();
        workspace.clone(workspace.getName(), b1.getPath(),
                a2.getPath() + "/b2", false);

        // add child node c to b1
        Node c = b1.addNode("c");
        b1.save();
View Full Code Here

        Workspace workspace = b.getSession().getWorkspace();

        // clone to all other nodes
        for (int i = 1; i < parents.length; i++) {
            workspace.clone(workspace.getName(), b.getPath(),
                    parents[i].getPath() + "/b", false);
        }

        // remove all parents and save
        for (int i = 0; i < parents.length; i++) {
View Full Code Here

       //now we have a shareable node N with path a1/b1

       Session session = testRootNode.getSession();
       Workspace workspace = session.getWorkspace();
       String path = a2.getPath() + "/b2";
       workspace.clone(workspace.getName(), b1.getPath(), path, false);

       //now we have another shareable node N' in the same shared set as N with path a1/a2/b2

       //using the path a1/a2/b2, we should get the node N' here
       Item item = session.getItem(path);
View Full Code Here

        ensureMixinType(b1, mixShareable);
        b1.save();

        // clone
        Workspace workspace = b1.getSession().getWorkspace();
        workspace.clone(workspace.getName(), b1.getPath(),
                a2.getPath() + "/b", false);

        Node[] shared = getSharedSet(b1);
        assertEquals(2, shared.length);
        b1 = shared[0];
View Full Code Here

        ensureMixinType(b1, mixShareable);
        b1.save();

        // clone
        Workspace workspace = b1.getSession().getWorkspace();
        workspace.clone(workspace.getName(), b1.getPath(),
                a2.getPath() + "/b2", false);

        Node[] shared = getSharedSet(b1);
        assertEquals(2, shared.length);
        b1 = shared[0];
View Full Code Here

        ensureMixinType(b1, mixShareable);
        b1.save();

        // clone
        Workspace workspace = b1.getSession().getWorkspace();
        workspace.clone(workspace.getName(), b1.getPath(),
                a2.getPath() + "/b2", false);

        Node[] shared = getSharedSet(b1);
        assertEquals(2, shared.length);
        b1 = shared[0];
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.