jenkins.plugins.shiningpanda.tools
Class PythonInstallation

java.lang.Object
  extended by hudson.model.AbstractDescribableImpl<hudson.tools.ToolInstallation>
      extended by hudson.tools.ToolInstallation
          extended by jenkins.plugins.shiningpanda.tools.PythonInstallation
All Implemented Interfaces:
hudson.ExtensionPoint, hudson.model.Describable<hudson.tools.ToolInstallation>, hudson.model.EnvironmentSpecific<PythonInstallation>, hudson.slaves.NodeSpecific<PythonInstallation>, Serializable

public class PythonInstallation
extends hudson.tools.ToolInstallation
implements hudson.model.EnvironmentSpecific<PythonInstallation>, hudson.slaves.NodeSpecific<PythonInstallation>

See Also:
Serialized Form

Nested Class Summary
static class PythonInstallation.DescriptorImpl
          Installation descriptor
 
Nested classes/interfaces inherited from class hudson.tools.ToolInstallation
hudson.tools.ToolInstallation.ToolConverter
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Constructor Summary
PythonInstallation(String name, String home, List<? extends hudson.tools.ToolProperty<?>> properties)
          Constructor using fields.
 
Method Summary
 PythonInstallation forBuild(hudson.model.TaskListener listener, hudson.EnvVars environment)
          Get the installation for the provided build.
 PythonInstallation forEnvironment(hudson.EnvVars environment)
          Get the installation for the environment.
 PythonInstallation forNode(hudson.model.Node node, hudson.model.TaskListener listener)
          Get the installation for the provided node.
static PythonInstallation fromName(String name)
          Get the installation from its name.
static boolean isEmpty()
          Check if at least one installation is defined.
static PythonInstallation[] list()
          Get the installations.
 
Methods inherited from class hudson.tools.ToolInstallation
all, getHome, getName, getProperties, readResolve, translateFor
 
Methods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PythonInstallation

@DataBoundConstructor
public PythonInstallation(String name,
                                               String home,
                                               List<? extends hudson.tools.ToolProperty<?>> properties)
Constructor using fields.

Parameters:
name - The name of the PYTHON
home - The home folder for this PYTHON
properties - The properties
Method Detail

forEnvironment

public PythonInstallation forEnvironment(hudson.EnvVars environment)
Get the installation for the environment.

Specified by:
forEnvironment in interface hudson.model.EnvironmentSpecific<PythonInstallation>
Parameters:
environment - The environment
Returns:
The new installation

forNode

public PythonInstallation forNode(hudson.model.Node node,
                                  hudson.model.TaskListener listener)
                           throws IOException,
                                  InterruptedException
Get the installation for the provided node.

Specified by:
forNode in interface hudson.slaves.NodeSpecific<PythonInstallation>
Parameters:
node - The node
listener - The listener
Returns:
The new installation
Throws:
IOException
InterruptedException

forBuild

public PythonInstallation forBuild(hudson.model.TaskListener listener,
                                   hudson.EnvVars environment)
                            throws IOException,
                                   InterruptedException
Get the installation for the provided build.

Parameters:
listener - The build listener
environment - The environment
Returns:
The new installation
Throws:
IOException
InterruptedException

isEmpty

public static boolean isEmpty()
Check if at least one installation is defined.

Returns:
true if at least one installation is defined, else false

list

public static PythonInstallation[] list()
Get the installations.

Returns:
The installations

fromName

public static PythonInstallation fromName(String name)
Get the installation from its name.

Parameters:
name - The name of the installation
Returns:
The installation if found, else null


Copyright © 2004-2012. All Rights Reserved.