Package com.mks.api.response

Examples of com.mks.api.response.WorkItemIterator


            if ( siSandbox.create() )
            {
                // Resynchronize the new or previously created sandbox
                Response res = siSandbox.resync();
                // Lets output what we got from running this command
                WorkItemIterator wit = res.getWorkItems();
                while ( wit.hasNext() )
                {
                    WorkItem wi = wit.next();
                    if ( wi.getModelType().equals( SIModelTypeName.MEMBER ) )
                    {
                        Result message = wi.getResult();
                        getLogger().debug( wi.getDisplayId() + " " + ( null != message ? message.getMessage() : "" ) );
                    }
View Full Code Here


            // Make sure we've got a valid sandbox, otherwise create it...
            if ( siSandbox.create() )
            {
                Response res = siSandbox.resync();
                // Lets capture what we got from running this resync
                WorkItemIterator wit = res.getWorkItems();
                while ( wit.hasNext() )
                {
                    WorkItem wi = wit.next();
                    if ( wi.getModelType().equals( SIModelTypeName.MEMBER ) )
                    {
                        Result message = wi.getResult();
                        getLogger().debug( wi.getDisplayId() + " " + ( null != message ? message.getMessage() : "" ) );
                        if ( null != message && message.getMessage().length() > 0 )
View Full Code Here

        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
        {
            WorkItem wi = wit.next();
            return wi.getField( "fullConfigSyntax" ).getValueAsString().equalsIgnoreCase(
                siProject.getConfigurationPath() );
        }
        catch ( APIException aex )
        {
View Full Code Here

      {
        // Just print out the stack trace
        ie.printStackTrace();
        exitCode = -1;
      }
      WorkItemIterator wit = response.getWorkItems();
      // In the event there is a problem with one of the command's elements
      // we have to dig deeper into the exception...
      try
      {
        while(wit.hasNext()){ wit.next(); }
        // If we got here then just extract the message
        if(ex.getMessage() != null)
        {
          message = ex.getMessage();
        }       
View Full Code Here

        siViewProjectCmd.addOption( new Option( "fields", mvFields ) );
        api.getLogger().info( "Preparing to execute si viewproject for " + fullConfigSyntax );
        Response viewRes = api.runCommand( siViewProjectCmd );

        // Iterate through the list of members returned by the API
        WorkItemIterator wit = viewRes.getWorkItems();
        while ( wit.hasNext() )
        {
            WorkItem wi = wit.next();
            if ( wi.getModelType().equals( SIModelTypeName.SI_SUBPROJECT ) )
            {
                // Save the configuration path for the current subproject, using the canonical path name
                pjConfigHash.put( wi.getField( "name" ).getValueAsString(), wi.getId() );
            }
View Full Code Here

        siViewProjectCmd.addOption( new Option( "fields", mvFields ) );
        api.getLogger().info( "Preparing to execute si viewproject for " + fullConfigSyntax );
        Response viewRes = api.runCommand( siViewProjectCmd );

        // Iterate through the list of members returned by the API
        WorkItemIterator wit = viewRes.getWorkItems();
        while ( wit.hasNext() )
        {
            WorkItem wi = wit.next();
            if ( wi.getModelType().equals( SIModelTypeName.SI_SUBPROJECT ) )
            {
                // Save the configuration path for the current subproject, using the canonical path name
                pjConfigHash.put( wi.getField( "name" ).getValueAsString(), wi.getId() );
            }
View Full Code Here

            // Make sure we've got a valid sandbox, otherwise create it...
            if ( siSandbox.create() )
            {
                Response res = siSandbox.resync();
                // Lets capture what we got from running this resync
                WorkItemIterator wit = res.getWorkItems();
                while ( wit.hasNext() )
                {
                    WorkItem wi = wit.next();
                    if ( wi.getModelType().equals( SIModelTypeName.MEMBER ) )
                    {
                        Result message = wi.getResult();
                        getLogger().debug( wi.getDisplayId() + " " + ( null != message ? message.getMessage() : "" ) );
                        if ( null != message && message.getMessage().length() > 0 )
View Full Code Here

            if ( siSandbox.create() )
            {
                // Resynchronize the new or previously created sandbox
                Response res = siSandbox.resync();
                // Lets output what we got from running this command
                WorkItemIterator wit = res.getWorkItems();
                while ( wit.hasNext() )
                {
                    WorkItem wi = wit.next();
                    if ( wi.getModelType().equals( SIModelTypeName.MEMBER ) )
                    {
                        Result message = wi.getResult();
                        getLogger().debug( wi.getDisplayId() + " " + ( null != message ? message.getMessage() : "" ) );
                    }
View Full Code Here

        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
        {
            WorkItem wi = wit.next();
            return wi.getField( "fullConfigSyntax" ).getValueAsString().equalsIgnoreCase(
                siProject.getConfigurationPath() );
        }
        catch ( APIException aex )
        {
View Full Code Here

            {
                // Just print out the stack trace
                ie.printStackTrace();
                exitCode = -1;
            }
            WorkItemIterator wit = response.getWorkItems();
            // In the event there is a problem with one of the command's elements
            // we have to dig deeper into the exception...
            try
            {
                while ( wit.hasNext() )
                {
                    wit.next();
                }
                // If we got here then just extract the message
                if ( ex.getMessage() != null )
                {
                    message = ex.getMessage();
View Full Code Here

TOP

Related Classes of com.mks.api.response.WorkItemIterator

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.