Package org.apache.jackrabbit.oak.spi.state

Examples of org.apache.jackrabbit.oak.spi.state.NodeBuilder.child()


    }

    @Test
    public void testChangeNode() {
        NodeBuilder builder = base.builder();
        builder.child("NA1").setProperty("p", "p");
        new AssertingNodeStateDiff(base, builder.getNodeState()).expect("^NA1+p");
    }

    @Test
    public void testAddInaccessibleChild() {
View Full Code Here


    }

    @Test
    public void testAddInaccessibleChild() {
        NodeBuilder builder = base.builder();
        builder.child("NA3").child("x3").child("NA3a").child("y3").child("NA3a");
        new AssertingNodeStateDiff(base, builder.getNodeState()).expect("");
    }

    @Test
    public void testChangeInaccessibleChild() {
View Full Code Here

        NodeBuilder builder = store.getRoot().builder();
        NodeBuilder test = builder.child("test");
        test.setProperty("a", 1);
        test.setProperty("b", 2);
        test.setProperty("c", 3);
        test.child("x");
        test.child("y");
        test.child("z");
        root = store.merge(builder, EmptyHook.INSTANCE, PostCommitHook.EMPTY);
    }
View Full Code Here

        NodeBuilder test = builder.child("test");
        test.setProperty("a", 1);
        test.setProperty("b", 2);
        test.setProperty("c", 3);
        test.child("x");
        test.child("y");
        test.child("z");
        root = store.merge(builder, EmptyHook.INSTANCE, PostCommitHook.EMPTY);
    }

    @After
View Full Code Here

        test.setProperty("a", 1);
        test.setProperty("b", 2);
        test.setProperty("c", 3);
        test.child("x");
        test.child("y");
        test.child("z");
        root = store.merge(builder, EmptyHook.INSTANCE, PostCommitHook.EMPTY);
    }

    @After
    public void tearDown() throws Exception {
View Full Code Here

    }

    @Test
    public void testChangeInaccessibleChild() {
        NodeBuilder builder = base.builder();
        builder.child("NA3").child("x3").child("NA3a").child("y3").remove();
        new AssertingNodeStateDiff(base, builder.getNodeState()).expect("^NA3^x3^NA3a-y3");
    }

    @Test
    public void testRemoveInaccessibleChild() {
View Full Code Here

    }

    @Test
    public void testRemoveInaccessibleChild() {
        NodeBuilder builder = base.builder();
        builder.child("NA3").child("x3").child("NA3a").remove();
        new AssertingNodeStateDiff(base, builder.getNodeState()).expect("");
    }

    private static class SecureNodeStateDiff extends SecurableNodeStateDiff {
        protected SecureNodeStateDiff(SecurableNodeStateDiff parent, Tree beforeParent, Tree afterParent, String name) {
View Full Code Here

        store.merge(rootBuilder, new CommitHook() {
            @Override
            public NodeState processCommit(NodeState before, NodeState after) {
                NodeBuilder rootBuilder = after.builder();
                NodeBuilder testBuilder = rootBuilder.child("test");
                testBuilder.child("fromHook");
                return rootBuilder.getNodeState();
            }
        }, PostCommitHook.EMPTY);

        NodeState test = store.getRoot().getChildNode("test");
View Full Code Here

    @Test
    public void manyChildNodes() throws CommitFailedException {
        NodeBuilder root = store.getRoot().builder();
        NodeBuilder parent = root.child("parent");
        for (int i = 0; i <= KernelNodeState.MAX_CHILD_NODE_NAMES; i++) {
            parent.child("child-" + i);
        }
        store.merge(root, EmptyHook.INSTANCE, PostCommitHook.EMPTY);

        NodeState base = store.getRoot();
        root = base.builder();
View Full Code Here

        store.merge(root, EmptyHook.INSTANCE, PostCommitHook.EMPTY);

        NodeState base = store.getRoot();
        root = base.builder();
        parent = root.child("parent");
        parent.child("child-new");
        store.merge(root, EmptyHook.INSTANCE, PostCommitHook.EMPTY);

        Diff diff = new Diff();
        store.getRoot().compareAgainstBaseState(base, diff);
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.