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

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


        assertEquals("child-moved", diff.added.get(0));

        base = store.getRoot();
        root = base.builder();
        parent = root.child("parent");
        parent.child("child-moved").setProperty("foo", "value");
        parent.child("child-moved").setProperty(
                new MultiStringPropertyState("bar", Arrays.asList("value")));
        store.merge(root, EmptyHook.INSTANCE, PostCommitHook.EMPTY);

        diff = new Diff();
View Full Code Here


        base = store.getRoot();
        root = base.builder();
        parent = root.child("parent");
        parent.child("child-moved").setProperty("foo", "value");
        parent.child("child-moved").setProperty(
                new MultiStringPropertyState("bar", Arrays.asList("value")));
        store.merge(root, EmptyHook.INSTANCE, PostCommitHook.EMPTY);

        diff = new Diff();
        store.getRoot().compareAgainstBaseState(base, diff);
View Full Code Here

    private void compareAgainstBaseState(int childNodeCount) throws CommitFailedException {
        NodeState before = store.getRoot();
        NodeBuilder builder = before.builder();
        for (int k = 0; k < childNodeCount; k++) {
            builder.child("c" + k);
        }

        builder.child("foo").child(":bar").child("quz").setProperty("p", "v");
        store.merge(builder, EmptyHook.INSTANCE, PostCommitHook.EMPTY);
View Full Code Here

        NodeBuilder builder = before.builder();
        for (int k = 0; k < childNodeCount; k++) {
            builder.child("c" + k);
        }

        builder.child("foo").child(":bar").child("quz").setProperty("p", "v");
        store.merge(builder, EmptyHook.INSTANCE, PostCommitHook.EMPTY);

        NodeState after = store.getRoot();
        Diff diff = new Diff();
        after.compareAgainstBaseState(before, diff);
View Full Code Here

    public void testNodeChanges() {
        JsopDiff diff;
        NodeState before = EMPTY_NODE;
        NodeBuilder builder = before.builder();
        builder.setProperty("a", 1L);
        builder.child("x");
        NodeState after = builder.getNodeState();

        diff = new JsopDiff(null);
        diff.childNodeAdded("test", before);
        assertEquals("+\"/test\":{}", diff.toString());
View Full Code Here

    public void setUp() throws Exception {
        wrapper = new MicroKernelWrapper(new MicroKernelImpl());
        store = new KernelNodeStore(wrapper);

        NodeBuilder builder = store.getRoot().builder();
        builder.child("a");
        NodeBuilder b = builder.child("b");
        b.child("c");
        b.child("d");
        b.child("e");
        store.merge(builder, EmptyHook.INSTANCE, PostCommitHook.EMPTY);
View Full Code Here

        store = new KernelNodeStore(wrapper);

        NodeBuilder builder = store.getRoot().builder();
        builder.child("a");
        NodeBuilder b = builder.child("b");
        b.child("c");
        b.child("d");
        b.child("e");
        store.merge(builder, EmptyHook.INSTANCE, PostCommitHook.EMPTY);
    }
View Full Code Here

        NodeBuilder builder = store.getRoot().builder();
        builder.child("a");
        NodeBuilder b = builder.child("b");
        b.child("c");
        b.child("d");
        b.child("e");
        store.merge(builder, EmptyHook.INSTANCE, PostCommitHook.EMPTY);
    }

    /**
 
View Full Code Here

        NodeBuilder builder = store.getRoot().builder();
        builder.child("a");
        NodeBuilder b = builder.child("b");
        b.child("c");
        b.child("d");
        b.child("e");
        store.merge(builder, EmptyHook.INSTANCE, PostCommitHook.EMPTY);
    }

    /**
     * Provide both :hash and :id
View Full Code Here

        return wrapper.numGetNodes - uncachedReads;
    }

    private void modifyContent() throws Exception {
        NodeBuilder builder = store.getRoot().builder();
        builder.child("a").setProperty("foo", "bar");
        store.merge(builder, EmptyHook.INSTANCE, PostCommitHook.EMPTY);
    }

    private void readTree(NodeState root) {
        for (ChildNodeEntry cne : root.getChildNodeEntries()) {
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.