Examples of execute()


Examples of org.apache.jackrabbit.mongomk.impl.action.FetchNodesActionNew.execute()

        MongoCommit toCommit = new FetchCommitAction(
                nodeStore, toRevision).execute();
        FetchNodesActionNew action = new FetchNodesActionNew(
                nodeStore, path, 0, fromRevision);
        action.setBranchId(fromCommit.getBranchId());
        NodeImpl fromNode = MongoNode.toNode(action.execute().get(path));
        action = new FetchNodesActionNew(
                nodeStore, path, 0, toRevision);
        action.setBranchId(toCommit.getBranchId());
        NodeImpl toNode = MongoNode.toNode(action.execute().get(path));
View Full Code Here

Examples of org.apache.jackrabbit.mongomk.impl.command.CommandExecutorImpl.execute()

            Runnable runnable = new Runnable() {

                @Override
                public void run() {
                    try {
                        String revisionId = commandExecutor.execute(command);
                        revisionIds.add(revisionId);
                    } catch (Exception e) {
                        revisionIds.add(null);
                    }
                }
View Full Code Here

Examples of org.apache.jackrabbit.mongomk.impl.command.CommitCommand.execute()

    }

    private Long addNode(String nodeName) throws Exception {
        Commit commit = CommitBuilder.build("/", "+\"" + nodeName + "\" : {}", "Add /" + nodeName);
        CommitCommand command = new CommitCommand(getNodeStore(), commit);
        return command.execute();
    }

    @Test
    public void fetchWithCertainPathsOneRevision() throws Exception {
        SimpleNodeScenario scenario = new SimpleNodeScenario(getNodeStore());
View Full Code Here

Examples of org.apache.jackrabbit.mongomk.impl.command.NodeExistsCommand.execute()

        NodeExistsCommand existCommand = new NodeExistsCommand(nodeStore,
                path, baseRevisionId);
        existCommand.setBranchId(branchId);
        boolean exists = false;
        try {
            exists = existCommand.execute();
        } catch (Exception ignore) {}

        if (!exists) {
            throw new NotFoundException(path + " @rev" + baseRevisionId);
        }
View Full Code Here

Examples of org.apache.jackrabbit.mongomk.query.FetchNodeByPathQuery.execute()

        NodeMongo node = pathNodeMap.get(path);
        if (node == null) {
            FetchNodeByPathQuery query = new FetchNodeByPathQuery(mongoConnection,
                    path, headRevisionId);
            query.setFetchAll(true);
            node = query.execute();
            if (node != null) {
                node.removeField("_id");
                pathNodeMap.put(path, node);
            }
        }
View Full Code Here

Examples of org.apache.jackrabbit.mongomk.query.FetchNodesByPathAndDepthQuery.execute()

        u = new BasicDBObject("$set", new BasicDBObject(CommitMongo.KEY_BASE_REVISION_ID, 0L));
        commitCollection.update(q, u);

        FetchNodesByPathAndDepthQuery query = new FetchNodesByPathAndDepthQuery(mongoConnection, "/", thirdRevisionId,
                -1);
        List<NodeMongo> result = query.execute();
        List<Node> actuals = NodeMongo.toNode(result);
        Node expected = NodeBuilder
                .build(String
                        .format("{ \"/#%0$s\" : { \"a#%3$s\" : { \"int\" : 1 , \"double\" : 0.123 , \"b#%3$s\" : { \"string\" : \"foo\" , \"e#%3$s\" : { \"array\" : [ 123, null, 123.456, \"for:bar\", true ] } } , \"d#%3$s\" : { \"null\" : null } } } }",
                                firstRevisionId, secondRevisionId,
View Full Code Here

Examples of org.apache.jackrabbit.mongomk.query.FetchValidCommitsQuery.execute()

    @Test
    public void simple() throws Exception {
        FetchValidCommitsQuery query = new FetchValidCommitsQuery(mongoConnection,
                String.valueOf(Integer.MAX_VALUE) /*maxRevisionId*/);
        List<CommitMongo> commits = query.execute();
        assertEquals(MIN_COMMITS, commits.size());

        SimpleNodeScenario scenario = new SimpleNodeScenario(mongoConnection);
        scenario.create();
        commits = query.execute();
View Full Code Here

Examples of org.apache.jackrabbit.spi.commons.query.jsr283.qom.QueryObjectModel.execute()

    public void testInnerJoin1() throws RepositoryException {
        JoinCondition c = qomFactory.equiJoinCondition(
                LEFT, propertyName1, RIGHT, propertyName2);
        QueryObjectModel qom = createQuery(JOIN_TYPE_INNER, c);
        checkResult(qom.execute(), new Node[][]{{n1, n2}, {n2, n2}});
    }

    public void testInnerJoin2() throws RepositoryException {
        JoinCondition c = qomFactory.equiJoinCondition(
                LEFT, propertyName2, RIGHT, propertyName1);
View Full Code Here

Examples of org.apache.jackrabbit.vault.packaging.InstallHookProcessor.execute()

            throws RepositoryException, PackageException {
        log.info("Extracting {}", getId());
        InstallHookProcessor hooks = ctx.getHooks();
        Importer importer = ctx.getImporter();
        try {
            if (!hooks.execute(ctx)) {
                throw new PackageException("Import aborted during prepare phase.");
            }
            try {
                importer.run(archive, ctx.getImportRoot());
            } catch (Exception e) {
View Full Code Here

Examples of org.apache.jackrabbit.vault.vlt.VltContext.execute()

        VltContext vCtx = app.createVaultContext(localDir);
        vCtx.setVerbose(cl.hasOption(OPT_VERBOSE));
        vCtx.setQuiet(cl.hasOption(OPT_QUIET));
        Update u = new Update(localDir, localFiles, cl.hasOption(optNonRecursive));
        u.setForce(cl.hasOption(optForce));
        vCtx.execute(u);
    }

    /**
     * {@inheritDoc}
     */
 
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.