hudson.plugins.groovy
Interface ScriptSource

All Superinterfaces:
hudson.model.Describable<ScriptSource>
All Known Implementing Classes:
FileScriptSource, StringScriptSource

public interface ScriptSource
extends hudson.model.Describable<ScriptSource>

Base interface for Groovy script sources.

Author:
dvrzalik

Field Summary
static hudson.util.DescriptorList<ScriptSource> SOURCES
           
 
Method Summary
 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 interface hudson.model.Describable
getDescriptor
 

Field Detail

SOURCES

static final hudson.util.DescriptorList<ScriptSource> SOURCES
Method Detail

getScriptFile

hudson.FilePath getScriptFile(hudson.FilePath projectWorkspace)
                              throws java.io.IOException,
                                     java.lang.InterruptedException
In the end, every script is a file...

Parameters:
Project - workspace (useful when the source has to create temporary file)
Returns:
Path to the executed script file
Throws:
java.io.IOException
java.lang.InterruptedException

getScriptFile

hudson.FilePath getScriptFile(hudson.FilePath projectWorkspace,
                              hudson.model.AbstractBuild<?,?> build,
                              hudson.model.BuildListener listener)
                              throws java.io.IOException,
                                     java.lang.InterruptedException
Able to load script when script path contains parameters

Parameters:
Project - workspace to create tmp file
Build - - needed to obtain environment variables
listener - - build listener needed by Environment
Returns:
Path to the executed script file
Throws:
java.io.IOException
java.lang.InterruptedException

getScriptStream

java.io.InputStream getScriptStream(hudson.FilePath projectWorkspace)
                                    throws java.io.IOException,
                                           java.lang.InterruptedException
Returns:
Stream containing the script
Throws:
java.io.IOException
java.lang.InterruptedException

getScriptStream

java.io.InputStream getScriptStream(hudson.FilePath projectWorkspace,
                                    hudson.model.AbstractBuild<?,?> build,
                                    hudson.model.BuildListener listener)
                                    throws java.io.IOException,
                                           java.lang.InterruptedException
Returns:
Stream containing the script, able to load script when script path contains parameters
Throws:
java.io.IOException
java.lang.InterruptedException


Copyright © 2011. All Rights Reserved.