org.apache.continuum.buildmanager
Interface BuildsManager

All Known Implementing Classes:
ParallelBuildsManager

public interface BuildsManager

BuildsManager. All builds whether forced or triggered will go through (or have to be added through) a builds manager.

Author:
Maria Odea Ching

Method Summary
 void addOverallBuildQueue(BuildQueue buildQueue)
          Add an overall build queue.
 void buildProject(int projectId, BuildDefinition buildDefinition, String projectName, BuildTrigger buildTrigger, ScmResult scmResult, int projectGroupId)
          Build the project using the specified build definition.
 void buildProjects(List<Project> projects, Map<Integer,BuildDefinition> projectsBuildDefinitionsMap, BuildTrigger buildTrigger, Map<Integer,ScmResult> scmResultMap, int projectGroupId)
          Build projects using their corresponding build definitions.
 boolean cancelAllBuilds()
          Cancels all the builds in all the overall queues.
 boolean cancelAllCheckouts()
           
 boolean cancelAllPrepareBuilds()
          Cancels all the prepare builds in all overall queues
 boolean cancelBuild(int projectId)
          Cancels the specified project's build.
 boolean cancelBuildInQueue(int buildQueueId)
          Cancels the current build on the specified overall queue.
 boolean cancelCheckout(int projectId)
           
 boolean cancelPrepareBuild(int projectId)
          Cancels the specified project prepare build
 boolean cancelPrepareBuild(int projectGroupId, int scmRootId)
          Cancels the specified project group prepare build
 void checkoutProject(int projectId, String projectName, File workingDirectory, String scmRootUrl, String scmUsername, String scmPassword, BuildDefinition defaultBuildDefinition, List<Project> subProjects)
          Adds the project to the checkout queue of the overall build queue with the least amount of tasks queued.
 Map<String,BuildProjectTask> getCurrentBuilds()
          Returns all the build tasks currently being executed.
 Map<String,CheckOutTask> getCurrentCheckouts()
          Returns all the checkout tasks currently being executed.
 Map<String,PrepareBuildProjectsTask> getCurrentProjectInPrepareBuild()
          Return currently preparing build project.
 Map<String,List<BuildProjectTask>> getProjectsInBuildQueues()
          Returns all the overall build queues together with a list of the build tasks in it's build queue.
 Map<String,List<CheckOutTask>> getProjectsInCheckoutQueues()
          Returns all the overall build queues together with a list of checkout tasks in it's checkout queue.
 Map<String,List<PrepareBuildProjectsTask>> getProjectsInPrepareBuildQueue()
          Return all projects in prepare build queue.
 boolean isAnyProjectCurrentlyBeingCheckedOut(int[] projectIds)
          Checks if at least one of the projects is currently being checked out.
 boolean isAnyProjectCurrentlyBuilding(int[] projectIds)
          Checks if at least one of the projects is currently building.
 boolean isAnyProjectCurrentlyPreparingBuild(int[] projectIds)
          Checks if at least one of the projects is currently preparing build
 boolean isBuildInProgress()
          Checks whether a build is in progress.
 boolean isInAnyBuildQueue(int projectId)
          Checks whether the project build is queued.
 boolean isInAnyBuildQueue(int projectId, int buildDefinitionId)
          Checks whether the project build using the specified build definition is queued.
 boolean isInAnyCheckoutQueue(int projectId)
          Checks whether the project checkout is already queued.
 boolean isInPrepareBuildQueue(int projectId)
          Checks whether the project is already in the prepare-build queue.
 boolean isInPrepareBuildQueue(int projectGroupId, int scmRootId)
          Checks where the project group is already in the prepare-build queue
 boolean isProjectCurrentlyBeingCheckedOut(int projectId)
          Checks whether project is currently being checked out.
 boolean isProjectCurrentlyPreparingBuild(int projectId)
          Checks whether project is currently preparing build
 boolean isProjectGroupCurrentlyPreparingBuild(int projectGroupId, int scmRootId)
          Checks whether project group is currently preparing build
 boolean isProjectInAnyCurrentBuild(int projectId)
          Checks whether the project is currently being built.
 void prepareBuildProjects(Map<Integer,Integer> projectsBuildDefinitionsMap, BuildTrigger buildTrigger, int projectGroupId, String projectGroupName, String scmRootAddress, int scmRootId)
          Adds the projects in the prepare-build-queue.
 void removeOverallBuildQueue(int overallBuildQueueId)
          Remove an overall build queue.
 void removeProjectFromBuildQueue(int projectId)
          Removes the project from the build queue.
 void removeProjectFromBuildQueue(int projectId, int buildDefinitionId, BuildTrigger buildTrigger, String projectName, int projectGroupId)
          Removes the project built using the specified build definition from the build queue.
 void removeProjectFromCheckoutQueue(int projectId)
          Removes the project from the checkout queue.
 boolean removeProjectFromPrepareBuildQueue(int projectGroupId, int scmRootId)
          Remove a project from a prepare build queue.
 boolean removeProjectGroupFromPrepareBuildQueue(int projectGroupId, String scmRootAddress)
           
 void removeProjectsFromBuildQueue(int[] projectIds)
          Removes the specified projects from their build queues.
 void removeProjectsFromBuildQueueWithHashcodes(int[] hascodes)
          Removes a set of projects using the specified hashcodes from the build queues.
 void removeProjectsFromCheckoutQueue(int[] projectIds)
          Removes the specified projects from their checkout queues.
 void removeProjectsFromCheckoutQueueWithHashcodes(int[] hashcodes)
          Removes a set of projects using the specified hashcodes from the checkout queues.
 void removeProjectsFromPrepareBuildQueueWithHashCodes(int[] hashCodes)
          Removes a set of projects using the specified hashcodes from the prepare build queues.
 

