|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.bamboo.build.HibernateBuildManager
public class HibernateBuildManager
Constructor Summary | |
---|---|
HibernateBuildManager()
|
Method Summary | |
---|---|
void |
addBuildResults(Build build,
BuildResults buildResults)
|
void |
createBuild(Build build,
BuildConfiguration buildConfiguration,
HibernateAcl acl)
Save a new build object with the passed buildConfiguration |
Project |
createProject(java.lang.String key,
java.lang.String name)
|
void |
deleteBuild(java.lang.String buildKey)
Removes the build from system |
void |
deleteProject(Project project)
|
boolean |
exists(java.lang.String key)
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)
Return a set of Build s that are a subset of the given Build s collection that are favourited by the User |
java.util.Collection<Build> |
getAllBuilds()
Returns a collection of all Build objects |
java.util.Collection<Build> |
getAllBuildsForClone()
|
java.util.Collection<Build> |
getAllBuildsForEdit()
|
java.util.Collection<Build> |
getAllBuildsForRead()
|
java.util.Set<Project> |
getAllProjects()
|
Build |
getBuildById(long id)
Returns the build given the id |
Build |
getBuildByKey(java.lang.String key)
Returns the build given a key |
Build |
getBuildByProjectAndName(java.lang.String projectKey,
java.lang.String buildName)
|
BuildResults |
getBuildResults(Build build,
java.lang.Integer buildNumber)
Return BuildResults for the given Build and buildNumber |
BuildResults |
getBuildResults(java.lang.String planKey,
java.lang.Integer buildNumber)
Return BuildResults for the given planKey and buildNumber |
java.util.Collection<Build> |
getBuildsByProjectForRead(Project project)
This is the manager equivalent of a project.getBuilds. |
java.util.Collection<Build> |
getBuildsForDeletion()
|
java.util.Collection<Build> |
getFavouriteBuildsByProjectForRead(Project project,
com.atlassian.user.User user)
Return a set of favourited builds Build s that belong to Project and @{link User} |
java.util.Collection<Build> |
getFavouriteBuildsForRead(com.atlassian.user.User user)
|
int |
getPlanCount()
How many plans currently exist |
java.util.Map<Project,java.util.Collection<Build>> |
getProjectBuilds(boolean includeEmptyProjects)
Return a map of Build collections which belong to a Project |
Project |
getProjectById(long id)
|
Project |
getProjectByKey(java.lang.String key)
|
Project |
getProjectByName(java.lang.String projectName)
|
boolean |
isAllowBuilding(java.lang.String planKey)
Checks if a particular build is allowed to be built. |
boolean |
isBuildingSuspended()
Checks whether or not bamboo is currently suspended from building due to license reasons. |
boolean |
isExistingBuildKey(java.lang.String givenKey)
Is there an existing build with the same key? |
boolean |
isExistingBuildKey(java.lang.String projectKey,
java.lang.String buildKey)
Returns true if the build key already exists within the given project key |
boolean |
isExistingBuildName(java.lang.String buildName)
|
boolean |
isExistingBuildName(java.lang.String projectKey,
java.lang.String buildName)
Returns true if the build name already exists within the given project key |
boolean |
isExistingProjectKey(java.lang.String projectKey)
|
boolean |
isExistingProjectName(java.lang.String projectName)
|
boolean |
isPlanCreationAllowed()
Check whether or not a plan can be created or not (based on licensing etc) USE SPARINGLY!!! |
boolean |
recheckBuildingSuspended()
Force the build manager to double check if building should be suspended or not. |
java.util.Collection<Build> |
retreiveAllBuilds()
|
java.lang.String |
revertVcsRevisionKey(java.lang.String buildKey,
java.lang.String revisionForBuild,
java.lang.String previousRevision)
Revert lastVcsRevisionKey in build based on previous build revision contained in BuildContext. |
void |
saveBuild(Build build)
Persists a build |
void |
saveProject(Project project)
|
void |
saveSuspendBuild(java.lang.String buildKey,
boolean setSuspendBuild)
Persists a build for enable/disable |
void |
setAclService(org.acegisecurity.acls.MutableAclService aclService)
|
void |
setAdminErrorHandler(AdminErrorHandler adminErrorHandler)
|
void |
setBambooLicenseManager(BambooLicenseManager bambooLicenseManager)
|
void |
setBuildDao(BuildDao buildDao)
|
void |
setBuildDefinitionConverter(BuildDefinitionConverter buildDefinitionConverter)
|
void |
setBuildDefinitionManager(BuildDefinitionManager buildDefinitionManager)
|
void |
setBuildResultsSummaryManager(BuildResultsSummaryManager buildResultsSummaryManager)
|
void |
setEventManager(com.atlassian.event.EventManager eventManager)
|
void |
setLabelManager(LabelManager labelManager)
|
void |
setPlanDao(PlanDao planDao)
|
void |
setPlanDependencyManager(PlanDependencyManager planDependencyManager)
|
void |
setPlanParticleManager(PlanParticleManager planParticleManager)
|
void |
setPlanScheduler(PlanScheduler planScheduler)
|
void |
setProjectManager(ProjectManager projectManager)
|
void |
updateNames(java.lang.String projectName,
java.lang.String buildName,
Build build)
Updates project and plan names. |
void |
updateNamesAndDescription(java.lang.String projectName,
java.lang.String buildName,
java.lang.String description,
Build build)
Updates project and plan names and plan description. |
java.lang.String |
updateVcsRevisionKey(BuildContext buildContext)
Updates lastVcsRevisionKey in build based on revision contained in BuildContext |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HibernateBuildManager()
Method Detail |
---|
@Nullable public Build getBuildByKey(java.lang.String key)
BuildManager
getBuildByKey
in interface BuildManager
key
- - full key of the build. eg. BAM-MAIN null safe
Build
if the key matches. Otherwise nullpublic Build getBuildById(long id)
BuildManager
getBuildById
in interface BuildManager
Build
. null if not found.public java.util.Collection<Build> getAllBuilds()
BuildManager
Build
objects
getAllBuilds
in interface BuildManager
Collections.emptyList()
if none existspublic java.util.Collection<Build> getAllBuildsForRead()
getAllBuildsForRead
in interface BuildManager
public java.util.Collection<Build> retreiveAllBuilds()
retreiveAllBuilds
in interface BuildManager
public java.util.Collection<Build> getAllBuildsForEdit()
getAllBuildsForEdit
in interface BuildManager
public java.util.Collection<Build> getAllBuildsForClone()
getAllBuildsForClone
in interface BuildManager
public java.util.Collection<Build> getBuildsForDeletion()
getBuildsForDeletion
in interface BuildManager
public java.util.Collection<Build> getBuildsByProjectForRead(Project project)
BuildManager
getBuildsByProjectForRead
in interface BuildManager
public java.util.Collection<Build> getFavouriteBuildsForRead(com.atlassian.user.User user)
getFavouriteBuildsForRead
in interface BuildManager
public java.util.Set<Build> filterFavouritedBuilds(@NotNull java.util.Collection<Build> builds, @NotNull com.atlassian.user.User user)
BuildManager
Build
s that are a subset of the given Build
s collection that are favourited by the User
filterFavouritedBuilds
in interface BuildManager
public java.util.Collection<Build> getFavouriteBuildsByProjectForRead(Project project, com.atlassian.user.User user)
BuildManager
Build
s that belong to Project
and @{link User}
getFavouriteBuildsByProjectForRead
in interface BuildManager
public boolean isExistingBuildName(java.lang.String buildName)
public boolean isExistingBuildKey(java.lang.String givenKey)
givenKey
-
public boolean isExistingBuildName(java.lang.String projectKey, java.lang.String buildName)
BuildManager
isExistingBuildName
in interface BuildManager
projectKey
- (doesn't have to exist for this check)buildName
- to check
public boolean isExistingBuildKey(java.lang.String projectKey, java.lang.String buildKey)
BuildManager
isExistingBuildKey
in interface BuildManager
projectKey
- (doesn't have to exist for this check)buildKey
- to check
public boolean exists(java.lang.String key)
BuildManager
exists
in interface BuildManager
public int getPlanCount()
getPlanCount
in interface BuildManager
public boolean isPlanCreationAllowed()
isPlanCreationAllowed
in interface BuildManager
@NotNull public Project createProject(@NotNull java.lang.String key, @NotNull java.lang.String name)
public java.util.Set<Project> getAllProjects()
public Project getProjectByKey(@NotNull java.lang.String key)
public Project getProjectById(long id)
public Project getProjectByName(@NotNull java.lang.String projectName)
public boolean isExistingProjectKey(@NotNull java.lang.String projectKey)
public boolean isExistingProjectName(@NotNull java.lang.String projectName)
public void saveProject(@NotNull Project project)
public void deleteProject(@NotNull Project project)
public void createBuild(Build build, BuildConfiguration buildConfiguration, HibernateAcl acl) throws PlanCreationDeniedException
BuildManager
createBuild
in interface BuildManager
build
- @NotNullbuildConfiguration
- @NotNull
PlanCreationDeniedException
- if the plan can not be created due to licensing.public void saveBuild(Build build)
BuildManager
saveBuild
in interface BuildManager
build
- cannot be nullpublic void saveSuspendBuild(java.lang.String buildKey, boolean setSuspendBuild)
BuildManager
saveSuspendBuild
in interface BuildManager
buildKey
- of the build to be suspended/resumedsetSuspendBuild
- true if the build should be suspended, false if resumedpublic Build getBuildByProjectAndName(java.lang.String projectKey, java.lang.String buildName)
getBuildByProjectAndName
in interface BuildManager
public void updateNames(java.lang.String projectName, java.lang.String buildName, Build build)
BuildManager
updateNames
in interface BuildManager
projectName
- new name of the projectbuildName
- new name of the planbuild
- build object to be modified and stored.public void updateNamesAndDescription(java.lang.String projectName, java.lang.String buildName, @Nullable java.lang.String description, Build build)
updateNamesAndDescription
in interface BuildManager
projectName
- new name of the projectbuildName
- new name of the plandescription
- new plan descriptionbuild
- build object to be modified and stored.public boolean isAllowBuilding(@NotNull java.lang.String planKey)
BuildManager
isAllowBuilding
in interface BuildManager
public void deleteBuild(@NotNull java.lang.String buildKey)
BuildManager
deleteBuild
in interface BuildManager
buildKey
- String name for build@NotNull public java.util.Map<Project,java.util.Collection<Build>> getProjectBuilds(boolean includeEmptyProjects)
BuildManager
Build
collections which belong to a Project
getProjectBuilds
in interface BuildManager
includeEmptyProjects
- set to true if you want all of the projects regardless if they have any builds
public java.lang.String updateVcsRevisionKey(@NotNull BuildContext buildContext)
BuildManager
updateVcsRevisionKey
in interface BuildManager
public java.lang.String revertVcsRevisionKey(@NotNull java.lang.String buildKey, @NotNull java.lang.String revisionForBuild, @Nullable java.lang.String previousRevision)
BuildManager
revertVcsRevisionKey
in interface BuildManager
public void addBuildResults(Build build, BuildResults buildResults)
addBuildResults
in interface BuildManager
@Nullable public BuildResults getBuildResults(Build build, java.lang.Integer buildNumber)
BuildManager
BuildResults
for the given Build
and buildNumber
getBuildResults
in interface BuildManager
public BuildResults getBuildResults(java.lang.String planKey, java.lang.Integer buildNumber)
BuildManager
BuildResults
for the given planKey and buildNumber
getBuildResults
in interface BuildManager
public boolean isBuildingSuspended()
BuildManager
isBuildingSuspended
in interface BuildManager
public boolean recheckBuildingSuspended()
BuildManager
recheckBuildingSuspended
in interface BuildManager
public void setBuildDefinitionConverter(BuildDefinitionConverter buildDefinitionConverter)
public void setBuildDao(BuildDao buildDao)
public void setProjectManager(ProjectManager projectManager)
public void setBuildDefinitionManager(BuildDefinitionManager buildDefinitionManager)
public void setBuildResultsSummaryManager(BuildResultsSummaryManager buildResultsSummaryManager)
public void setAclService(org.acegisecurity.acls.MutableAclService aclService)
public void setEventManager(com.atlassian.event.EventManager eventManager)
public void setLabelManager(LabelManager labelManager)
public void setBambooLicenseManager(BambooLicenseManager bambooLicenseManager)
public void setAdminErrorHandler(AdminErrorHandler adminErrorHandler)
public void setPlanDependencyManager(PlanDependencyManager planDependencyManager)
public void setPlanParticleManager(PlanParticleManager planParticleManager)
public void setPlanScheduler(PlanScheduler planScheduler)
public void setPlanDao(PlanDao planDao)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |