Package org.sonatype.gshell.command

Examples of org.sonatype.gshell.command.IO


{
    @Override
    protected Object execute(final CommandContext context, final NexusClient client) throws Exception {
        assert context != null;
        assert client != null;
        IO io = context.getIo();

        io.println("Requesting restart..."); // TODO: i18n

        client.ext(AdminClient.class).restart();

        StatusResource status = client.ext(BasicClient.class).status();
        io.println("State: {}", status.getState()); // TODO: i18n
       
        return Result.SUCCESS;
    }
View Full Code Here


{
    @Override
    protected Object execute(final CommandContext context, final NexusClient client) throws Exception {
        assert context != null;
        assert client != null;
        IO io = context.getIo();

        io.println("Requesting stop..."); // TODO: i18n

        client.ext(AdminClient.class).stop();

        StatusResource status = client.ext(BasicClient.class).status();
        io.println("State: {}", status.getState()); // TODO: i18n

        return Result.SUCCESS;
    }
View Full Code Here

{
    @Override
    protected Object execute(final CommandContext context, final NexusClient client) throws Exception {
        assert context != null;
        assert client != null;
        IO io = context.getIo();

        io.println("Requesting kill..."); // TODO: i18n

        client.ext(AdminClient.class).kill();

        io.println("Killed"); // TODO: i18n

        return Result.SUCCESS;
    }
View Full Code Here

{
    @Override
    protected Object execute(final CommandContext context, final NexusClient client) throws Exception {
        assert context != null;
        assert client != null;
        IO io = context.getIo();

        io.println("Requesting start..."); // TODO: i18n
       
        client.ext(AdminClient.class).start();

        StatusResource status = client.ext(BasicClient.class).status();
        io.println("State: {}", status.getState()); // TODO: i18n

        return Result.SUCCESS;
    }
View Full Code Here

   
    @Override
    protected Object execute(final CommandContext context, final NexusClient client) throws Exception {
        assert context != null;
        assert client != null;
        IO io = context.getIo();

        client.ext(StagingClient.class).drop(profileId, repositoryId);

        return Result.SUCCESS;
    }
View Full Code Here

    @Override
    protected Object execute(final CommandContext context, final NexusClient client) throws Exception {
        assert context != null;
        assert client != null;
        IO io = context.getIo();

        client.ext(StagingClient.class).close(profileId, repositoryId, description);

        return Result.SUCCESS;
    }
View Full Code Here

{
    @Override
    protected Object execute(final CommandContext context, final NexusClient client) throws Exception {
        assert context != null;
        assert client != null;
        IO io = context.getIo();

        List<StagingProfile> profiles = client.ext(StagingClient.class).listProfiles();

        for (StagingProfile profile : profiles) {
            io.println("Id: {}", profile.getId());
            io.println("  Name: {}", profile.getName());
            io.println("  URI: {}", profile.getResourceURI());
        }

        return profiles;
    }
View Full Code Here

    @Override
    protected Object execute(final CommandContext context, final NexusClient client) throws Exception {
        assert context != null;
        assert client != null;
        IO io = context.getIo();

        client.ext(StagingClient.class).promote(profileId, repositoryId, targetRepositoryId);

        return Result.SUCCESS;
    }
View Full Code Here

    @Override
    protected Object execute(final CommandContext context, final NexusClient client) throws Exception {
        assert context != null;
        assert client != null;
        IO io = context.getIo();

        List<StagingProfileRepository> repos = client.ext(StagingClient.class).listRepositories(profileId);

        for (StagingProfileRepository repo : repos) {
            io.println("ID: {}", repo.getRepositoryId());
            io.println("  Profile ID: {}", repo.getProfileId());
            io.println("  Description: {}", repo.getDescription());
            io.println("  Type: {}", repo.getType());
            io.println("  User ID: {}", repo.getUserId());
        }

        return repos;
    }
View Full Code Here

        this.plexus = plexus;
    }

    public Object execute(final CommandContext context) throws Exception {
        assert context != null;
        IO io = context.getIo();

        new FileAssert(repository).exists().isDirectory();

        RepositoryCrawler crawler = plexus.lookup(RepositoryCrawler.class);
View Full Code Here

TOP

Related Classes of org.sonatype.gshell.command.IO

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.