com.dtolabs.rundeck.plugins.step
Class GeneratedScriptBuilder

java.lang.Object
  extended by com.dtolabs.rundeck.plugins.step.GeneratedScriptBuilder
All Implemented Interfaces:
GeneratedScript

public class GeneratedScriptBuilder
extends java.lang.Object
implements GeneratedScript

A simple implementation of GeneratedScript, which can be created via static factory methods script(String, String[]) or command(String...)


Method Summary
static GeneratedScript command(java.lang.String... command)
          Create a command
 java.lang.String[] getArgs()
          Return arguments to the script
 java.lang.String[] getCommand()
          Return the command to execute
 java.lang.String getScript()
          Return the script to execute
static GeneratedScript script(java.lang.String script, java.lang.String[] args)
          Create a script
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getScript

public java.lang.String getScript()
Description copied from interface: GeneratedScript
Return the script to execute

Specified by:
getScript in interface GeneratedScript

getArgs

public java.lang.String[] getArgs()
Description copied from interface: GeneratedScript
Return arguments to the script

Specified by:
getArgs in interface GeneratedScript

getCommand

public java.lang.String[] getCommand()
Description copied from interface: GeneratedScript
Return the command to execute

Specified by:
getCommand in interface GeneratedScript

script

public static GeneratedScript script(java.lang.String script,
                                     java.lang.String[] args)
Create a script

Parameters:
script - the script text
args - the arguments for the script

command

public static GeneratedScript command(java.lang.String... command)
Create a command

Parameters:
command - the command and arguments