Package com.mks.api

Examples of com.mks.api.Command


        System.out.println(cmd.getRevisionsInfo());

    }
    public void testRunner() throws APIException {
        final CmdRunner runner = apiHelper.getSession().createCmdRunner();
        Command command = new Command(Command.SI);
        command.setCommandName("viewhistory");
        command.addSelection(viewMemberHistoryMember);
        runner.execute(command);
        try {
            Response response = runner.execute(command);
            final SubRoutineIterator routineIterator = response.getSubRoutines();
            while (routineIterator.hasNext()) {
View Full Code Here


        final CmdRunner runner = apiHelper.getSession().createCmdRunner();
//        Response response = apiHelper.getSICommands().getSandboxInfo(sandbox.substring(0, sandbox.lastIndexOf('\\')));
/*
        final CmdRunner runner = session.createCmdRunner();
*/
        Command command = new Command(Command.SI);
        command.setCommandName("viewsandbox");
        command.addOption(new Option("sandbox", sandbox));
        MultiValue mv = new MultiValue( "," );
        mv.add( "name" );
        mv.add( "context" );
        mv.add( "wfdelta" );
        mv.add( "memberrev" );
        mv.add( "workingrev" );
        mv.add( "revsyncdelta" );
        mv.add( "memberarchive" );
        mv.add( "cpid" );
        mv.add("workingcpid");
        command.addOption(new Option("fields", mv));
        command.addOption(new Option("recurse"));
        System.err.println(command.toString());
        final Response response;
        final Set<String> types = new HashSet<String>();
        final Set<String> modeltypes = new HashSet<String>();
        try {
            response = runner.execute(command);
View Full Code Here

        final CmdRunner runner = apiHelper.getSession().createCmdRunner();
//        Response response = apiHelper.getSICommands().getSandboxInfo(sandbox.substring(0, sandbox.lastIndexOf('\\')));
/*
        final CmdRunner runner = session.createCmdRunner();
*/
        Command command = new Command(Command.SI);
        command.setCommandName("viewnonmembers");
        command.addOption(new Option("cwd", sandbox.substring(0, sandbox.lastIndexOf('\\'))));
        command.addOption(new Option("recurse"));
        command.addOption(new Option( "noincludeFormers" ));
/*
        command.addOption(
                new Option("fields", "locker,workingrev,workingcpid,deferred,type,name,memberrev,locksandbox"));
*/
        System.err.println(command.toString());
        final Response response;
        final Set<String> types = new HashSet<String>();
        final Set<String> modeltypes = new HashSet<String>();
        try {
            response = runner.execute(command);
View Full Code Here

        System.out.println(command.changePackages);
    }

    public void testRunner() throws APIException {
        final CmdRunner runner = apiHelper.getSession().createCmdRunner();
        Command command = new Command(Command.SI);
        command.setCommandName("viewcps");
        MultiValue mv = new MultiValue(",");
        mv.add("id");
        mv.add("user");
        mv.add("state");
        mv.add("summary");
        command.addOption(new Option("fields", mv));
        runner.execute(command);
        final Response response;
        response = runner.execute(command);
        final SubRoutineIterator routineIterator = response.getSubRoutines();
        while (routineIterator.hasNext()) {
View Full Code Here

public class GuiCommandsTest extends AbstractAPITest {

    public void testCheckout() throws APIException {
        final CmdRunner runner = apiHelper.getSession().createCmdRunner();
        Command command = new Command(Command.SI);
        command.setCommandName("co");
        command.addSelection("C:\\Users\\A6253567\\sandboxes\\GIVR\\mapper\\idv-ha-services\\src\\main\\resources\\idv-ha-services\\gct\\deliverPRC-outbound.xml");
        command.addSelection("C:\\Users\\A6253567\\sandboxes\\GIVR\\mapper\\idv-ha-services\\src\\test\\resources\\commons-logging.properties");
        command.addOption(new Option("gui"));

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

    }

    public void testAddMember() throws APIException {
        String[] members = new String[] {"C:\\Users\\A6253567\\sandboxes\\GIVR\\mapper\\idv-ha-services\\src\\test\\resources\\response.xml", "C:\\Users\\A6253567\\sandboxes\\GIVR\\mapper\\idv-ha-services\\src\\test\\resources\\fmn\\response.xml"};
        final CmdRunner runner =  apiHelper.getSession().createCmdRunner();
        Command command = new Command(Command.SI);
        command.setCommandName("add");
        command.addOption(new Option("gui"));
        command.addOption(new Option("cwd", "C:\\Users\\A6253567\\sandboxes\\GIVR\\mapper\\idv-ha-services"));
        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("add");
        command.addOption(new Option("gui"));
        command.addOption(new Option("cwd", sandbox.getSandboxDir().getCanonicalPath()));
        for (int i = 0; i < members.length; i++) {
            String member = members[i];
            command.addSelection(member);
        }

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

public class MemberHistoryAPICommand extends AbstractSingleTargetAPICommand {
    @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("viewhistory");
        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("revert");
        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("resync");
        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

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.