Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.atlassian.bamboo.build
Interface Build

All Superinterfaces:
  BambooObject

All Known Implementing Classes:
  DefaultBuild, LegacyBuildObject, LegacyBuildObjectFor110, LegacyTestBuildObject, UpgradeTask102BuildObject

    public interface Build

extends BambooObject

This interface describes a Bamboo Build.

Field Summary
`static int` | `MAX_NUMBER_LOG_ENTRIES`
`static int` | `MAX_PREVIOUS_BUILD_FOR_AVE`
`static String` | `STATUS_CURRENTLY_BUILDING`
`static String` | `STATUS_FAIL`
`static String` | `STATUS_NO_BUILDS`
`static String` | `STATUS_SUCCESS`

Method Summary
`String` | `addBuildLogEntry(LogEntry logEntry)` Add a new build log entry.
`void` | `addBuildResultSummary(BuildResultsSummary buildResultsSummary)` Add the given build results summary to the build.
`void` | `clearBuildLog()` Reset the build log, ready for the next build
`long` | `getAverageBuildDuration()` Returns an average duration of the recent builds
`BuildDefinition` | `getBuildDefinition()` Returns the `BuildDefinition` that backs this buildd
`BuildDefinitionForBuild` | `getBuildDefinitionXml()`
`String` | `getBuildKey()` Thie returns the build portion of the build key
`List` | `getBuildLog()` Provide the latest build details.
`String` | `getBuildName()`
`List` | `getBuildResultSummaries()` Obtains the builds total collection of `BuildResultsSummary` objects (oldest first), one for each build.
`Set` | `getChildBuilds()`
`BuildStrategy` | `getCurrentBuildStrategy()` What is the builds current `BuildStrategy`? It uses the value once and then reverts back to the default strategy.
`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!
`BuildResultsSummary` | `getFirstBuildSummary()`
`String` | `getKey()` Obtain the build's unique key (uppercase alphanumeric).
`List` | `getLabellings()`
`int` | `getLastBuildNumber()` What was the number of the lastest build (may be being built)
`Date` | `getLastBuildStartTime()` When was the last time this build was built?
`BuildResultsSummary` | `getLatestBuildSummary()` Get the summary from the latest build
`String` | `getName()` Returns the full name for the build in the form of "projet name - build name" e.g.
`int` | `getNextBuildNumber()`
`BuildResults` | `getNextBuildResults(int buildNumber)`
`Set` | `getParentBuilds()`
`BuildResults` | `getPreviousBuildResults(int buildNumber)` Gets the first `BuildResultsImpl` before the passed number
`Project` | `getProject()` Returns the parent `Project`
`File` | `getSourceCodeDirectory()` Returns a file representing the source directory from the `Repository`
`boolean` | `hasBuildResults()` Has the build got any build results to display?
`boolean` | `isInBuildQueue()` Is the build currenlty being built?
`boolean` | `isMarkedForDeletion()` Whether or not the build has been marked for deletion
`boolean` | `isMarkedForDependencyBuild()` Has the build been marked for a build following a dependent build having completed?
`boolean` | `isMarkedForEditBuild()` Has the build been marked for a build following an edit?
`boolean` | `isMarkedForManualBuild()` Has the build been marked for a manual build?
`boolean` | `isSuspendedFromBuilding()` Checks if the build has been
`void` | `markAsNeedingBuilding(ReasonForBuild reasonForBuild)` Mark the build to force a build next time it's checked.
`void` | `markForDeletion()` Marks the build to be deleted.
`void` | `removeBuildResultSummary(long buildNumber)` Remove the given build summary from the build
`int` | `retrieveNextBuildNumber()`
`void` | `setBuildDefinitionXml(BuildDefinitionForBuild buildDefinitionXml)`
`void` | `setBuildKey(String buildKey)` Define the build's unique key (uppercase alphanumeric)
`void` | `setBuildName(String buildName)`
`void` | `setChildBuilds(Set childBuilds)`
`void` | `setFirstBuildNumber(int firstBuildNumber)`
`void` | `setInBuildQueue(boolean isBuilding)` Set the is-building flag.
`void` | `setKey(String fullKey)`
`void` | `setLabellings(List labellings)`
`void` | `setLastBuildNumber(int lastBuildNumber)`
`void` | `setLastBuildStartTime(Date lastBuildTime)` Set the time of the last build
`void` | `setNextBuildNumber(int nextBuildNumber)`
`void` | `setParentBuilds(Set parentBuilds)`
`void` | `setProject(Project project)`
`void` | `setSuspendedFromBuilding(boolean suspendFromBuilding)` Sets the build to suspend temporarily
`void` | `unmarkBuild()` Clear all the build flags.
`ErrorCollection` | `validateBuild()` Validates the build's builder and source code locations

Methods inherited from interface com.atlassian.bamboo.core.BambooObject
`getId, setId`

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 String STATUS_FAIL

See Also:
  Constant Field Values

### STATUS_SUCCESS

    static final String STATUS_SUCCESS

See Also:
  Constant Field Values

### STATUS_CURRENTLY_BUILDING

    static final String STATUS_CURRENTLY_BUILDING

See Also:
  Constant Field Values

### STATUS_NO_BUILDS

    static final String STATUS_NO_BUILDS

See Also:
  Constant Field Values

Method Detail

### getKey

    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(String fullKey)

### getBuildKey

    String getBuildKey()

  Thie returns the build portion of the build key

  Returns:
    String

### setBuildKey

    void setBuildKey(String buildKey)

  Define the build's unique key (uppercase alphanumeric)

  Parameters:
    `buildKey` - The value of the key

### getName

    String getName()

  Returns the full name for the build in the form of "projet name - build name" e.g. "Confluence - HEAD"

  Returns:
    String @NotNull

### getBuildName

    String getBuildName()

### setBuildName

    void setBuildName(String buildName)

### validateBuild

    ErrorCollection validateBuild()

  Validates the build's builder and source code locations

  Returns:
    and `ErrorCollection` with relevent error messages

### getCurrentStatus

    String getCurrentStatus()

  Retuns a string key as to what the status is. Can be "success", "failure" or "current". Mainly used for UI purposes.

  Returns:

### getCurrentBuildStrategy

    BuildStrategy getCurrentBuildStrategy()

  What is the builds current `BuildStrategy`?

  It uses the value once and then reverts back to the default strategy. This lets you override the strategy once and the system will revert to the default behaviour.

  Returns:
    The currect build strategy

### getAverageBuildDuration

    long getAverageBuildDuration()

  Returns an average duration of the recent builds

  Returns:
    The duration in milliseconds

### getSourceCodeDirectory

    File getSourceCodeDirectory()

  Returns a file representing the source directory from the `Repository`

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

### isInBuildQueue

    boolean isInBuildQueue()

  Is the build currenlty being built?

  Returns:
    true iff is currently in the build pipleline

### setInBuildQueue

    void setInBuildQueue(boolean isBuilding)

  Set the is-building flag.

  Parameters:
    `isBuilding` - Is the build currently in the build pipeline?

### isMarkedForManualBuild

    boolean isMarkedForManualBuild()

  Has the build been marked for a manual build?

  Returns:
    true iff it is has been marked for a manual build

### isMarkedForEditBuild

    boolean isMarkedForEditBuild()

  Has the build been marked for a build following an edit?

  Returns:
    true iff it is has been marked for an edit build

### isMarkedForDependencyBuild

    boolean isMarkedForDependencyBuild()

  Has the build been marked for a build following a dependent build having completed?

  Returns:

### markAsNeedingBuilding

    void markAsNeedingBuilding(ReasonForBuild reasonForBuild)

  Mark the build to force a build next time it's checked.

  Parameters:
    `reasonForBuild` - The reason we want to build the build

### unmarkBuild

    void unmarkBuild()

  Clear all the build flags.

### markForDeletion

    void markForDeletion()

  Marks the build to be deleted.

### 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:

### getBuildLog

    List getBuildLog()

  Provide the latest build details. This is not persisted.

  Returns:
    The collection of `SimpleLogEntry`s. Never returns null.

### addBuildLogEntry

    String addBuildLogEntry(LogEntry logEntry)

  Add a new build log entry. This will get appended to the end of the log.

  Parameters:
    `logEntry` - The data being logged
  Returns:
    The line of text being logged. From `LogEntry.getUnstyledLog()`.

### clearBuildLog

    void clearBuildLog()

  Reset the build log, ready for the next build

### getBuildResultSummaries

    List getBuildResultSummaries()

  Obtains the builds total collection of `BuildResultsSummary` objects (oldest first), one for each build.

  Returns:
    The collection of build summary objects

### getLatestBuildSummary

    BuildResultsSummary getLatestBuildSummary()

  Get the summary from the latest build

  Returns:
    The summary info for the last completed build. Returns null if there are no build results for this build

### 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

### getFirstBuildSummary

    BuildResultsSummary getFirstBuildSummary()

### getLastBuildStartTime

    Date getLastBuildStartTime()

  When was the last time this build was built?

  Returns:
    The date, null if it has not been build.

### setLastBuildStartTime

    void setLastBuildStartTime(Date lastBuildTime)

  Set the time of the last build

  Parameters:
    `lastBuildTime` - the time

### hasBuildResults

    boolean hasBuildResults()

  Has the build got any build results to display?

  Returns:
    true if the build has been built, false otherwise

### addBuildResultSummary

    void addBuildResultSummary(BuildResultsSummary buildResultsSummary)

  Add the given build results summary to the build.

  Parameters:
    `buildResultsSummary` - The build summary

### removeBuildResultSummary

    void removeBuildResultSummary(long buildNumber)

  Remove the given build summary from the build

  Parameters:
    `buildNumber` - the number of the build to delete

### getPreviousBuildResults

    BuildResults getPreviousBuildResults(int buildNumber)

  Gets the first `BuildResultsImpl` before the passed number

  Parameters:
    `buildNumber` -
  Returns:
    `BuildResultsImpl`. null if no build results can be found before that number

### getNextBuildResults

    BuildResults getNextBuildResults(int buildNumber)

### 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)

### retrieveNextBuildNumber

    int retrieveNextBuildNumber()

### setNextBuildNumber

    void setNextBuildNumber(int nextBuildNumber)

### getNextBuildNumber

    int getNextBuildNumber()

### setLastBuildNumber

    void setLastBuildNumber(int lastBuildNumber)

### setFirstBuildNumber

    void setFirstBuildNumber(int firstBuildNumber)

### getBuildDefinitionXml

    BuildDefinitionForBuild getBuildDefinitionXml()

### setBuildDefinitionXml

    void setBuildDefinitionXml(BuildDefinitionForBuild buildDefinitionXml)

### getLabellings

    List getLabellings()

### setLabellings

    void setLabellings(List labellings)

### getParentBuilds

    Set getParentBuilds()

### setParentBuilds

    void setParentBuilds(Set parentBuilds)

### getChildBuilds

    Set getChildBuilds()

### setChildBuilds

    void setChildBuilds(Set childBuilds)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006 Atlassian Software Systems. All Rights Reserved.