Package org.locationtech.geogig.api.porcelain

Examples of org.locationtech.geogig.api.porcelain.VersionInfo


        GeoGIG geogig = cli.getGeogig();
        if (geogig == null) {
            geogig = new GeoGIG();
        }
        this.console = cli.getConsole();
        VersionInfo info = geogig.command(VersionOp.class).call();

        try {
            printVersionProperty("Project Version", info.getProjectVersion());
            printVersionProperty("Build Time", info.getBuildTime());
            printVersionProperty("Build User Name", info.getBuildUserName());
            printVersionProperty("Build User Email", info.getBuildUserEmail());
            printVersionProperty("Git Branch", info.getBranch());
            printVersionProperty("Git Commit ID", info.getCommitId());
            printVersionProperty("Git Commit Time", info.getCommitTime());
            printVersionProperty("Git Commit Author Name", info.getCommitUserName());
            printVersionProperty("Git Commit Author Email", info.getCommitUserEmail());
            printVersionProperty("Git Commit Message", info.getCommitMessageFull());
        } catch (IOException e) {
            Throwables.propagate(e);
        }
    }
View Full Code Here


     */
    @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();
                out.writeElement("ProjectVersion", info.getProjectVersion());
                out.writeElement("BuildTime", info.getBuildTime());
                out.writeElement("BuildUserName", info.getBuildUserName());
                out.writeElement("BuildUserEmail", info.getBuildUserEmail());
                out.writeElement("GitBranch", info.getBranch());
                out.writeElement("GitCommitID", info.getCommitId());
                out.writeElement("GitCommitTime", info.getCommitTime());
                out.writeElement("GitCommitAuthorName", info.getCommitUserName());
                out.writeElement("GitCommitAuthorEmail", info.getCommitUserEmail());
                out.writeElement("GitCommitMessage", info.getCommitMessageFull());
                out.finish();
            }
        });
    }
View Full Code Here

TOP

Related Classes of org.locationtech.geogig.api.porcelain.VersionInfo

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.