Package org.apache.jackrabbit.mongomk.command

Examples of org.apache.jackrabbit.mongomk.command.CommitCommandMongo.execute()


        Commit commit = new CommitImpl("/",
                "+a : { \"int\" : 1 , \"b\" : { \"string\" : \"foo\" } , \"c\" : { \"bool\" : true } } }",
                "This is the simple node scenario with nodes /, /a, /a/b, /a/c", instructions);
        CommitCommandMongo command = new CommitCommandMongo(mongoConnection, commit);
        String revisionId = command.execute();

        return revisionId;
    }

    public String addChildrenToA(int count) throws Exception {
View Full Code Here


        for (int i = 1; i <= count; i++) {
            List<Instruction> instructions = new LinkedList<Instruction>();
            instructions.add(new AddNodeInstructionImpl("/a", "child" + i));
            Commit commit = new CommitImpl("/a", "TODO", "Add child" + i, instructions);
            CommitCommandMongo command = new CommitCommandMongo(mongoConnection, commit);
            revisionId = command.execute();
        }
        return revisionId;
    }

    /**
 
View Full Code Here

        instructions.add(new RemoveNodeInstructionImpl("/", "a"));

        Commit commit = new CommitImpl("/", "-a", "This is a commit with deleted /a",
                instructions);
        CommitCommandMongo command = new CommitCommandMongo(mongoConnection, commit);
        String revisionId = command.execute();

        return revisionId;
    }

    public String delete_B() throws Exception {
View Full Code Here

        List<Instruction> instructions = new LinkedList<Instruction>();
        instructions.add(new RemoveNodeInstructionImpl("/a", "b"));
        Commit commit = new CommitImpl("/a", "-b", "This is a commit with deleted /a/b",
                instructions);
        CommitCommandMongo command = new CommitCommandMongo(mongoConnection, commit);
        return command.execute();
    }

    /**
     * Updates the following nodes:
     *
 
View Full Code Here

                "for:bar", Boolean.TRUE }));

        Commit commit = new CommitImpl("", "TODO", "This is a commit with updated /a and added /a/d and /a/b/e",
                instructions);
        CommitCommandMongo command = new CommitCommandMongo(mongoConnection, commit);
        String revisionId = command.execute();

        return revisionId;
    }
}
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.