hudson.plugins.copyartifact
Class BuildSelector

java.lang.Object
  extended by hudson.plugins.copyartifact.BuildSelector
All Implemented Interfaces:
hudson.ExtensionPoint, hudson.model.Describable<BuildSelector>
Direct Known Subclasses:
SavedBuildSelector, SpecificBuildSelector, StatusBuildSelector

public abstract class BuildSelector
extends java.lang.Object
implements hudson.ExtensionPoint, hudson.model.Describable<BuildSelector>

Extension point for selecting the build to copy artifacts from. In a subclass override just isSelectable() for a standard loop through completed builds, starting with the most recent. Otherwise override getBuild() to provide different build selection logic.

Author:
Alan.Harder@sun.com

Nested Class Summary
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Constructor Summary
BuildSelector()
           
 
Method Summary
 hudson.model.Run<?,?> getBuild(hudson.model.Job<?,?> job)
          Find a build to copy artifacts from.
 hudson.model.Descriptor<BuildSelector> getDescriptor()
           
 boolean isSelectable(hudson.model.Run<?,?> run)
          Should this build be selected? Override just this method to use a standard loop through completed builds, starting with the most recent.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BuildSelector

public BuildSelector()
Method Detail

getBuild

public hudson.model.Run<?,?> getBuild(hudson.model.Job<?,?> job)
Find a build to copy artifacts from.

Returns:
Build to use, or null if no appropriate build was found

isSelectable

public boolean isSelectable(hudson.model.Run<?,?> run)
Should this build be selected? Override just this method to use a standard loop through completed builds, starting with the most recent.

Returns:
True to select this build

getDescriptor

public hudson.model.Descriptor<BuildSelector> getDescriptor()
Specified by:
getDescriptor in interface hudson.model.Describable<BuildSelector>


Copyright © 2010. All Rights Reserved.