|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.bamboo.build.BuildObjectForTests
public class BuildObjectForTests
Information about a build under Continuous Integration.
Field Summary | |
---|---|
protected java.util.List |
myBuildResultSummaries
|
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 | |
---|---|
BuildObjectForTests()
Simple package constructor for testing |
|
BuildObjectForTests(Repository repository,
java.lang.String name)
Create a build |
|
BuildObjectForTests(Repository repository,
java.lang.String name,
java.lang.String emailAddress)
Create a build |
Method Summary | |
---|---|
void |
addArtifact(Artifact artifact)
Add a new artifact to the existing build artifacts |
java.lang.String |
addBuildLogEntry(LogEntry logEntry)
|
java.lang.String |
addBuildLogEntry(java.lang.String entryDescription)
Add a new entry to the build log |
void |
addBuildResultSummary(BuildResultsSummary buildResultsSummary)
Add the given build results summary to the build. |
void |
clearBuildLog()
|
boolean |
equals(java.lang.Object o)
We're only using the build name to compare builds |
java.util.Collection<Artifact> |
getArtifactDefinitions()
|
java.util.Map |
getArtifacts()
Get the custom Artifact s. |
long |
getAverageBuildDuration()
Returns an average duration of the recent builds |
java.util.List |
getBuildChangedEmailList()
Who wants to know when the build changes? A list of individual email addresses. |
java.lang.String |
getBuildChangedEmails()
Who wants to know when the build changes? One or more email addresses (comma separated list) |
BuildDefinition |
getBuildDefinition()
Returns the BuildDefinition that backs this buildd |
BuildDefinitionForBuild |
getBuildDefinitionXml()
|
Builder |
getBuilder()
Obtain the build's Builder . |
BuilderManager |
getBuilderManager()
|
BuilderV2 |
getBuilderV2()
|
java.lang.String |
getBuildKey()
Thie returns the build portion of the build key |
java.util.Collection |
getBuildLog()
Provide the latest build details. |
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. |
BuildResultsSummaryManager |
getBuildResultsSummaryManager()
|
java.util.List |
getBuildResultSummaries()
Obtains the builds total collection of BuildResultsSummary objects (most
recent first), one for each build. |
BuildStrategy |
getBuildStrategy()
Returns to BuildStrategy that the user actually selects |
java.util.Map |
getConfigObjects()
Returns a map of objects generated by the plugins. |
BuildStrategy |
getCurrentBuildStrategy()
|
java.lang.String |
getCurrentStatus()
Returns the string representation the current status of a build. |
java.util.Map |
getCustomConfiguration()
A map consisting of String key and String value pairs. |
BuildDefinition |
getDefaultBuildDefinition()
|
java.lang.String |
getDescription()
|
java.util.List |
getFieldValueItems()
|
int |
getFirstBuildNumber()
What the number of the first build we have? It may not be 1 as some may have been removed! |
BuildResultsSummary |
getFirstBuildSummary()
Get the first build result |
long |
getId()
|
java.lang.String |
getKey()
Returns key of the project. |
java.util.List<Labelling> |
getLabellings()
|
int |
getLastBuildNumber()
What was the number of the lastest build (may be being built) |
java.util.Date |
getLastBuildStartTime()
When was the last time this build was built? |
java.lang.String |
getLastVcsRevisionKey()
The string value representing the last build triggered. |
BuildResultsSummary |
getLatestBuildSummary()
Get the summary from the latest build |
ResultsSummary |
getLatestResultsSummary()
Get the summary from the latest completed plan |
java.lang.String |
getName()
Obtain the build's name |
int |
getNextBuildNumber()
The next build number represents the number of the next build result that's to be executed |
BuildResults |
getNextBuildResults(int buildNumber)
|
NotificationSet |
getNotificationSet()
|
long |
getNumberOfBuildSummaries()
|
int |
getNumberOfConcurrentlyRunningBuilds()
Gets the number of currently running concurrent build instances for the build |
Plan |
getPlan()
|
PlanKey |
getPlanKey()
Get the PlanKey identifier for this Plan |
java.util.List<Plan> |
getPlans()
Returns all Plan associated with the Project . |
int |
getPollingPeriod()
How long should we wait between checking the build to see if it need building? |
BuildResults |
getPreviousBuildResults(int buildNumber)
Gets the first BuildResultsImpl before the passed number |
Project |
getProject()
Returns the parent Project |
java.util.List<Labelling> |
getRelatedLabellings()
|
Repository |
getRepository()
Obtain the build's Repository . |
RepositoryV2 |
getRepositoryV2()
A repository object that can be used to perform |
RequirementSet |
getRequirementSet()
|
java.io.File |
getSourceCodeDirectory()
Returns a file representing the source directory from the Repository |
java.util.List<TestClass> |
getTestClasses()
|
java.util.List<TopLevelPlan> |
getTopLevelPlans()
This methods returns all TopLevelPlans, including the ones marked for deletion This collection is a lazy relationship for performance reasons. |
java.lang.String |
getType()
|
WebRepositoryViewer |
getWebRepositoryViewer()
Get the module responsible for displaying commits for this build. |
java.lang.String |
getXmlData()
|
XmppMessageSender |
getXmppMessageSender()
The build's option IM message server configuration |
boolean |
hasArtifacts()
|
boolean |
hasBuildResults()
Has the build got any build results to display? |
int |
hashCode()
IntelliJ generated hash |
boolean |
hasTests()
Helper method checking if plan has tests defined |
boolean |
isActive()
Checks if the plan has an active build(s). |
boolean |
isBusy()
Is the Plan busy |
boolean |
isExecuting()
Is the build currenlty being executed? |
boolean |
isInBuildQueue()
Is the build currenlty being built? |
boolean |
isInheritRepository()
Whether the BuildDefinition will use its own Repository or not or
will it use its parents' Repository |
boolean |
isMarkedForDeletion()
|
boolean |
isMarkedForEditBuild()
|
boolean |
isMarkedForManualBuild()
Has a manual build been requested for this build? |
boolean |
isSuspendedFromBuilding()
Checks if the build has been |
void |
markAsNeedingBuilding(ReasonForBuild reasonForBuild)
|
void |
markForDeletion()
|
void |
removeBuildResultSummary(int buildNumber)
Remove buildResultSummary and all persisted files for given build number |
void |
save()
|
void |
setArtifacts(java.util.Map<java.lang.String,Artifact> artifacts)
Replace the build's artifacts with these ones. |
void |
setBuildChangedEmails(java.lang.String emailAddress)
Define who is notified of build results by email |
void |
setBuildDefinition(BuildDefinitionForBuild buildDefinition)
|
void |
setBuildDefinitionXml(BuildDefinitionForBuild buildDefinitionXml)
|
void |
setBuilder(Builder builder)
Set the build's builder. |
void |
setBuilderManager(BuilderManager builderManager)
|
void |
setBuildKey(java.lang.String buildKey)
Define the build's unique key (uppercase alphanumeric) |
void |
setBuildName(java.lang.String buildName)
|
void |
setBuildResultsSummaryManager(BuildResultsSummaryManager buildResultsSummaryManager)
|
void |
setBuildResultSummaries(java.util.List buildResultSummaries)
Legacy left over method (this is the extreme version of build result summaries) |
void |
setBuildStrategy(BuildStrategy buildStrategy)
Set the strategy to override the default build strategy. |
void |
setConfigObjects(java.util.Map configObjects)
|
void |
setCustomConfiguration(java.util.Map configMap)
A map of String key and String value pairs, representing custom |
void |
setDescription(java.lang.String description)
|
void |
setFieldValueItems(java.util.List fieldValueItems)
|
void |
setFirstBuildNumber(int firstBuildNumber)
|
void |
setId(long id)
|
void |
setInBuildQueue(boolean isBuilding)
Set the is-building flag. |
void |
setInheritRepository(boolean inheritRepositoryFromParent)
Sets if the BuildDefinition should use the parents' Repository |
void |
setKey(java.lang.String key)
Sets the key for the project. |
void |
setLabellings(java.util.List labellings)
|
void |
setLastBuildNumber(int lastBuildNumber)
|
void |
setLastBuildStartTime(java.util.Date lastBuildTime)
Set the time of the last build |
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 |
setPlan(Plan build)
|
void |
setPollingPeriod(int pollingPeriod)
How long should we wait between checking the build to see if it need building? |
void |
setProject(Project project)
|
void |
setRepository(Repository repository)
Set the build's source code repository. |
void |
setRequirementSet(RequirementSet requirementSet)
|
void |
setSuspendedFromBuilding(boolean suspendFromBuilding)
Sets the build to suspend temporarily |
void |
setWebRepositoryViewer(WebRepositoryViewer webRepositoryViewer)
Set the module responsibile for displaying commits for this build. |
void |
setWorkingDirectory(java.lang.String buildDirectory)
|
void |
setXmlData(java.lang.String xmlData)
|
void |
setXmppMessageSender(XmppMessageSender xmppMessageSender)
The build's option IM message server configuration |
void |
unmarkBuild()
|
void |
unMarkForDeletion()
|
ErrorCollection |
validateBuild()
Validates the build's builder and source code locations |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.List myBuildResultSummaries
Constructor Detail |
---|
public BuildObjectForTests()
public BuildObjectForTests(Repository repository, java.lang.String name)
repository
- The Repository
containing the buildname
- The name of the buildpublic BuildObjectForTests(Repository repository, java.lang.String name, java.lang.String emailAddress)
repository
- The Repository
containing the buildname
- The name of the buildemailAddress
- The build email notification addressMethod Detail |
---|
public boolean isInheritRepository()
BuildDefinition
BuildDefinition
will use its own Repository
or not or
will it use its parents' Repository
isInheritRepository
in interface BuildDefinition
public void setInheritRepository(boolean inheritRepositoryFromParent)
BuildDefinition
BuildDefinition
should use the parents' Repository
setInheritRepository
in interface BuildDefinition
public java.lang.String getLastVcsRevisionKey()
Plan
getLastVcsRevisionKey
in interface Plan
public void setLastVcsRevisionKey(java.lang.String lastVcsRevisionKey)
setLastVcsRevisionKey
in interface Plan
public BuildLogger getBuildLogger()
Plan
getBuildLogger
in interface Plan
BuildLogger
. @NotNullpublic BuilderV2 getBuilderV2()
getBuilderV2
in interface BuildPlanDefinition
public RepositoryV2 getRepositoryV2()
BuildPlanDefinition
getRepositoryV2
in interface BuildPlanDefinition
public java.util.Collection<Artifact> getArtifactDefinitions()
getArtifactDefinitions
in interface BuildPlanDefinition
public java.lang.String getCurrentStatus()
Project
Build@getCurrentStatus
.
It will return "current" if any plan is building, and "fail" if any plan is failing.
getCurrentStatus
in interface Plan
getCurrentStatus
in interface Project
public java.lang.String getBuildName()
Plan
getBuildName
in interface Plan
public void setBuildName(java.lang.String buildName)
setBuildName
in interface Plan
public BuildDefinitionForBuild getBuildDefinitionXml()
getBuildDefinitionXml
in interface Plan
public void setBuildDefinitionXml(BuildDefinitionForBuild buildDefinitionXml)
setBuildDefinitionXml
in interface Plan
public void setFieldValueItems(java.util.List fieldValueItems)
public void setNextBuildNumber(int nextBuildNumber)
setNextBuildNumber
in interface Plan
public void setLastBuildNumber(int lastBuildNumber)
setLastBuildNumber
in interface Plan
public void setFirstBuildNumber(int firstBuildNumber)
setFirstBuildNumber
in interface Plan
public int getNextBuildNumber()
Plan
getNextBuildNumber
in interface Plan
public void setKey(java.lang.String key)
Project
setKey
in interface Plan
setKey
in interface Project
@NotNull public PlanKey getPlanKey()
Plan
PlanKey
identifier for this Plan
getPlanKey
in interface Plan
public java.lang.String getBuildKey()
Plan
getBuildKey
in interface Plan
public void setProject(Project project)
setProject
in interface Plan
public void setPlan(Plan build)
setPlan
in interface BuildDefinitionForBuild
public void setBuildDefinition(BuildDefinitionForBuild buildDefinition)
public java.lang.String getXmlData()
getXmlData
in interface BuildDefinitionXml
public void setXmlData(java.lang.String xmlData)
setXmlData
in interface BuildDefinitionXml
public BuildDefinition getBuildDefinition()
Plan
BuildDefinition
that backs this buildd
getBuildDefinition
in interface Plan
BuildDefinition
object. Never null.public long getId()
getId
in interface BambooObject
public void setId(long id)
setId
in interface BambooObject
public Project getProject()
Plan
Project
getProject
in interface Plan
Project
. Never nullpublic Plan getPlan()
getPlan
in interface BuildDefinitionForBuild
public BuildStrategy getCurrentBuildStrategy()
public BuildStrategy getBuildStrategy()
BuildDefinition
BuildStrategy
that the user actually selects
getBuildStrategy
in interface BuildDefinition
BuildStrategy
public void save()
public void setBuildStrategy(BuildStrategy buildStrategy)
setBuildStrategy
in interface BuildDefinition
buildStrategy
- The next build strategy to use.public Repository getRepository()
Repository
.
getRepository
in interface BuildDefinition
getRepository
in interface BuildPlanDefinition
public void setRepository(Repository repository)
setRepository
in interface BuildDefinition
repository
- The source repoisitorypublic int getPollingPeriod()
getPollingPeriod
in interface BuildDefinition
public void setPollingPeriod(int pollingPeriod)
setPollingPeriod
in interface BuildDefinition
pollingPeriod
- The time in secondspublic Builder getBuilder()
Builder
.
getBuilder
in interface BuildDefinition
public void setBuilder(Builder builder)
setBuilder
in interface BuildDefinition
builder
- the builderpublic java.lang.String getName()
getName
in interface Plan
getName
in interface Project
getName
in interface DescriptionProvider
getName
in interface NameProvider
public void setName(java.lang.String name)
setName
in interface Describable
setName
in interface Project
public java.lang.String getDescription()
getDescription
in interface DescriptionProvider
public void setDescription(java.lang.String description)
setDescription
in interface Describable
public java.lang.String getKey()
Project
getKey
in interface Plan
getKey
in interface Project
public BuildDefinition getDefaultBuildDefinition()
@NotNull public java.util.List<Plan> getPlans()
Project
Plan
associated with the Project
. Returns Collections.emptyList()
if
there are no Plan
s for the project.
This collection is a lazy relationship for performance reasons.
If you need to guarantee that these collections are available use PlanManager.getPlansByProject(Project, Class)
getPlans
in interface Project
List
of Plan
s. Collections.emptyList()
if no plans.@NotNull public java.util.List<TopLevelPlan> getTopLevelPlans()
Project
PlanManager.getPlansByProject(Project, Class)
Use this method only if all you need is present in TopLevelPlan interface, otherwise consider using getAllChains.
getTopLevelPlans
in interface Project
public java.util.List<Labelling> getLabellings()
getLabellings
in interface Plan
getLabellings
in interface Project
public java.util.List<Labelling> getRelatedLabellings()
getRelatedLabellings
in interface Plan
getRelatedLabellings
in interface Project
public void setLabellings(java.util.List labellings)
setLabellings
in interface Plan
setLabellings
in interface Project
public void setBuildKey(java.lang.String buildKey)
Plan
setBuildKey
in interface Plan
buildKey
- The value of the keypublic java.lang.String getBuildChangedEmails()
getBuildChangedEmails
in interface BuildDefinition
public void setBuildChangedEmails(java.lang.String emailAddress)
setBuildChangedEmails
in interface BuildDefinition
emailAddress
- The build email addresspublic java.util.List getBuildChangedEmailList()
getBuildChangedEmailList
in interface BuildDefinition
public int getLastBuildNumber()
getLastBuildNumber
in interface Plan
public int getFirstBuildNumber()
getFirstBuildNumber
in interface Plan
public void addBuildResultSummary(BuildResultsSummary buildResultsSummary)
addBuildResultSummary
in interface Buildable
buildResultsSummary
- The build summarypublic void setBuildResultSummaries(java.util.List buildResultSummaries)
buildResultSummaries
- public java.util.List getBuildResultSummaries()
BuildResultsSummary
objects (most
recent first), one for each build.
EW 01/11/2006 - Moved to a hibernated source for build result summaries.
getBuildResultSummaries
in interface Buildable
public void setInBuildQueue(boolean isBuilding)
isBuilding
- Is the build currently in the build pipeline?public boolean isInBuildQueue()
isInBuildQueue
in interface Buildable
public int getNumberOfConcurrentlyRunningBuilds()
Buildable
getNumberOfConcurrentlyRunningBuilds
in interface Buildable
public boolean isActive()
Plan
isActive
in interface Plan
public boolean isExecuting()
Plan
isExecuting
in interface Plan
public java.util.Date getLastBuildStartTime()
public void setLastBuildStartTime(java.util.Date lastBuildTime)
lastBuildTime
- the timepublic void setWorkingDirectory(java.lang.String buildDirectory)
setWorkingDirectory
in interface BuildDefinition
public boolean hasBuildResults()
hasBuildResults
in interface Buildable
public boolean hasArtifacts()
public java.util.Map getArtifacts()
BuildDefinition
Artifact
s.
getArtifacts
in interface BuildDefinition
public void setArtifacts(java.util.Map<java.lang.String,Artifact> artifacts)
BuildDefinition
setArtifacts
in interface BuildDefinition
public void addArtifact(Artifact artifact)
BuildDefinition
addArtifact
in interface BuildDefinition
public java.util.Map getCustomConfiguration()
BuildDefinition
getCustomConfiguration
in interface BuildDefinition
getCustomConfiguration
in interface BuildPlanDefinition
public void setCustomConfiguration(java.util.Map configMap)
BuildDefinition
setCustomConfiguration
in interface BuildDefinition
configMap
- - can be nullpublic BuildResultsSummary getLatestBuildSummary()
getLatestBuildSummary
in interface Buildable
public ResultsSummary getLatestResultsSummary()
Plan
getLatestResultsSummary
in interface Plan
public BuildResultsSummary getFirstBuildSummary()
Buildable
getFirstBuildSummary
in interface Buildable
public long getNumberOfBuildSummaries()
public XmppMessageSender getXmppMessageSender()
BuildDefinition
getXmppMessageSender
in interface BuildDefinition
public void setXmppMessageSender(XmppMessageSender xmppMessageSender)
BuildDefinition
setXmppMessageSender
in interface BuildDefinition
public java.util.Collection getBuildLog()
public java.lang.String addBuildLogEntry(java.lang.String entryDescription)
entryDescription
- The entry to addpublic java.lang.String addBuildLogEntry(LogEntry logEntry)
public boolean isMarkedForManualBuild()
public boolean isMarkedForEditBuild()
public void markAsNeedingBuilding(ReasonForBuild reasonForBuild)
public void unmarkBuild()
public ErrorCollection validateBuild()
Plan
validateBuild
in interface Plan
ErrorCollection
with relevent error messagespublic java.util.List getFieldValueItems()
public java.io.File getSourceCodeDirectory() throws RepositoryException
Plan
Repository
getSourceCodeDirectory
in interface Plan
RepositoryException
public long getAverageBuildDuration()
Plan
getAverageBuildDuration
in interface Plan
public BuildResults getPreviousBuildResults(int buildNumber)
Buildable
BuildResultsImpl
before the passed number
getPreviousBuildResults
in interface Buildable
BuildResultsImpl
. null if no build results can be found before that
numberpublic BuildResults getNextBuildResults(int buildNumber)
getNextBuildResults
in interface Buildable
public void markForDeletion()
public void unMarkForDeletion()
public boolean isMarkedForDeletion()
isMarkedForDeletion
in interface Deletable
public void setMarkedForDeletion(boolean markedForDeletion)
setMarkedForDeletion
in interface Deletable
public void setSuspendedFromBuilding(boolean suspendFromBuilding)
Plan
setSuspendedFromBuilding
in interface Plan
public boolean isSuspendedFromBuilding()
Plan
isSuspendedFromBuilding
in interface Plan
public void clearBuildLog()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- object we are comparing
public int hashCode()
hashCode
in class java.lang.Object
public BuilderManager getBuilderManager()
public void setBuilderManager(BuilderManager builderManager)
public BuildResultsSummaryManager getBuildResultsSummaryManager()
public void setBuildResultsSummaryManager(BuildResultsSummaryManager buildResultsSummaryManager)
public NotificationSet getNotificationSet()
getNotificationSet
in interface TopLevelPlan
public void setNotificationSet(NotificationSet notificationSet)
setNotificationSet
in interface TopLevelPlan
@NotNull public RequirementSet getRequirementSet()
getRequirementSet
in interface Buildable
public void setRequirementSet(RequirementSet requirementSet)
setRequirementSet
in interface Buildable
public boolean isBusy()
Plan
Plan
busy
isBusy
in interface Plan
public void removeBuildResultSummary(int buildNumber)
Buildable
removeBuildResultSummary
in interface Buildable
public java.util.Map getConfigObjects()
BuildDefinition
getConfigObjects
in interface BuildDefinition
Map
with a String
as a key and an arbritary objects as the value.public void setConfigObjects(java.util.Map configObjects)
setConfigObjects
in interface BuildDefinition
public WebRepositoryViewer getWebRepositoryViewer()
getWebRepositoryViewer
in interface BuildDefinition
public void setWebRepositoryViewer(@Nullable WebRepositoryViewer webRepositoryViewer)
setWebRepositoryViewer
in interface BuildDefinition
webRepositoryViewer
- the class responsible for rendering the commits for a build result@NotNull public java.util.List<TestClass> getTestClasses()
@NotNull public java.lang.String getType()
getType
in interface Plan
public boolean hasTests()
Plan
hasTests
in interface Plan
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |