com.atlassian.bamboo.plan
Interface Plan

All Superinterfaces:
BambooObject, Describable, DescriptionProvider, NameProvider
All Known Subinterfaces:
Build, Chain
All Known Implementing Classes:
AbstractPlan, BuildObjectForTests, DefaultBuild, DefaultChain, TestBuildObjectForTests

public interface Plan
extends BambooObject, Describable


Field Summary
static int MAX_NUMBER_LOG_ENTRIES
           
static int MAX_PREVIOUS_BUILD_FOR_AVE
           
static java.lang.String STATUS_CURRENTLY_BUILDING
           
static java.lang.String STATUS_FAIL
           
static java.lang.String STATUS_NO_BUILDS
           
static java.lang.String STATUS_NOT_RUN
           
static java.lang.String STATUS_SUCCESS
           
 
Method Summary
 void accept(PlanVisitor planVisitor)
           
 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 getCurrentStatus()
          Retuns a string key as to what the status is.
 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
 boolean isExecuting()
          Is the build currenlty being executed?
 boolean isInBuildQueue()
          Is the build currenlty being built?
 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 setBuildDefinitionXml(BuildDefinitionForBuild buildDefinitionXml)
           
 void setBuildKey(java.lang.String buildKey)
          Define the build's unique key (uppercase alphanumeric)
 void setBuildName(java.lang.String buildName)
           
 void setFirstBuildNumber(int firstBuildNumber)
           
 void setKey(java.lang.String fullKey)
           
 void setLabellings(java.util.List<Labelling> labellings)
           
 void setLastBuildNumber(int lastBuildNumber)
           
 void setLastVcsRevisionKey(java.lang.String lastVcsRevisionKey)
           
 void setNextBuildNumber(int nextBuildNumber)
           
 void setNotificationSet(NotificationSet notificationSet)
           
 void setProject(Project project)
           
 void setRequirementSet(RequirementSet requirementSet)
           
 void setSuspendedFromBuilding(boolean suspendFromBuilding)
          Sets the build to suspend temporarily
 void unMarkForDeletion()
          Build will no longer be marked for deletion
 ErrorCollection validateBuild()
          Validates the build's builder and source code locations
 
Methods inherited from interface com.atlassian.bamboo.core.BambooObject
getId, setId
 
Methods inherited from interface com.atlassian.bamboo.Describable
setDescription, setName
 
Methods inherited from interface com.atlassian.bamboo.utils.DescriptionProvider
getDescription
 

Field Detail

MAX_NUMBER_LOG_ENTRIES

static final int MAX_NUMBER_LOG_ENTRIES
See Also:
Constant Field Values

MAX_PREVIOUS_BUILD_FOR_AVE

static final int MAX_PREVIOUS_BUILD_FOR_AVE
See Also:
Constant Field Values

STATUS_FAIL

static final java.lang.String STATUS_FAIL
See Also:
Constant Field Values

STATUS_SUCCESS

static final java.lang.String STATUS_SUCCESS
See Also:
Constant Field Values

STATUS_CURRENTLY_BUILDING

static final java.lang.String STATUS_CURRENTLY_BUILDING
See Also:
Constant Field Values

STATUS_NO_BUILDS

static final java.lang.String STATUS_NO_BUILDS
See Also:
Constant Field Values

STATUS_NOT_RUN

static final java.lang.String STATUS_NOT_RUN
See Also:
Constant Field Values
Method Detail

getPlanKey

@NotNull
PlanKey getPlanKey()
Get the PlanKey identifier for this Plan

Returns:
planKey

getKey

java.lang.String getKey()
Obtain the build's unique key (uppercase alphanumeric). This includes the project prefix e.g. BAM-MAIN

Returns:
The full key

setKey

void setKey(java.lang.String fullKey)

getBuildKey

java.lang.String getBuildKey()
Thie returns the build portion of the build key

Returns:
String

setBuildKey

void setBuildKey(java.lang.String buildKey)
Define the build's unique key (uppercase alphanumeric)

Parameters:
buildKey - The value of the key

getName

@NotNull
java.lang.String getName()
Returns the full name for the build in the form of "projet name - build name" e.g. "Confluence - HEAD"

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

getBuildName

java.lang.String getBuildName()
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

Returns:
String

setBuildName

void setBuildName(java.lang.String buildName)

validateBuild

ErrorCollection validateBuild()
Validates the build's builder and source code locations

Returns:
and ErrorCollection with relevent error messages

getCurrentStatus

java.lang.String getCurrentStatus()
Retuns a string key as to what the status is. Can be "success", "failure", "current", "none" or "notRun". Mainly used for UI purposes.

Returns:

getSourceCodeDirectory

java.io.File getSourceCodeDirectory()
                                    throws RepositoryException
Returns a file representing the source directory from the Repository

Returns:
file`representing the source directory. null iff an exception has been thrown
Throws:
RepositoryException

isExecuting

boolean isExecuting()
Is the build currenlty being executed?

Returns:
true if build is being executed

markForDeletion

void markForDeletion()
Marks the build to be deleted.


unMarkForDeletion

void unMarkForDeletion()
Build will no longer be marked for deletion


isMarkedForDeletion

boolean isMarkedForDeletion()
Whether or not the build has been marked for deletion

Returns:

setSuspendedFromBuilding

void setSuspendedFromBuilding(boolean suspendFromBuilding)
Sets the build to suspend temporarily

Parameters:
suspendFromBuilding -

isSuspendedFromBuilding

boolean isSuspendedFromBuilding()
Checks if the build has been

Returns:

getLastBuildNumber

int getLastBuildNumber()
What was the number of the lastest build (may be being built)

Returns:
the build number, zero if the build has not been built

getFirstBuildNumber

int getFirstBuildNumber()
What the number of the first build we have? It may not be 1 as some may have been removed!

Returns:
The number of the first build

getBuildDefinition

BuildDefinition getBuildDefinition()
Returns the BuildDefinition that backs this buildd

Returns:
BuildDefinition object. Never null.

getProject

Project getProject()
Returns the parent Project

Returns:
Project. Never null

setProject

void setProject(Project project)

getNextBuildNumber

int getNextBuildNumber()
The next build number represents the number of the next build result that's to be executed

Returns:
a build number, starting with 1

setNextBuildNumber

void setNextBuildNumber(int nextBuildNumber)

setLastBuildNumber

void setLastBuildNumber(int lastBuildNumber)

setFirstBuildNumber

void setFirstBuildNumber(int firstBuildNumber)

getBuildDefinitionXml

BuildDefinitionForBuild getBuildDefinitionXml()

setBuildDefinitionXml

void setBuildDefinitionXml(BuildDefinitionForBuild buildDefinitionXml)

getLabellings

java.util.List<Labelling> getLabellings()

setLabellings

void setLabellings(java.util.List<Labelling> labellings)

getRelatedLabellings

java.util.List<Labelling> getRelatedLabellings()

getNotificationSet

NotificationSet getNotificationSet()

setNotificationSet

void setNotificationSet(NotificationSet notificationSet)

getBuildLogger

BuildLogger getBuildLogger()
Returns the helper object to deal with logging

Returns:
A BuildLogger. @NotNull

getLastVcsRevisionKey

@Nullable
java.lang.String getLastVcsRevisionKey()
The string value representing the last build triggered. Will be null if nothing has been built. The value is parseable by the individual repositories

Returns:

setLastVcsRevisionKey

void setLastVcsRevisionKey(java.lang.String lastVcsRevisionKey)

getRequirementSet

@NotNull
RequirementSet getRequirementSet()

setRequirementSet

void setRequirementSet(RequirementSet requirementSet)

isInBuildQueue

boolean isInBuildQueue()
Is the build currenlty being built?

Returns:
true if is currently in the build pipleline

accept

void accept(PlanVisitor planVisitor)


Copyright © 2010 Atlassian. All Rights Reserved.