com.atlassian.bamboo.plan
Class AbstractPlan

java.lang.Object
  extended by com.atlassian.core.bean.EntityObject
      extended by com.atlassian.bamboo.core.BambooEntityObject
          extended by com.atlassian.bamboo.plan.AbstractPlan
All Implemented Interfaces:
BambooObject, Describable, Plan, DescriptionProvider, NameProvider, java.lang.Cloneable, java.lang.Comparable<Plan>
Direct Known Subclasses:
DefaultBuild, DefaultChain

public abstract class AbstractPlan
extends BambooEntityObject
implements Plan, java.lang.Comparable<Plan>


Field Summary
 
Fields inherited from class com.atlassian.bamboo.core.BambooEntityObject
id
 
Fields inherited from interface com.atlassian.bamboo.plan.Plan
MAX_NUMBER_LOG_ENTRIES, MAX_PREVIOUS_BUILD_FOR_AVE, STATUS_CURRENTLY_BUILDING, STATUS_FAIL, STATUS_NO_BUILDS, STATUS_NOT_RUN, STATUS_SUCCESS
 
Constructor Summary
AbstractPlan()
           
 
Method Summary
 int compareTo(Plan plan)
           
 boolean equals(java.lang.Object o)
           
 BuildDefinition getBuildDefinition()
          Returns the BuildDefinition that backs this buildd
 BuildDefinitionForBuild getBuildDefinitionXml()
           
 java.lang.String getBuildKey()
          Thie returns the build portion of the build key
 BuildLogger getBuildLogger()
          Returns the helper object to deal with logging
 java.lang.String getBuildName()
          Returns the name for the build in the form of "build name" e.g.
 java.lang.String getDescription()
           
 int getFirstBuildNumber()
          What the number of the first build we have? It may not be 1 as some may have been removed!
 java.lang.String getKey()
          Obtain the build's unique key (uppercase alphanumeric).
 java.util.List<Labelling> getLabellings()
           
 int getLastBuildNumber()
          What was the number of the lastest build (may be being built)
 java.lang.String getLastVcsRevisionKey()
          The string value representing the last build triggered.
 java.lang.String getName()
          Returns the full name for the build in the form of "projet name - build name" e.g.
 int getNextBuildNumber()
          The next build number represents the number of the next build result that's to be executed
 NotificationSet getNotificationSet()
           
 PlanKey getPlanKey()
          Get the PlanKey identifier for this Plan
 Project getProject()
          Returns the parent Project
 java.util.List<Labelling> getRelatedLabellings()
           
 RequirementSet getRequirementSet()
           
 java.io.File getSourceCodeDirectory()
          Returns a file representing the source directory from the Repository
 int hashCode()
           
 boolean isMarkedForDeletion()
          Whether or not the build has been marked for deletion
 boolean isSuspendedFromBuilding()
          Checks if the build has been
 void markForDeletion()
          Marks the build to be deleted.
 void setBuildDefinitionManager(BuildDefinitionManager buildDefinitionManager)
           
 void setBuildDefinitionXml(BuildDefinitionForBuild buildDefinitionXml)
           
 void setBuildKey(java.lang.String buildKey)
          Define the build's unique key (uppercase alphanumeric)
 void setBuildLoggerManager(BuildLoggerManager buildLoggerManager)
           
 void setBuildName(java.lang.String buildName)
           
 void setDescription(java.lang.String description)
           
 void setFirstBuildNumber(int firstBuildNumber)
           
 void setKey(java.lang.String key)
           
 void setLabellings(java.util.List<Labelling> labellings)
           
 void setLastBuildNumber(int lastBuildNumber)
           
 void setLastVcsRevisionKey(java.lang.String lastVcsRevisionKey)
           
 void setMarkedForDeletion(boolean markedForDeletion)
           
 void setName(java.lang.String name)
           
 void setNextBuildNumber(int nextBuildNumber)
           
 void setNotificationSet(NotificationSet notificationSet)
           
 void setProject(Project project)
           
 void setRequirementSet(RequirementSet requirementSet)
           
 void setSuspendedFromBuilding(boolean suspendedFromBuilding)
          Sets the build to suspend temporarily
 void unMarkForDeletion()
          Build will no longer be marked for deletion
 
