Package org.locationtech.geogig.api

Examples of org.locationtech.geogig.api.Context.command()


     */
    @Override
    public void run(CommandContext context) {
        final Context geogig = this.getCommandLocator(context);

        final ImmutableList<ObjectId> updatedObjects = geogig.command(RebuildGraphOp.class).call();

        context.setResponseContent(new CommandResponse() {
            @Override
            public void write(ResponseWriter out) throws Exception {
                out.start();
View Full Code Here


                }
            });
        } catch (MergeConflictsException m) {
            final RevCommit ours = context.getGeoGIG().getRepository().getCommit(m.getOurs());
            final RevCommit theirs = context.getGeoGIG().getRepository().getCommit(m.getTheirs());
            final Optional<ObjectId> ancestor = transaction.command(FindCommonAncestor.class)
                    .setLeft(ours).setRight(theirs).call();
            context.setResponseContent(new CommandResponse() {
                final MergeScenarioReport report = transaction.command(ReportMergeScenarioOp.class)
                        .setMergeIntoCommit(ours).setToMergeCommit(theirs).call();
View Full Code Here

            final RevCommit ours = context.getGeoGIG().getRepository().getCommit(m.getOurs());
            final RevCommit theirs = context.getGeoGIG().getRepository().getCommit(m.getTheirs());
            final Optional<ObjectId> ancestor = transaction.command(FindCommonAncestor.class)
                    .setLeft(ours).setRight(theirs).call();
            context.setResponseContent(new CommandResponse() {
                final MergeScenarioReport report = transaction.command(ReportMergeScenarioOp.class)
                        .setMergeIntoCommit(ours).setToMergeCommit(theirs).call();

                @Override
                public void write(ResponseWriter out) throws Exception {
                    out.start();
View Full Code Here

    @Override
    public void run(CommandContext context) {
        final Context geogig = this.getCommandLocator(context);

        final String pathFilter = null;
        final Optional<Ref> currHead = geogig.command(RefParse.class).setName(Ref.HEAD).call();

        context.setResponseContent(new CommandResponse() {
            @Override
            public void write(ResponseWriter writer) throws Exception {
                writer.start();
View Full Code Here

                        final SymRef headRef = (SymRef) currHead.get();
                        writer.writeHeaderElements("branch", Ref.localName(headRef.getTarget()));
                    }
                }

                writer.writeStaged(geogig.command(DiffIndex.class).addFilter(pathFilter), offset,
                        limit);
                writer.writeUnstaged(geogig.command(DiffWorkTree.class).setFilter(pathFilter),
                        offset, limit);
                writer.writeUnmerged(geogig.command(ConflictsReadOp.class).call(), offset, limit);
View Full Code Here

                    }
                }

                writer.writeStaged(geogig.command(DiffIndex.class).addFilter(pathFilter), offset,
                        limit);
                writer.writeUnstaged(geogig.command(DiffWorkTree.class).setFilter(pathFilter),
                        offset, limit);
                writer.writeUnmerged(geogig.command(ConflictsReadOp.class).call(), offset, limit);

                writer.finish();
            }
View Full Code Here

                writer.writeStaged(geogig.command(DiffIndex.class).addFilter(pathFilter), offset,
                        limit);
                writer.writeUnstaged(geogig.command(DiffWorkTree.class).setFilter(pathFilter),
                        offset, limit);
                writer.writeUnmerged(geogig.command(ConflictsReadOp.class).call(), offset, limit);

                writer.finish();
            }
        });
View Full Code Here

     */
    @Override
    public void run(final CommandContext context) {
        final Context geogig = this.getCommandLocator(context);

        LogOp op = geogig.command(LogOp.class).setFirstParentOnly(firstParentOnly);

        if (skip != null) {
            op.setSkip(skip.intValue());
        }
        if (limit != null) {
View Full Code Here

        if (this.sinceTime != null || this.untilTime != null) {
            Date since = new Date(0);
            Date until = new Date();
            if (this.sinceTime != null) {
                since = new Date(geogig.command(ParseTimestamp.class).setString(this.sinceTime)
                        .call());
            }
            if (this.untilTime != null) {
                until = new Date(geogig.command(ParseTimestamp.class).setString(this.untilTime)
                        .call());
View Full Code Here

            if (this.sinceTime != null) {
                since = new Date(geogig.command(ParseTimestamp.class).setString(this.sinceTime)
                        .call());
            }
            if (this.untilTime != null) {
                until = new Date(geogig.command(ParseTimestamp.class).setString(this.untilTime)
                        .call());
            }
            op.setTimeRange(new Range<Date>(Date.class, since, until));
        }
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.