hudson.plugins.git.util
Class BuildChooser

java.lang.Object
  extended by hudson.plugins.git.util.BuildChooser
All Implemented Interfaces:
IBuildChooser

public class BuildChooser
extends java.lang.Object
implements IBuildChooser


Constructor Summary
BuildChooser(GitSCM gitSCM, IGitAPI git, GitUtils utils, BuildData data)
           
 
Method Summary
 java.util.Collection<Revision> getCandidateRevisions(boolean isPollCall, java.lang.String singleBranch)
          Determines which Revisions to build.
 hudson.model.Action getData()
          Get data to be persisted.
 Build revisionBuilt(Revision revision, int buildNumber, hudson.model.Result result)
          Report back whether a revision built was successful or not.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BuildChooser

public BuildChooser(GitSCM gitSCM,
                    IGitAPI git,
                    GitUtils utils,
                    BuildData data)
Method Detail

getCandidateRevisions

public java.util.Collection<Revision> getCandidateRevisions(boolean isPollCall,
                                                            java.lang.String singleBranch)
                                                     throws GitException,
                                                            java.io.IOException
Determines which Revisions to build. If only one branch is chosen and only one repository is listed, then just attempt to find the latest revision number for the chosen branch. If multiple branches are selected or the branches include wildcards, then use the advanced usecase as defined in the getAdvancedCandidateRevisons method.

Specified by:
getCandidateRevisions in interface IBuildChooser
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

revisionBuilt

public Build revisionBuilt(Revision revision,
                           int buildNumber,
                           hudson.model.Result result)
Description copied from interface: IBuildChooser
Report back whether a revision built was successful or not.

Specified by:
revisionBuilt in interface IBuildChooser

getData

public hudson.model.Action getData()
Description copied from interface: IBuildChooser
Get data to be persisted.

Specified by:
getData in interface IBuildChooser
Returns:


Copyright © 2010. All Rights Reserved.