com.seitenbau.jenkins.plugins.dynamicparameter
Class ScriptParameterDefinition

java.lang.Object
  extended by hudson.model.ParameterDefinition
      extended by hudson.model.SimpleParameterDefinition
          extended by com.seitenbau.jenkins.plugins.dynamicparameter.BaseParameterDefinition
              extended by com.seitenbau.jenkins.plugins.dynamicparameter.ScriptParameterDefinition
All Implemented Interfaces:
hudson.ExtensionPoint, hudson.model.Describable<hudson.model.ParameterDefinition>, Serializable
Direct Known Subclasses:
ChoiceParameterDefinition, StringParameterDefinition

public abstract class ScriptParameterDefinition
extends BaseParameterDefinition

Base class for all dynamic parameters.

See Also:
Serialized Form

Nested Class Summary
static class ScriptParameterDefinition.BaseDescriptor
          Base parameter descriptor.
static class ScriptParameterDefinition.ClasspathScriptCall
          Remote call implementation.
 
Nested classes/interfaces inherited from class hudson.model.ParameterDefinition
hudson.model.ParameterDefinition.ParameterDescriptor
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Field Summary
 
Fields inherited from class com.seitenbau.jenkins.plugins.dynamicparameter.BaseParameterDefinition
logger
 
Fields inherited from class hudson.model.ParameterDefinition
LIST
 
Constructor Summary
protected ScriptParameterDefinition(String name, String script, String description, String uuid, boolean remote, String classPath)
          Constructor.
 
Method Summary
 String getClassPath()
          Get class paths as a single string.
 String[] getClassPathList()
          Get class paths as a list.
 hudson.FilePath getLocalBaseDirectory()
          Local class path directory.
 String getRemoteClassPath()
          Remote class path directory.
 String getScript()
          Get the script, which generates the parameter value.
protected  ScriptParameterDefinition.ClasspathScriptCall prepareLocalCall()
          Prepare a local call.
protected  ScriptParameterDefinition.ClasspathScriptCall prepareRemoteCall(hudson.remoting.VirtualChannel channel)
          Prepare a remote call.
 
Methods inherited from class com.seitenbau.jenkins.plugins.dynamicparameter.BaseParameterDefinition
checkParameterValue, createValue, createValue, getScriptResultAsList, getScriptResultAsString, getUUID, isRemote
 
Methods inherited from class hudson.model.SimpleParameterDefinition
createValue, createValue
 
Methods inherited from class hudson.model.ParameterDefinition
all, copyWithDefaultValue, getDefaultParameterValue, getDescription, getDescriptor, getName, getType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScriptParameterDefinition

protected ScriptParameterDefinition(String name,
                                    String script,
                                    String description,
                                    String uuid,
                                    boolean remote,
                                    String classPath)
Constructor.

Parameters:
name - parameter name
script - script, which generates the parameter value
description - parameter description
uuid - identifier (optional)
remote - execute the script on a remote node
Method Detail

getLocalBaseDirectory

public final hudson.FilePath getLocalBaseDirectory()
Local class path directory.

Returns:
directory on the local node

getRemoteClassPath

public final String getRemoteClassPath()
Remote class path directory.

Returns:
directory on a remote node

getScript

public final String getScript()
Get the script, which generates the parameter value.

Returns:
the script as string

getClassPath

public final String getClassPath()
Get class paths as a single string.

Returns:
class paths

getClassPathList

public final String[] getClassPathList()
Get class paths as a list.

Returns:
class paths

prepareLocalCall

protected ScriptParameterDefinition.ClasspathScriptCall prepareLocalCall()
Description copied from class: BaseParameterDefinition
Prepare a local call.

Specified by:
prepareLocalCall in class BaseParameterDefinition
Returns:
call instance

prepareRemoteCall

protected ScriptParameterDefinition.ClasspathScriptCall prepareRemoteCall(hudson.remoting.VirtualChannel channel)
                                                                   throws IOException,
                                                                          InterruptedException
Description copied from class: BaseParameterDefinition
Prepare a remote call.

Specified by:
prepareRemoteCall in class BaseParameterDefinition
Parameters:
channel - channel to the remote slave where the call will be executed
Returns:
call instance
Throws:
IOException
InterruptedException


Copyright © 2004-2012. All Rights Reserved.