com.datalex.jenkins.plugins.nodestalker.wrapper
Class NodeStalkerBuildWrapper

java.lang.Object
  extended by hudson.model.AbstractDescribableImpl<hudson.tasks.BuildWrapper>
      extended by hudson.tasks.BuildWrapper
          extended by com.datalex.jenkins.plugins.nodestalker.wrapper.NodeStalkerBuildWrapper
All Implemented Interfaces:
hudson.ExtensionPoint, hudson.model.Describable<hudson.tasks.BuildWrapper>

public class NodeStalkerBuildWrapper
extends hudson.tasks.BuildWrapper

This class is an extension point that collects and stores information on the job to follow and whether the Share Workspace option has been enabled.

Version:
1.0
Author:
Fabio Neves , Baris Batiege

Nested Class Summary
static class NodeStalkerBuildWrapper.DescriptorImpl
           
 
Nested classes/interfaces inherited from class hudson.tasks.BuildWrapper
hudson.tasks.BuildWrapper.Environment
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Field Summary
static NodeStalkerBuildWrapper.DescriptorImpl DESCRIPTOR
           
static String JOB_DOES_NOT_EXIST_PATTERN
           
static String PLUGIN_DISPLAY_NAME
           
 
Constructor Summary
NodeStalkerBuildWrapper(String job, boolean shareWorkspace)
           
 
Method Summary
 String getJob()
           
 String getOldCustomWorkspace()
           
 hudson.tasks.BuildStepMonitor getRequiredMonitorService()
           
 boolean isShareWorkspace()
           
 void setJob(String job)
           
 void setOldCustomWorkspace(String oldCustomWorkspace)
           
 void setShareWorkspace(boolean shareWorkspace)
           
 hudson.tasks.BuildWrapper.Environment setUp(hudson.model.AbstractBuild build, hudson.Launcher launcher, hudson.model.BuildListener listener)
          Runs before the Builder runs (but after the checkout has occurred), and performs a set up.
 
Methods inherited from class hudson.tasks.BuildWrapper
all, decorateLauncher, decorateLogger, getProjectAction, getProjectActions, makeBuildVariables, makeSensitiveBuildVariables, preCheckout, setUp
 
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
 

Field Detail

PLUGIN_DISPLAY_NAME

public static final String PLUGIN_DISPLAY_NAME
See Also:
Constant Field Values

JOB_DOES_NOT_EXIST_PATTERN

public static final String JOB_DOES_NOT_EXIST_PATTERN
See Also:
Constant Field Values

DESCRIPTOR

@Extension
public static final NodeStalkerBuildWrapper.DescriptorImpl DESCRIPTOR
Constructor Detail

NodeStalkerBuildWrapper

@DataBoundConstructor
public NodeStalkerBuildWrapper(String job,
                                                    boolean shareWorkspace)
Parameters:
job - The job that will be followed
shareWorkspace - boolean to tell if Share Workspace is enabled
Method Detail

getJob

public String getJob()

getOldCustomWorkspace

public String getOldCustomWorkspace()

setOldCustomWorkspace

public void setOldCustomWorkspace(String oldCustomWorkspace)

setJob

public void setJob(String job)

isShareWorkspace

public boolean isShareWorkspace()

setShareWorkspace

public void setShareWorkspace(boolean shareWorkspace)

getRequiredMonitorService

public hudson.tasks.BuildStepMonitor getRequiredMonitorService()
See Also:
BuildStep.getRequiredMonitorService()

setUp

public hudson.tasks.BuildWrapper.Environment setUp(hudson.model.AbstractBuild build,
                                                   hudson.Launcher launcher,
                                                   hudson.model.BuildListener listener)
                                            throws IOException,
                                                   InterruptedException
Runs before the Builder runs (but after the checkout has occurred), and performs a set up.

Overrides:
setUp in class hudson.tasks.BuildWrapper
Parameters:
build - The build in progress for which an Environment object is created. Never null.
launcher - This launcher can be used to launch processes for this build. If the build runs remotely, launcher will also run a job on that remote machine. Never null.
listener - Can be used to send any message.
Returns:
non-null if the build can continue, null if there was an error and the build needs to be aborted.
Throws:
IOException - terminates the build abnormally. Hudson will handle the exception and reports a nice error message.
InterruptedException


Copyright © 2004-2014. All Rights Reserved.