Package org.apache.jackrabbit.oak.api

Examples of org.apache.jackrabbit.oak.api.Root.copy()


    public void copyToSelf() throws CommitFailedException {
        Root root = session.getLatestRoot();
        root.getTree("/").addChild("s");
        root.commit();

        assertFalse(root.copy("/s", "/s"));
    }

    @Test
    public void copyToDescendant() throws CommitFailedException {
        Root root = session.getLatestRoot();
View Full Code Here


    public void copyToDescendant() throws CommitFailedException {
        Root root = session.getLatestRoot();
        root.getTree("/").addChild("s");
        root.commit();

        assertTrue(root.copy("/s", "/s/t"));
    }

    /**
     * Regression test for OAK-208
     */
 
View Full Code Here

        Tree y = tree.getChild("y");
        Tree x = tree.getChild("x");
        assertTrue(x.exists());

        assertTrue(tree.hasChild("x"));
        root.copy("/x", "/y/xx");
        assertTrue(tree.hasChild("x"));
        assertTrue(y.hasChild("xx"));
       
        root.commit();
View Full Code Here

        Tree tree = root.getTree("/");

        Tree y = tree.getChild("y");

        root.getTree("/x").addChild("x1");
        root.copy("/x", "/y/xx");
        assertTrue(y.hasChild("xx"));
        assertTrue(y.getChild("xx").hasChild("x1"));

        root.commit();
View Full Code Here

        root2.commit();

        root1.copy("/x", "/y/x-copied");
        root1.rebase();

        root2.copy("/x", "/y/x-copied");
        checkEqual(root1.getTree("/"), (root2.getTree("/")));
    }

    @Test
    public void oak962() throws CommitFailedException {
View Full Code Here

    public void copyToSelf() throws CommitFailedException {
        Root root = session.getLatestRoot();
        root.getTree("/").addChild("s");
        root.commit();

        assertFalse(root.copy("/s", "/s"));
    }

    @Test
    public void copyToDescendant() throws CommitFailedException {
        Root root = session.getLatestRoot();
View Full Code Here

    public void copyToDescendant() throws CommitFailedException {
        Root root = session.getLatestRoot();
        root.getTree("/").addChild("s");
        root.commit();

        assertTrue(root.copy("/s", "/s/t"));
    }

    /**
     * Regression test for OAK-208
     */
 
View Full Code Here

        Tree y = tree.getChild("y");
        Tree x = tree.getChild("x");
        assertTrue(x.exists());

        assertTrue(tree.hasChild("x"));
        root.copy("/x", "/y/xx");
        assertTrue(tree.hasChild("x"));
        assertTrue(y.hasChild("xx"));
       
        root.commit();
View Full Code Here

        Tree tree = root.getTree("/");

        Tree y = tree.getChild("y");

        root.getTree("/x").addChild("x1");
        root.copy("/x", "/y/xx");
        assertTrue(y.hasChild("xx"));
        assertTrue(y.getChild("xx").hasChild("x1"));

        root.commit();
View Full Code Here

        root2.commit();

        root1.copy("/x", "/y/x-copied");
        root1.rebase();

        root2.copy("/x", "/y/x-copied");
        checkEqual(root1.getTree("/"), (root2.getTree("/")));
    }

    @Test
    public void oak962() throws CommitFailedException {
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.