Package com.mks.api

Examples of com.mks.api.Command


  }

    @Override
    protected void perform(@NotNull MksSandboxInfo sandbox, String[] members) throws APIException {
        final CmdRunner runner =  MKSAPIHelper.getInstance().getSession().createCmdRunner();
        Command command = new Command(Command.SI);
        command.setCommandName("ci");
        command.addOption(new Option("gui"));
        for (int i = 0; i < members.length; i++) {
            String member = members[i];
            command.addSelection(member);
        }

        runner.execute(command);
    }
View Full Code Here


  private final Logger LOGGER = Logger.getInstance(getClass().getName());

    @Override
    protected void perform(@NotNull MksSandboxInfo sandbox, String[] members) throws APIException {
        final CmdRunner runner =  MKSAPIHelper.getInstance().getSession().createCmdRunner();
        Command command = new Command(Command.SI);
        command.setCommandName("viewsandbox");
        command.addOption(new Option("gui"));
        command.addOption(new Option("sandbox", sandbox.sandboxPath));

        runner.execute(command);
    }
View Full Code Here

  }

    @Override
    protected void perform(@NotNull MksSandboxInfo sandbox, String[] members) throws APIException {
        final CmdRunner runner =  MKSAPIHelper.getInstance().getSession().createCmdRunner();
        Command command = new Command(Command.SI);
        command.setCommandName("diff");
        command.addOption(new Option("gui"));
        for (int i = 0; i < members.length; i++) {
            String member = members[i];
            command.addSelection(member);
        }

        runner.execute(command);
    }
View Full Code Here

  }

    @Override
    protected void perform(@NotNull MksSandboxInfo sandbox, String[] members) throws APIException {
        final CmdRunner runner =  MKSAPIHelper.getInstance().getSession().createCmdRunner();
        Command command = new Command(Command.SI);
        command.setCommandName("memberinfo");
        command.addOption(new Option("gui"));
        for (int i = 0; i < members.length; i++) {
            String member = members[i];
            command.addSelection(member);
        }

        runner.execute(command);
    }
View Full Code Here

  }

    @Override
    protected void perform(@NotNull MksSandboxInfo sandbox, String[] members) throws APIException {
        final CmdRunner runner =  MKSAPIHelper.getInstance().getSession().createCmdRunner();
        Command command = new Command(Command.SI);
        command.setCommandName("co");
        command.addOption(new Option("gui"));
        for (int i = 0; i < members.length; i++) {
            String member = members[i];
            command.addSelection(member);
        }

        runner.execute(command);
    }
View Full Code Here

  }

    @Override
    protected void perform(@NotNull MksSandboxInfo sandbox, String[] members) throws APIException {
        final CmdRunner runner =  MKSAPIHelper.getInstance().getSession().createCmdRunner();
        Command command = new Command(Command.SI);
        command.setCommandName("drop");
        command.addOption(new Option("gui"));
        for (int i = 0; i < members.length; i++) {
            String member = members[i];
            command.addSelection(member);
        }

        runner.execute(command);
  }
View Full Code Here

    public void executeCommand(@NotNull final MksVcs mksVcs, @NotNull List<VcsException> exceptions,
                               @NotNull VirtualFile[] affectedFiles) throws VcsException {
        try {
            final CmdRunner runner = MKSAPIHelper.getInstance().getSession().createCmdRunner();
            Command command = new Command(Command.SI);
            command.setCommandName("about");
            command.addOption(new Option("gui"));
            runner.execute(command);
        } catch (APIException e) {
            ArrayList<VcsException> errors = new ArrayList<VcsException>();
            //noinspection ThrowableInstanceNeverThrown
            errors.add(new VcsException(e));
View Full Code Here

    }

    @Override
    public void execute() {
        try {
            Command command = createCommand();
            final Response response = executeCommand(command);

            final SubRoutineIterator routineIterator = response.getSubRoutines();
            while (routineIterator.hasNext()) {
                final SubRoutine subRoutine = routineIterator.next();
View Full Code Here

        }

    }

    protected Command createCommand() {
        Command command = new Command(Command.SI);
        command.setCommandName("viewsandbox");
        command.addOption(new Option("sandbox", sandboxPath));
        MultiValue mv = new MultiValue( "," );
        mv.add( "name" );
        mv.add( "context" );
        mv.add( "wfdelta" );
        mv.add( "memberarchive" );
        mv.add( "memberrev" );
        mv.add( "workingrev" );
        mv.add( "locker" );
        mv.add( "workingcpid" );
        mv.add( "revsyncdelta" );
        command.addOption(new Option("fields", mv));
        command.addOption(new Option("recurse"));
        return command;
    }
View Full Code Here

    @Override
    public void execute() {
        ArrayList<MksServerInfo> tempServers = new ArrayList<MksServerInfo>();
        try {

            Command command = new Command(Command.SI);
            command.setCommandName("servers");

            Response response = executeCommand(command);

            final WorkItemIterator workItems = response.getWorkItems();
            while (workItems.hasNext()) {
View Full Code Here

TOP

Related Classes of com.mks.api.Command

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.