hudson.plugins.git.util
Class BuildChooser

java.lang.Object
  extended by hudson.plugins.git.util.BuildChooser
All Implemented Interfaces:
hudson.ExtensionPoint, hudson.model.Describable<BuildChooser>, java.io.Serializable
Direct Known Subclasses:
DefaultBuildChooser, GerritBuildChooser

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

Interface defining an API to choose which revisions ought to be considered for building.

This object is persisted as a part of the project configuration.

Author:
magnayn, Kohsuke Kawaguchi
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Field Summary
 GitSCM gitSCM
          Refers back to the GitSCM that owns this build chooser.
 
Constructor Summary
BuildChooser()
           
 
Method Summary
static hudson.DescriptorExtensionList<BuildChooser,BuildChooserDescriptor> all()
          All the registered build choosers.
abstract  java.util.Collection<Revision> getCandidateRevisions(boolean isPollCall, java.lang.String singleBranch, IGitAPI git, hudson.model.TaskListener listener, BuildData buildData)
          Get a list of revisions that are candidates to be built.
 BuildChooserDescriptor getDescriptor()
          What was the last revision to be built?
 java.lang.String getDisplayName()
          Short-hand to get to the display name.
 Build prevBuildForChangelog(java.lang.String singleBranch, BuildData data, IGitAPI git)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

gitSCM

public transient GitSCM gitSCM
Refers back to the GitSCM that owns this build chooser. Do not modify from outside GitSCM.

Constructor Detail

BuildChooser

public BuildChooser()
Method Detail

getDisplayName

public final java.lang.String getDisplayName()
Short-hand to get to the display name.


getCandidateRevisions

public abstract java.util.Collection<Revision> getCandidateRevisions(boolean isPollCall,
                                                                     java.lang.String singleBranch,
                                                                     IGitAPI git,
                                                                     hudson.model.TaskListener listener,
                                                                     BuildData buildData)
                                                              throws GitException,
                                                                     java.io.IOException
Get a list of revisions that are candidates to be built. May be an empty set.

Parameters:
isPollCall - true if this method is called from pollChanges.
singleBranch - contains the name of a single branch to be built this will be non-null only in the simple case, in advanced cases with multiple repositories and/or branches specified then this value will be null.
Returns:
the candidate revision.
Throws:
java.io.IOException
GitException

getDescriptor

public BuildChooserDescriptor getDescriptor()
What was the last revision to be built?

Specified by:
getDescriptor in interface hudson.model.Describable<BuildChooser>
Returns:

all

public static hudson.DescriptorExtensionList<BuildChooser,BuildChooserDescriptor> all()
All the registered build choosers.


prevBuildForChangelog

public Build prevBuildForChangelog(java.lang.String singleBranch,
                                   BuildData data,
                                   IGitAPI git)


Copyright © 2010. All Rights Reserved.