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 VersionInfo info = geogig.command(VersionOp.class).call();

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


     */
    @Override
    public void run(CommandContext context) {
        if (list) {
            final Context geogig = this.getCommandLocator(context);
            final List<RevTag> tags = geogig.command(TagListOp.class).call();

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

     */
    @Override
    public void run(CommandContext context) {
        if (list) {
            final Context geogig = this.getCommandLocator(context);
            final List<Ref> localBranches = geogig.command(BranchListOp.class).call();
            final List<Ref> remoteBranches;
            if (remotes) {
                remoteBranches = geogig.command(BranchListOp.class).setLocal(false)
                        .setRemotes(remotes).call();
            } else {
View Full Code Here

        if (list) {
            final Context geogig = this.getCommandLocator(context);
            final List<Ref> localBranches = geogig.command(BranchListOp.class).call();
            final List<Ref> remoteBranches;
            if (remotes) {
                remoteBranches = geogig.command(BranchListOp.class).setLocal(false)
                        .setRemotes(remotes).call();
            } else {
                remoteBranches = Lists.newLinkedList();
            }
            context.setResponseContent(new CommandResponse() {
View Full Code Here

            throw new CommandSpecException("No old ref spec");
        }

        final Context geogig = this.getCommandLocator(context);

        final Iterator<DiffEntry> diff = geogig.command(DiffOp.class).setOldVersion(oldRefSpec)
                .setNewVersion(newRefSpec).setFilter(pathFilter).call();

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

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

        FetchOp command = geogig.command(FetchOp.class);

        command.addRemote(remote);

        try {
            final TransferSummary result = command.setAll(fetchAll).setPrune(prune).call();
View Full Code Here

        final Context geogig = this.getCommandLocator(context);
        Optional<Ref> ref;

        try {
            ref = geogig.command(RefParse.class).setName(refSpec).call();
        } catch (Exception e) {
            context.setResponseContent(CommandResponse.error("Aborting UpdateRef: "
                    + e.getMessage()));
            return;
        }
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.