Methods inherited from class com.atlassian.bamboo.core.BambooEntityObject
getId, setId
 
Methods inherited from class com.atlassian.core.bean.EntityObject
clone, getCreationDate, getCurrentDate, getLastModificationDate, setClock, setCreationDate, setLastModificationDate
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.atlassian.bamboo.plan.Plan
accept, getCurrentStatus, isExecuting, isInBuildQueue, validateBuild
 
Methods inherited from interface com.atlassian.bamboo.core.BambooObject
getId, setId
 

Constructor Detail

AbstractPlan

public AbstractPlan()
Method Detail

getPlanKey

@NotNull
public PlanKey getPlanKey()
Description copied from interface: Plan
Get the PlanKey identifier for this Plan

Specified by:
getPlanKey in interface Plan
Returns:
planKey

getKey

public java.lang.String getKey()
Description copied from interface: Plan
Obtain the build's unique key (uppercase alphanumeric). This includes the project prefix e.g. BAM-MAIN

Specified by:
getKey in interface Plan
Returns:
The full key

setKey

public void setKey(java.lang.String key)
Specified by:
setKey in interface Plan

getBuildKey

public java.lang.String getBuildKey()
Description copied from interface: Plan
Thie returns the build portion of the build key

Specified by:
getBuildKey in interface Plan
Returns:
String

setBuildKey

public void setBuildKey(java.lang.String buildKey)
Description copied from interface: Plan
Define the build's unique key (uppercase alphanumeric)

Specified by:
setBuildKey in interface Plan
Parameters:
buildKey - The value of the key

getName

public java.lang.String getName()
Description copied from interface: Plan
Returns the full name for the build in the form of "projet name - build name" e.g. "Confluence - HEAD"

Specified by:
getName in interface Plan
Specified by:
getName in interface DescriptionProvider
Specified by:
getName in interface NameProvider
Returns:
String

setName

public void setName(java.lang.String name)
Specified by:
setName in interface Describable

getBuildName

public java.lang.String getBuildName()
Description copied from interface: Plan
Returns the name for the build in the form of "build name" e.g. if the full name was "Confluence - HEAD" the build name would be HEAD

Specified by:
getBuildName in interface Plan
Returns:
String

setBuildName

public void setBuildName(java.lang.String buildName)
Specified by:
setBuildName in interface Plan

getDescription

public java.lang.String getDescription()
Specified by:
getDescription in interface DescriptionProvider

setDescription

public void setDescription(@Nullable
                           java.lang.String description)
Specified by:
setDescription in interface Describable

getSourceCodeDirectory

public java.io.File getSourceCodeDirectory()
                                    throws RepositoryException
Description copied from interface: Plan
Returns a file representing the source directory from the Repository

