hudson.plugins.groovy
Class FileScriptSource
java.lang.Object
hudson.plugins.groovy.FileScriptSource
- All Implemented Interfaces:
- hudson.model.Describable<ScriptSource>, ScriptSource
public class FileScriptSource
- extends java.lang.Object
- implements ScriptSource
Groovy source based on given script file.
- Author:
- dvrzalik
|
Method Summary |
hudson.model.Descriptor<ScriptSource> |
getDescriptor()
|
java.lang.String |
getScriptFile()
|
hudson.FilePath |
getScriptFile(hudson.FilePath projectWorkspace)
In the end, every script is a file... |
hudson.FilePath |
getScriptFile(hudson.FilePath projectWorkspace,
hudson.model.AbstractBuild<?,?> build,
hudson.model.BuildListener listener)
Able to load script when script path contains parameters |
java.io.InputStream |
getScriptStream(hudson.FilePath projectWorkspace)
|
java.io.InputStream |
getScriptStream(hudson.FilePath projectWorkspace,
hudson.model.AbstractBuild<?,?> build,
hudson.model.BuildListener listener)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DESCRIPTOR
@Extension
public static final FileScriptSource.DescriptorImpl DESCRIPTOR
FileScriptSource
@DataBoundConstructor
public FileScriptSource(java.lang.String scriptFile)
getScriptFile
public hudson.FilePath getScriptFile(hudson.FilePath projectWorkspace)
- Description copied from interface:
ScriptSource
- In the end, every script is a file...
- Specified by:
getScriptFile in interface ScriptSource
- Returns:
- Path to the executed script file
getScriptFile
public hudson.FilePath getScriptFile(hudson.FilePath projectWorkspace,
hudson.model.AbstractBuild<?,?> build,
hudson.model.BuildListener listener)
throws java.io.IOException,
java.lang.InterruptedException
- Description copied from interface:
ScriptSource
- Able to load script when script path contains parameters
- Specified by:
getScriptFile in interface ScriptSource
listener - - build listener needed by Environment
- Returns:
- Path to the executed script file
- Throws:
java.io.IOException
java.lang.InterruptedException
getScriptFile
public java.lang.String getScriptFile()
getScriptStream
public java.io.InputStream getScriptStream(hudson.FilePath projectWorkspace)
throws java.io.IOException
- Specified by:
getScriptStream in interface ScriptSource
- Returns:
- Stream containing the script
- Throws:
java.io.IOException
getScriptStream
public java.io.InputStream getScriptStream(hudson.FilePath projectWorkspace,
hudson.model.AbstractBuild<?,?> build,
hudson.model.BuildListener listener)
throws java.io.IOException,
java.lang.InterruptedException
- Specified by:
getScriptStream in interface ScriptSource
- Returns:
- Stream containing the script, able to load script when script path contains parameters
- Throws:
java.io.IOException
java.lang.InterruptedException
getDescriptor
public hudson.model.Descriptor<ScriptSource> getDescriptor()
- Specified by:
getDescriptor in interface hudson.model.Describable<ScriptSource>
Copyright © 2011. All Rights Reserved.