Method Detail

buildProjects

void buildProjects(List<Project> projects,
                   Map<Integer,BuildDefinition> projectsBuildDefinitionsMap,
                   BuildTrigger buildTrigger,
                   Map<Integer,ScmResult> scmResultMap,
                   int projectGroupId)
                   throws BuildManagerException
Build projects using their corresponding build definitions. This method adds the group of projects to the build queue of the overall queue with the least amount of tasks queued.

Parameters:
projects -
projectsBuildDefinitionsMap -
buildTrigger -
scmResultMap - TODO
projectGroupId -
Throws:
BuildManagerException

buildProject

void buildProject(int projectId,
                  BuildDefinition buildDefinition,
                  String projectName,
                  BuildTrigger buildTrigger,
                  ScmResult scmResult,
                  int projectGroupId)
                  throws BuildManagerException
Build the project using the specified build definition. Adds the project to the build queue of the overall queue with the least among of tasks queued. The overall queue is chosen from the pool of queues attached to the schedule of the build definition.

Parameters:
projectId -
buildDefinition -
projectName -
buildTrigger -
scmResult - TODO
projectGroupId -
Throws:
BuildManagerException

prepareBuildProjects

void prepareBuildProjects(Map<Integer,Integer> projectsBuildDefinitionsMap,
                          BuildTrigger buildTrigger,
                          int projectGroupId,
                          String projectGroupName,
                          String scmRootAddress,
                          int scmRootId)
                          throws BuildManagerException
Adds the projects in the prepare-build-queue.

Parameters:
projectsBuildDefinitionsMap -
buildTrigger -
projectGroupId - TODO
scmRootAddress - TODO
scmRootId -
Throws:
BuildManagerException

checkoutProject

void checkoutProject(int projectId,
                     String projectName,
                     File workingDirectory,
                     String scmRootUrl,
                     String scmUsername,
                     String scmPassword,
                     BuildDefinition defaultBuildDefinition,
                     List<Project> subProjects)
                     throws BuildManagerException
Adds the project to the checkout queue of the overall build queue with the least amount of tasks queued. The overall queue is chosen from the pool of queues attached to the schedule of the build definition.

Parameters:
projectId -
projectName -
workingDirectory -
scmRootUrl - TODO
scmUsername -
scmPassword -
defaultBuildDefinition -
subProjects - TODO
Throws:
BuildManagerException

cancelBuild

boolean cancelBuild(int projectId)
                    throws BuildManagerException
Cancels the specified project's build.

Parameters:
projectId -
Returns:
Throws:
BuildManagerException

cancelAllBuilds

boolean cancelAllBuilds()
                        throws BuildManagerException
Cancels all the builds in all the overall queues.

Returns:
Throws:
BuildManagerException

cancelBuildInQueue

boolean cancelBuildInQueue(int buildQueueId)
                           throws BuildManagerException
Cancels the current build on the specified overall queue.

Parameters:
buildQueueId -
Returns:
Throws:
BuildManagerException

cancelCheckout

boolean cancelCheckout(int projectId)
                       throws BuildManagerException