Specified by:
getSourceCodeDirectory in interface Plan
Returns:
file`representing the source directory. null iff an exception has been thrown
Throws:
RepositoryException

markForDeletion

public void markForDeletion()
Description copied from interface: Plan
Marks the build to be deleted.

Specified by:
markForDeletion in interface Plan

unMarkForDeletion

public void unMarkForDeletion()
Description copied from interface: Plan
Build will no longer be marked for deletion

Specified by:
unMarkForDeletion in interface Plan

isMarkedForDeletion

public boolean isMarkedForDeletion()
Description copied from interface: Plan
Whether or not the build has been marked for deletion

Specified by:
isMarkedForDeletion in interface Plan
Returns:

setMarkedForDeletion

public void setMarkedForDeletion(boolean markedForDeletion)

setSuspendedFromBuilding

public void setSuspendedFromBuilding(boolean suspendedFromBuilding)
Description copied from interface: Plan
Sets the build to suspend temporarily

Specified by:
setSuspendedFromBuilding in interface Plan

isSuspendedFromBuilding

public boolean isSuspendedFromBuilding()
Description copied from interface: Plan
Checks if the build has been

Specified by:
isSuspendedFromBuilding in interface Plan
Returns:

getBuildLogger

public BuildLogger getBuildLogger()
Description copied from interface: Plan
Returns the helper object to deal with logging

Specified by:
getBuildLogger in interface Plan
Returns:
A BuildLogger. @NotNull

getLastBuildNumber

public int getLastBuildNumber()
Description copied from interface: Plan
What was the number of the lastest build (may be being built)

Specified by:
getLastBuildNumber in interface Plan
Returns:
the build number, zero if the build has not been built

getFirstBuildNumber

public int getFirstBuildNumber()
Description copied from interface: Plan
What the number of the first build we have? It may not be 1 as some may have been removed!

Specified by:
getFirstBuildNumber in interface Plan
Returns:
The number of the first build

setLastBuildNumber

public void setLastBuildNumber(int lastBuildNumber)
Specified by:
setLastBuildNumber in interface Plan

setFirstBuildNumber

public void setFirstBuildNumber(int firstBuildNumber)
Specified by:
setFirstBuildNumber in interface Plan

getLastVcsRevisionKey

public java.lang.String getLastVcsRevisionKey()
Description copied from interface: Plan
The string value representing the last build triggered. Will be null if nothing has been built. The value is parseable by the individual repositories

Specified by:
getLastVcsRevisionKey in interface Plan
Returns:

setLastVcsRevisionKey

public void setLastVcsRevisionKey(java.lang.String lastVcsRevisionKey)
Specified by:
setLastVcsRevisionKey in interface Plan

setProject

public void setProject(Project project)
Specified by:
setProject in interface Plan

getNextBuildNumber

public int getNextBuildNumber()
Description copied from interface: Plan
The next build number represents the number of the next build result that's to be executed

Specified by:
getNextBuildNumber in interface Plan
Returns:
a build number, starting with 1

setNextBuildNumber

public void setNextBuildNumber(int nextBuildNumber)
Specified by:
setNextBuildNumber in interface Plan

getBuildDefinition

public BuildDefinition getBuildDefinition()
Description copied from interface: Plan
Returns the BuildDefinition that backs this buildd

Specified by:
getBuildDefinition in interface Plan
Returns:
BuildDefinition object. Never null.

getProject

public Project getProject()
Description copied from interface: Plan
Returns the parent Project

Specified by:
getProject in interface Plan
Returns:
Project. Never null

getBuildDefinitionXml

public BuildDefinitionForBuild getBuildDefinitionXml()
Specified by:
getBuildDefinitionXml in interface Plan

setBuildDefinitionXml

public void setBuildDefinitionXml(BuildDefinitionForBuild buildDefinitionXml)
Specified by:
setBuildDefinitionXml in interface Plan

getLabellings

public java.util.List<Labelling> getLabellings()
Specified by:
getLabellings in interface Plan

getRelatedLabellings

public java.util.List<Labelling> getRelatedLabellings()
Specified by:
getRelatedLabellings in interface Plan

setLabellings

public void setLabellings(java.util.List<Labelling> labellings)
Specified by:
setLabellings in interface Plan

getNotificationSet

public NotificationSet getNotificationSet()
Specified by:
getNotificationSet in interface Plan

setNotificationSet

public void setNotificationSet(NotificationSet notificationSet)
Specified by:
setNotificationSet in interface Plan

getRequirementSet

@NotNull
public RequirementSet getRequirementSet()
Specified by:
getRequirementSet in interface Plan

setRequirementSet

public void setRequirementSet(RequirementSet requirementSet)
Specified by:
setRequirementSet in interface Plan

setBuildDefinitionManager

public void setBuildDefinitionManager(BuildDefinitionManager buildDefinitionManager)

setBuildLoggerManager

public void setBuildLoggerManager(BuildLoggerManager buildLoggerManager)

hashCode

public int hashCode()
Overrides:
hashCode in class com.atlassian.core.bean.EntityObject

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class com.atlassian.core.bean.EntityObject

compareTo

public int compareTo(Plan plan)
Specified by:
compareTo in interface java.lang.Comparable<Plan>


Copyright © 2010 Atlassian. All Rights Reserved.