hudson.plugins.perforce
Class PerforceToolInstallation

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

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

Information about Perforce installation. This includes the path to p4 executable.

See Also:
Serialized Form

Nested Class Summary
static class PerforceToolInstallation.DescriptorImpl
           
 
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
PerforceToolInstallation(String name, String home, List<? extends hudson.tools.ToolProperty<?>> properties)
          Default constructor.
 
Method Summary
 PerforceToolInstallation forEnvironment(hudson.EnvVars environment)
           
 PerforceToolInstallation forNode(hudson.model.Node node, hudson.model.TaskListener log)
           
 PerforceToolInstallation.DescriptorImpl getDescriptor()
           
 String getP4Exe()
          Get the path to p4.exe
static void migrateOldData(String exe)
          Migrate data from old job specific "p4Exe" field.
static void onLoaded()
          Migrate old data into new tool installations if needed.
 
Methods inherited from class hudson.tools.ToolInstallation
all, getHome, getName, getProperties, translateFor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PerforceToolInstallation

@DataBoundConstructor
public PerforceToolInstallation(String name,
                                                     String home,
                                                     List<? extends hudson.tools.ToolProperty<?>> properties)
Default constructor.

Parameters:
name - Installation name
home - Path to p4.exe
properties - Additional tool installation data
Method Detail

getP4Exe

public String getP4Exe()
Get the path to p4.exe

Returns:
Path to p4.exe

onLoaded

@Initializer(after=JOB_LOADED)
public static void onLoaded()
Migrate old data into new tool installations if needed.


migrateOldData

public static void migrateOldData(String exe)
Migrate data from old job specific "p4Exe" field. Create a tool installation for each individual path with the path as the tool name.

Parameters:
exe - The path to p4 executable

forNode

public PerforceToolInstallation forNode(hudson.model.Node node,
                                        hudson.model.TaskListener log)
                                 throws IOException,
                                        InterruptedException
Specified by:
forNode in interface hudson.slaves.NodeSpecific<PerforceToolInstallation>
Throws:
IOException
InterruptedException

forEnvironment

public PerforceToolInstallation forEnvironment(hudson.EnvVars environment)
Specified by:
forEnvironment in interface hudson.model.EnvironmentSpecific<PerforceToolInstallation>

getDescriptor

public PerforceToolInstallation.DescriptorImpl getDescriptor()
Specified by:
getDescriptor in interface hudson.model.Describable<hudson.tools.ToolInstallation>
Overrides:
getDescriptor in class hudson.model.AbstractDescribableImpl<hudson.tools.ToolInstallation>


Copyright © 2004-2013 Hudson. All Rights Reserved.