org.jenkinsci.plugins.scriptler.util
Class ScriptHelper

java.lang.Object
  extended by org.jenkinsci.plugins.scriptler.util.ScriptHelper

public class ScriptHelper
extends Object

Author:
Dominik Bartholdi (imod)

Constructor Summary
ScriptHelper()
           
 
Method Summary
static Script getScript(String scriptName, boolean withSrc)
          Loads the script information.
static String runScript(String[] slaves, String scriptTxt, Parameter[] parameters)
           
static String runScript(String node, String scriptTxt, Parameter[] parameters)
          Runs the execution on a given slave.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScriptHelper

public ScriptHelper()
Method Detail

getScript

public static Script getScript(String scriptName,
                               boolean withSrc)
Loads the script information.

Parameters:
scriptName - the name of the script
withSrc - should the script sources be loaded too?
Returns:
the script

runScript

public static String runScript(String[] slaves,
                               String scriptTxt,
                               Parameter[] parameters)
                        throws IOException,
                               javax.servlet.ServletException
Throws:
IOException
javax.servlet.ServletException

runScript

public static String runScript(String node,
                               String scriptTxt,
                               Parameter[] parameters)
                        throws IOException,
                               javax.servlet.ServletException
Runs the execution on a given slave.

Parameters:
node - where to run the script.
scriptTxt - the script (groovy) to be executed.
Returns:
the output
Throws:
IOException
javax.servlet.ServletException


Copyright © 2010-2012. All Rights Reserved.