Parameters:
projectId -
Returns:
Throws:
BuildManagerException

cancelAllCheckouts

boolean cancelAllCheckouts()
                           throws BuildManagerException
Returns:
Throws:
BuildManagerException

cancelAllPrepareBuilds

boolean cancelAllPrepareBuilds()
                               throws BuildManagerException
Cancels all the prepare builds in all overall queues

Throws:
BuildManagerException

cancelPrepareBuild

boolean cancelPrepareBuild(int projectGroupId,
                           int scmRootId)
                           throws BuildManagerException
Cancels the specified project group prepare build

Parameters:
projectGroupId -
scmRootId -
Returns:
Throws:
BuildManagerException

cancelPrepareBuild

boolean cancelPrepareBuild(int projectId)
                           throws BuildManagerException
Cancels the specified project prepare build

Parameters:
projectId -
Returns:
Throws:
BuildManagerException

removeProjectFromBuildQueue

void removeProjectFromBuildQueue(int projectId)
                                 throws BuildManagerException
Removes the project from the build queue.

Parameters:
projectId -
Throws:
BuildManagerException

removeProjectFromBuildQueue

void removeProjectFromBuildQueue(int projectId,
                                 int buildDefinitionId,
                                 BuildTrigger buildTrigger,
                                 String projectName,
                                 int projectGroupId)
                                 throws BuildManagerException
Removes the project built using the specified build definition from the build queue.

Parameters:
projectId -
buildDefinitionId -
buildTrigger -
projectName -
projectGroupId -
Throws:
BuildManagerException

removeProjectsFromBuildQueue

void removeProjectsFromBuildQueue(int[] projectIds)
Removes the specified projects from their build queues.

Parameters:
projectIds -

removeProjectsFromBuildQueueWithHashcodes

void removeProjectsFromBuildQueueWithHashcodes(int[] hascodes)
                                               throws BuildManagerException
Removes a set of projects using the specified hashcodes from the build queues.

Parameters:
hascodes -
Throws:
BuildManagerException

removeProjectFromCheckoutQueue

void removeProjectFromCheckoutQueue(int projectId)
                                    throws BuildManagerException
Removes the project from the checkout queue.

Parameters:
projectId -
Throws:
BuildManagerException

removeProjectsFromCheckoutQueue

void removeProjectsFromCheckoutQueue(int[] projectIds)
Removes the specified projects from their checkout queues.

Parameters:
projectIds -

removeProjectsFromCheckoutQueueWithHashcodes

void removeProjectsFromCheckoutQueueWithHashcodes(int[] hashcodes)
                                                  throws BuildManagerException
Removes a set of projects using the specified hashcodes from the checkout queues.

Parameters:
hashcodes -
Throws:
BuildManagerException

removeProjectGroupFromPrepareBuildQueue

boolean removeProjectGroupFromPrepareBuildQueue(int projectGroupId,
                                                String scmRootAddress)
                                                throws BuildManagerException
Throws:
BuildManagerException

addOverallBuildQueue

void addOverallBuildQueue(BuildQueue buildQueue)
                          throws BuildManagerException
Add an overall build queue.

Parameters:
buildQueue -
Throws:
BuildManagerException - TODO

removeOverallBuildQueue

void removeOverallBuildQueue(int overallBuildQueueId)
                             throws BuildManagerException
Remove an overall build queue.

Parameters:
overallBuildQueueId -
Throws:
BuildManagerException

isInAnyBuildQueue

boolean isInAnyBuildQueue(int projectId)
                          throws BuildManagerException
Checks whether the project build is queued.

Parameters:
projectId -
Returns:
Throws:
BuildManagerException

isInAnyBuildQueue

boolean isInAnyBuildQueue(int projectId,
                          int buildDefinitionId)
                          throws BuildManagerException
Checks whether the project build using the specified build definition is queued.

Parameters:
projectId -
buildDefinitionId -
Returns:
Throws:
BuildManagerException

isInAnyCheckoutQueue

boolean isInAnyCheckoutQueue(int projectId)
                             throws BuildManagerException
Checks whether the project checkout is already queued.

Parameters:
projectId -
Returns:
Throws:
BuildManagerException

isAnyProjectCurrentlyBeingCheckedOut

boolean isAnyProjectCurrentlyBeingCheckedOut(int[] projectIds)
                                             throws BuildManagerException
Checks if at least one of the projects is currently being checked out.

Parameters:
projectIds -
Returns:
Throws:
BuildManagerException

