org.jenkinsci.plugins.rundeck.domain
Class RundeckUtils

java.lang.Object
  extended by org.jenkinsci.plugins.rundeck.domain.RundeckUtils

public class RundeckUtils
extends Object

Helper methods for working with RunDeck

Author:
Vincent Behar

Constructor Summary
RundeckUtils()
           
 
Method Summary
static String generateArgString(Properties options)
          Generates an "argString" representing the given options.
static RundeckJob parseJobDefinition(InputStream response)
          Parse the result of a "job details" action
static RundeckExecution parseJobRunResult(InputStream response)
          Parse the result of a "job run" action
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RundeckUtils

public RundeckUtils()
Method Detail

generateArgString

public static String generateArgString(Properties options)
Generates an "argString" representing the given options. Format of the argString is "-key1 value1 -key2 'value 2 with spaces'"

Parameters:
options - to be converted
Returns:
a string. null if options is null, empty if there are no valid options.

parseJobDefinition

public static RundeckJob parseJobDefinition(InputStream response)
                                     throws RundeckApiException
Parse the result of a "job details" action

Parameters:
response - as InputStream
Returns:
a RundeckJob instance - won't be null
Throws:
RundeckApiException - in case of error when reading the result

parseJobRunResult

public static RundeckExecution parseJobRunResult(InputStream response)
                                          throws RundeckApiException,
                                                 RundeckApiException.RundeckApiJobRunException
Parse the result of a "job run" action

Parameters:
response - as InputStream
Returns:
a RundeckExecution instance - won't be null
Throws:
RundeckApiException.RundeckApiJobRunException - in case of error when running the job
RundeckApiException - in case of error when reading the result


Copyright © 2004-2011. All Rights Reserved.