Package com.mks.api

Examples of com.mks.api.Command


        serverInfo = server;
    }

    @Override
    public void execute() {
        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));
        command.addOption(new Option("hostname", serverInfo.host));
        command.addOption(new Option("port", serverInfo.port));

        try {
            Response response = executeCommand(command);

View Full Code Here


    }

    @Override
    public void execute() {
        try {
            Command command = new Command(Command.SI);
            command.setCommandName("viewnonmembers");
            command.addOption(new Option("cwd", sandboxPath.substring(0, sandboxPath.lastIndexOf('\\'))));
            command.addOption(new Option("recurse"));
            command.addOption(new Option( "noincludeFormers" ));

            final Response response = executeCommand(command);

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

        super(errors, mksCLIConfiguration, sandboxPjPath);
    }

    @Override
    protected Command createCommand() {
        Command command = super.createCommand();
        command.addOption(new Option("filter","changed:missing"));
        return command;
    }
View Full Code Here

    @Override
    public void actionPerformed(final AnActionEvent anActionEvent) {
        try {
            final CmdRunner runner =  MKSAPIHelper.getInstance().getSession().createCmdRunner();
            Command command = new Command(Command.SI);
            command.setCommandName("viewprefs");
            command.addOption(new Option("gui"));
            runner.execute(command);
        } catch (APIException e) {
            final Project project = PlatformDataKeys.PROJECT.getData(anActionEvent.getDataContext());
            ArrayList<VcsException> errors = new ArrayList<VcsException>();
            //noinspection ThrowableInstanceNeverThrown
View Full Code Here

        {
            logger.info( "Using a common session.  Connection information is obtained from client preferences" );
            session = ip.getCommonSession();
        }
        // Test the connection to the MKS Integrity Server
        Command ping = new Command( Command.SI, "connect" );
        CmdRunner cmdRunner = session.createCmdRunner();
        // Initialize the command runner with valid connection information
        if ( null != host && host.length() > 0 )
        {
            cmdRunner.setDefaultHostname( host );
View Full Code Here

     * @throws APIException
     */
    private boolean isValidSandbox( String sandbox )
        throws APIException
    {
        Command cmd = new Command( Command.SI, "sandboxinfo" );
        cmd.addOption( new Option( "sandbox", sandbox ) );

        api.getLogger().debug( "Validating existing sandbox: " + sandbox );
        Response res = api.runCommand( cmd );
        WorkItemIterator wit = res.getWorkItems();
        try
View Full Code Here

    private Response add( File memberFile, String message )
        throws APIException
    {
        // Setup the add command
        api.getLogger().info( "Adding member: " + memberFile.getAbsolutePath() );
        Command siAdd = new Command( Command.SI, "add" );
        siAdd.addOption( new Option( "onExistingArchive", "sharearchive" ) );
        siAdd.addOption( new Option( "cpid", cpid ) );
        if ( null != message && message.length() > 0 )
        {
            siAdd.addOption( new Option( "description", message ) );
        }
        siAdd.addOption( new Option( "cwd", memberFile.getParentFile().getAbsolutePath() ) );
        siAdd.addSelection( memberFile.getName() );
        return api.runCommand( siAdd );
    }
View Full Code Here

    private Response checkin( File memberFile, String relativeName, String message )
        throws APIException
    {
        // Setup the check-in command
        api.getLogger().info( "Checking in member:  " + memberFile.getAbsolutePath() );
        Command sici = new Command( Command.SI, "ci" );
        sici.addOption( new Option( "cpid", cpid ) );
        if ( null != message && message.length() > 0 )
        {
            sici.addOption( new Option( "description", message ) );
        }
        sici.addOption( new Option( "cwd", memberFile.getParentFile().getAbsolutePath() ) );
        sici.addSelection( relativeName );
        return api.runCommand( sici );
    }
View Full Code Here

    private Response dropMember( File memberFile, String relativeName )
        throws APIException
    {
        // Setup the drop command
        api.getLogger().info( "Dropping member " + memberFile.getAbsolutePath() );
        Command siDrop = new Command( Command.SI, "drop" );
        siDrop.addOption( new Option( "cwd", memberFile.getParentFile().getAbsolutePath() ) );
        siDrop.addOption( new Option( "noconfirm" ) );
        siDrop.addOption( new Option( "cpid", cpid ) );
        siDrop.addOption( new Option( "delete" ) );
        siDrop.addSelection( relativeName );
        return api.runCommand( siDrop );
    }
View Full Code Here

     * @return MKS API Response object
     */
    private boolean hasMemberChanged( File memberFile, String relativeName )
    {
        // Setup the differences command
        Command siDiff = new Command( Command.SI, "diff" );
        siDiff.addOption( new Option( "cwd", memberFile.getParentFile().getAbsolutePath() ) );
        siDiff.addSelection( relativeName );
        try
        {
            // Run the diff command...
            Response res = api.runCommand( siDiff );
            try
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.