isInPrepareBuildQueue

boolean isInPrepareBuildQueue(int projectId)
                              throws BuildManagerException
Checks whether the project is already in the prepare-build queue.

Parameters:
projectId -
Returns:
Throws:
BuildManagerException

isInPrepareBuildQueue

boolean isInPrepareBuildQueue(int projectGroupId,
                              int scmRootId)
                              throws BuildManagerException
Checks where the project group is already in the prepare-build queue

Parameters:
projectGroupId -
scmRootId -
Returns:
Throws:
BuildManagerException

isProjectInAnyCurrentBuild

boolean isProjectInAnyCurrentBuild(int projectId)
                                   throws BuildManagerException
Checks whether the project is currently being built.

Parameters:
projectId -
Returns:
Throws:
BuildManagerException

isAnyProjectCurrentlyPreparingBuild

boolean isAnyProjectCurrentlyPreparingBuild(int[] projectIds)
                                            throws BuildManagerException
Checks if at least one of the projects is currently preparing build

Parameters:
projectIds -
Returns:
Throws:
BuildManagerException

getCurrentBuilds

Map<String,BuildProjectTask> getCurrentBuilds()
                                              throws BuildManagerException
Returns all the build tasks currently being executed.

Returns:
Throws:
BuildManagerException

getCurrentCheckouts

Map<String,CheckOutTask> getCurrentCheckouts()
                                             throws BuildManagerException
Returns all the checkout tasks currently being executed.

Returns:
Throws:
BuildManagerException

getProjectsInBuildQueues

Map<String,List<BuildProjectTask>> getProjectsInBuildQueues()
                                                            throws BuildManagerException
Returns all the overall build queues together with a list of the build tasks in it's build queue.

Returns:
Throws:
BuildManagerException

getProjectsInCheckoutQueues

Map<String,List<CheckOutTask>> getProjectsInCheckoutQueues()
                                                           throws BuildManagerException
Returns all the overall build queues together with a list of checkout tasks in it's checkout queue.

Returns:
Throws:
BuildManagerException

isBuildInProgress

boolean isBuildInProgress()
Checks whether a build is in progress.

Returns:

isAnyProjectCurrentlyBuilding

boolean isAnyProjectCurrentlyBuilding(int[] projectIds)
                                      throws BuildManagerException
Checks if at least one of the projects is currently building.

Parameters:
projectIds -
Returns:
Throws:
BuildManagerException

isProjectCurrentlyBeingCheckedOut

boolean isProjectCurrentlyBeingCheckedOut(int projectId)
                                          throws BuildManagerException
Checks whether project is currently being checked out.

Parameters:
projectId -
Returns:
Throws:
BuildManagerException

isProjectCurrentlyPreparingBuild

boolean isProjectCurrentlyPreparingBuild(int projectId)
                                         throws BuildManagerException
Checks whether project is currently preparing build

Parameters:
projectId -
Returns:
Throws:
BuildManagerException

isProjectGroupCurrentlyPreparingBuild

boolean isProjectGroupCurrentlyPreparingBuild(int projectGroupId,
                                              int scmRootId)
                                              throws BuildManagerException
Checks whether project group is currently preparing build

Parameters:
projectGroupId -
scmRootId -
Returns:
Throws:
BuildManagerException

getCurrentProjectInPrepareBuild

Map<String,PrepareBuildProjectsTask> getCurrentProjectInPrepareBuild()
                                                                     throws BuildManagerException
Return currently preparing build project.

Returns:
Throws:
BuildManagerException

getProjectsInPrepareBuildQueue

Map<String,List<PrepareBuildProjectsTask>> getProjectsInPrepareBuildQueue()
                                                                          throws BuildManagerException
Return all projects in prepare build queue.

Returns:
Throws:
BuildManagerException

removeProjectFromPrepareBuildQueue

boolean removeProjectFromPrepareBuildQueue(int projectGroupId,
                                           int scmRootId)
                                           throws BuildManagerException
Remove a project from a prepare build queue.

Parameters:
projectGroupId -
scmRootId -
Returns:
Throws:
BuildManagerException

removeProjectsFromPrepareBuildQueueWithHashCodes

void removeProjectsFromPrepareBuildQueueWithHashCodes(int[] hashCodes)
                                                      throws BuildManagerException
Removes a set of projects using the specified hashcodes from the prepare build queues.

Parameters:
hashcodes -
Throws:
BuildManagerException


Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.