Package org.apache.jackrabbit.mongomk.impl.command

Examples of org.apache.jackrabbit.mongomk.impl.command.CommitCommandNew


        init();
    }

    @Override
    public String commit(Commit commit) throws Exception {
        Command<Long> command = new CommitCommandNew(this, commit);
        Long revisionId = commandExecutor.execute(command);
        return MongoUtil.fromMongoRepresentation(revisionId);
    }
View Full Code Here


     */
    public Long create() throws Exception {
        Commit commit = CommitBuilder.build("/",
                "+\"a\" : { \"int\" : 1 , \"b\" : { \"string\" : \"foo\" } , \"c\" : { \"bool\" : true } }",
                "This is the simple node scenario with nodes /, /a, /a/b, /a/c");
        return new CommitCommandNew(nodeStore, commit).execute();
    }
View Full Code Here

    public Long addChildrenToA(int count) throws Exception {
        Long revisionId = null;
        for (int i = 1; i <= count; i++) {
            Commit commit = CommitBuilder.build("/a", "+\"child" + i + "\" : {}", "Add child" + i);
            revisionId = new CommitCommandNew(nodeStore, commit).execute();
        }
        return revisionId;
    }
View Full Code Here

        return revisionId;
    }

    public Long delete_A() throws Exception {
        Commit commit = CommitBuilder.build("/", "-\"a\"", "This is a commit with deleted /a");
        return new CommitCommandNew(nodeStore, commit).execute();
    }
View Full Code Here

        return new CommitCommandNew(nodeStore, commit).execute();
    }

    public Long delete_B() throws Exception {
        Commit commit = CommitBuilder.build("/a", "-\"b\"", "This is a commit with deleted /a/b");
        return new CommitCommandNew(nodeStore, commit).execute();
    }
View Full Code Here

        diff.append("^\"a/double\" : 0.123");
        diff.append("^\"a/d/int\" :  2");
        diff.append("^\"a/b/e/array\" : [ 123, null, 123.456, \"for:bar\", true ]");
        Commit commit = CommitBuilder.build("/", diff.toString(),
                "This is a commit with updated /a and added /a/d and /a/b/e");
        return new CommitCommandNew(nodeStore, commit).execute();
    }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.mongomk.impl.command.CommitCommandNew

Copyright © 2018 www.massapicom. 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.