com.atlassian.bamboo.build
Interface BuildManager

All Known Implementing Classes:
HibernateBuildManager

Deprecated. since 2.7 use PlanManager

public interface BuildManager

Manager to handle all build related activities


Method Summary
 void addBuildResults(Buildable buildable, BuildResults buildResults)
          Deprecated.  
 boolean exists(java.lang.String key)
          Deprecated. Returns true if build exists with the provided key (eg.
 java.util.Set<Build> filterFavouritedBuilds(java.util.Collection<Build> builds, com.atlassian.user.User user)
          Deprecated. since 2.7 please use equivalent method of PlanManager to get chains as well
 java.util.Collection<Build> getAllBuilds()
          Deprecated. Returns a collection of all Build objects
 java.util.Collection<Build> getAllBuildsForClone()
          Deprecated. since 2.7 use PlanManager.getAllPlansForClone(Class)
 java.util.Collection<Build> getAllBuildsForEdit()
          Deprecated.  
 java.util.Collection<Build> getAllBuildsForRead()
          Deprecated.  
 Build getBuildById(long id)
          Deprecated. Returns the build given the id
 Build getBuildByKey(java.lang.String key)
          Deprecated. use PlanManager.getPlanByKey(String, Class)
 Build getBuildByProjectAndName(java.lang.String projectKey, java.lang.String buildName)
          Deprecated.  
 BuildResults getBuildResults(Buildable build, java.lang.Integer buildNumber)
          Deprecated. Return BuildResults for the given Build and buildNumber
 BuildResults getBuildResults(Build build, java.lang.Integer buildNumber)
          Deprecated. Return BuildResults for the given Build and buildNumber
 BuildResults getBuildResults(java.lang.String planKey, java.lang.Integer buildNumber)
          Deprecated. Return BuildResults for the given planKey and buildNumber
 java.util.Collection<Build> getBuildsByProjectForRead(Project project)
          Deprecated. This is the manager equivalent of a project.getBuilds.
 java.util.Collection<Build> getBuildsForDeletion()
          Deprecated.  
 java.util.Collection<Build> getFavouriteBuildsForRead(com.atlassian.user.User user)
          Deprecated. since 2.7 please use PlanManager.getFavouritePlans
 int getPlanCount()
          Deprecated. use PlanManager.getPlanCount(Class) or PlanManager.getPlanCount()
 java.util.Map<Project,java.util.Collection<Build>> getProjectBuilds(boolean includeEmptyProjects)
          Deprecated. since 2.7 please use PlanManager.getProjectPlanMap(Class, boolean)
 boolean isAllowBuilding(java.lang.String planKey)
          Deprecated. Checks if a particular build is allowed to be built.
 boolean isExistingBuildKey(java.lang.String projectKey, java.lang.String buildKey)
          Deprecated. Returns true if the build key already exists within the given project key
 boolean isExistingBuildName(java.lang.String projectKey, java.lang.String buildName)
          Deprecated. Returns true if the build name already exists within the given project key
 java.util.Collection<Build> retreiveAllBuilds()
          Deprecated.  
 java.lang.String revertVcsRevisionKey(java.lang.String buildKey, java.lang.String revisionForBuild, java.lang.String previousRevision)
          Deprecated. use PlanManager.revertVcsRevisionKey(String, String, String)
 void saveBuild(Build build)
          Deprecated. Persists a build
 void saveSuspendBuild(java.lang.String buildKey, boolean setSuspendBuild)
          Deprecated. since 2.7. Does not support chains, use PlanManager.savePlanSuspendState instead to save the Plan.
 void updateNames(java.lang.String projectName, java.lang.String buildName, Build build)
          Deprecated. Updates project and plan names.
 void updateNamesAndDescription(java.lang.String projectName, java.lang.String buildName, java.lang.String description, Buildable buildable)
          Deprecated. Updates project and plan names and plan description.
 java.lang.String updateVcsRevisionKey(BuildContext buildContext)
          Deprecated. use PlanManager.updateVcsRevisionKey(BuildContext)
 

Method Detail

getBuildByKey

@Nullable
@Deprecated
Build getBuildByKey(java.lang.String key)
Deprecated. use PlanManager.getPlanByKey(String, Class)

Returns the build given a key

Parameters:
key - - full key of the build. eg. BAM-MAIN null safe
Returns:
A Build if the key matches. Otherwise null

getBuildById

Build getBuildById(long id)
Deprecated. 
Returns the build given the id

Parameters:
id -
Returns:
A Build. null if not found.

getAllBuilds

java.util.Collection<Build> getAllBuilds()
Deprecated. 
Returns a collection of all Build objects

Returns:
all builds in the system, Collections.emptyList() if none exists

getAllBuildsForRead

java.util.Collection<Build> getAllBuildsForRead()
Deprecated. 

retreiveAllBuilds

java.util.Collection<Build> retreiveAllBuilds()
Deprecated. 

getAllBuildsForEdit

java.util.Collection<Build> getAllBuildsForEdit()
Deprecated. 

getAllBuildsForClone

@Deprecated
java.util.Collection<Build> getAllBuildsForClone()
Deprecated. since 2.7 use PlanManager.getAllPlansForClone(Class)


getBuildsForDeletion

java.util.Collection<Build> getBuildsForDeletion()
Deprecated. 

getFavouriteBuildsForRead

@Deprecated
java.util.Collection<Build> getFavouriteBuildsForRead(com.atlassian.user.User user)
Deprecated. since 2.7 please use PlanManager.getFavouritePlans

Parameters:
user -
Returns:

filterFavouritedBuilds

@NotNull
@Deprecated
java.util.Set<Build> filterFavouritedBuilds(@NotNull
                                                               java.util.Collection<Build> builds,
                                                               @NotNull
                                                               com.atlassian.user.User user)
Deprecated. since 2.7 please use equivalent method of PlanManager to get chains as well

Return a set of Builds that are a subset of the given Builds collection that are favourited by the User

Parameters:
builds -
user -
Returns:
favoritedBuilds

getBuildsByProjectForRead

java.util.Collection<Build> getBuildsByProjectForRead(Project project)
Deprecated. 
This is the manager equivalent of a project.getBuilds. However, this is permission filtered.

Parameters:
project -
Returns:

isExistingBuildName

boolean isExistingBuildName(java.lang.String projectKey,
                            java.lang.String buildName)
Deprecated. 
Returns true if the build name already exists within the given project key

Parameters:
projectKey - (doesn't have to exist for this check)
buildName - to check
Returns:
true if build name already exists in that project

isExistingBuildKey

boolean isExistingBuildKey(java.lang.String projectKey,
                           java.lang.String buildKey)
Deprecated. 
Returns true if the build key already exists within the given project key

Parameters:
projectKey - (doesn't have to exist for this check)
buildKey - to check
Returns:
true if build name already exists in that project

exists

boolean exists(java.lang.String key)
Deprecated. 
Returns true if build exists with the provided key (eg. BAM-BOO)

Parameters:
key -
Returns:
exists

getPlanCount

@Deprecated
int getPlanCount()
Deprecated. use PlanManager.getPlanCount(Class) or PlanManager.getPlanCount()

How many plans currently exist

Returns:
how many plans exist in the datbase

saveBuild

void saveBuild(Build build)
Deprecated. 
Persists a build

Parameters:
build - cannot be null

saveSuspendBuild

@Deprecated
void saveSuspendBuild(java.lang.String buildKey,
                                 boolean setSuspendBuild)
Deprecated. since 2.7. Does not support chains, use PlanManager.savePlanSuspendState instead to save the Plan.

Persists a build for enable/disable

Parameters:
buildKey - of the build to be suspended/resumed
setSuspendBuild - true if the build should be suspended, false if resumed

addBuildResults

void addBuildResults(Buildable buildable,
                     BuildResults buildResults)
Deprecated. 

getBuildResults

@Nullable
BuildResults getBuildResults(Buildable build,
                                      java.lang.Integer buildNumber)
Deprecated. 
Return BuildResults for the given Build and buildNumber

Parameters:
build -
buildNumber -
Returns:
buildResults

getBuildResults

@Nullable
BuildResults getBuildResults(Build build,
                                      java.lang.Integer buildNumber)
Deprecated. 
Return BuildResults for the given Build and buildNumber

Parameters:
build -
buildNumber -
Returns:
buildResults

getBuildResults

BuildResults getBuildResults(java.lang.String planKey,
                             java.lang.Integer buildNumber)
Deprecated. 
Return BuildResults for the given planKey and buildNumber

Parameters:
planKey -
buildNumber -
Returns:
buildResults

getBuildByProjectAndName

Build getBuildByProjectAndName(java.lang.String projectKey,
                               java.lang.String buildName)
Deprecated. 

updateNames

void updateNames(java.lang.String projectName,
                 java.lang.String buildName,
                 Build build)
Deprecated. 
Updates project and plan names.

Parameters:
projectName - new name of the project
buildName - new name of the plan
build - build object to be modified and stored.

updateNamesAndDescription

void updateNamesAndDescription(java.lang.String projectName,
                               java.lang.String buildName,
                               @Nullable
                               java.lang.String description,
                               Buildable buildable)
Deprecated. 
Updates project and plan names and plan description.

Parameters:
projectName - new name of the project
buildName - new name of the plan
description - new plan description
buildable -

isAllowBuilding

boolean isAllowBuilding(@NotNull
                        java.lang.String planKey)
Deprecated. 
Checks if a particular build is allowed to be built. It checks if it exists, not suspened, and that there is no global flag that has stopped building

Parameters:
planKey -
Returns:
true if the planKey is a valid build that is allowed to be built

getProjectBuilds

@Deprecated
@NotNull
java.util.Map<Project,java.util.Collection<Build>> getProjectBuilds(boolean includeEmptyProjects)
Deprecated. since 2.7 please use PlanManager.getProjectPlanMap(Class, boolean)

Return a map of Build collections which belong to a Project

Parameters:
includeEmptyProjects - set to true if you want all of the projects regardless if they have any builds
Returns:
build collection map

updateVcsRevisionKey

@Deprecated
java.lang.String updateVcsRevisionKey(@NotNull
                                                 BuildContext buildContext)
Deprecated. use PlanManager.updateVcsRevisionKey(BuildContext)

Updates lastVcsRevisionKey in build based on revision contained in BuildContext

Parameters:
buildContext -
Returns:
updated lastVcsRevisionKey

revertVcsRevisionKey

@Deprecated
@Nullable
java.lang.String revertVcsRevisionKey(@NotNull
                                                          java.lang.String buildKey,
                                                          @NotNull
                                                          java.lang.String revisionForBuild,
                                                          @Nullable
                                                          java.lang.String previousRevision)
Deprecated. use PlanManager.revertVcsRevisionKey(String, String, String)

Revert lastVcsRevisionKey in build based on previous build revision contained in BuildContext. The only reason to revert revision is for the situation, when build is abandoned and no subsequent build has been started. If subsequent build has been already started, there is no effect of reverting vcsRevisionKey

Parameters:
buildKey -
revisionForBuild -
previousRevision -
Returns:


Copyright © 2010 Atlassian. All Rights Reserved.