Class HistoryBuildSnapshot
- java.lang.Object
-
- jetbrains.buildServer.serverSide.impl.history.HistoryBuildSnapshot
-
- All Implemented Interfaces:
HistoryBuild
public class HistoryBuildSnapshot extends Object implements HistoryBuild
- Author:
- Pavel.Sher
-
-
Constructor Summary
Constructors Constructor Description HistoryBuildSnapshot(BuildStatisticsPrinterFactory buildStatisticsPrinterFactory, RunningBuildEx build)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DateconvertToServerTime(Date clientTime)StringgetAgentName()intgetAgentTypeId()StringgetBuildDescription()longgetBuildId()StringgetBuildNumber()BuildPromotiongetBuildPromotion()Returns promotion state associated with this build.StatusgetBuildStatus()StringgetBuildTypeId()CanceledInfogetCanceledInfo()DategetClientStartDate()StringgetFinalStatusText()StringgetFullName()StringgetProjectId()DategetQueuedDate()When the build was added to queue.StringgetRawTriggeredBy()DategetRemoveFromQueueDate()DategetServerStartDate()When the build was removed from queue and started.ShortStatisticsgetShortStatistics()Returns a "short" statistics for the build (including information about failed/successful tests, compilation errors), seeShortStatistics.DategetStartDate()booleanisPersonal()
-
-
-
Constructor Detail
-
HistoryBuildSnapshot
public HistoryBuildSnapshot(@NotNull BuildStatisticsPrinterFactory buildStatisticsPrinterFactory, @NotNull RunningBuildEx build)
-
-
Method Detail
-
getFinalStatusText
@NotNull public String getFinalStatusText()
- Specified by:
getFinalStatusTextin interfaceHistoryBuild
-
getCanceledInfo
@Nullable public CanceledInfo getCanceledInfo()
- Specified by:
getCanceledInfoin interfaceHistoryBuild- Returns:
- build cancellation information if the build was cancelled, null otherwise
-
getFullName
public String getFullName()
- Specified by:
getFullNamein interfaceHistoryBuild- Returns:
- full name of the
-
getClientStartDate
@Nullable public Date getClientStartDate()
- Specified by:
getClientStartDatein interfaceHistoryBuild
-
convertToServerTime
@NotNull public Date convertToServerTime(@NotNull Date clientTime)
- Specified by:
convertToServerTimein interfaceHistoryBuild
-
getStartDate
@NotNull public Date getStartDate()
- Specified by:
getStartDatein interfaceHistoryBuild
-
getRemoveFromQueueDate
@NotNull public Date getRemoveFromQueueDate()
- Specified by:
getRemoveFromQueueDatein interfaceHistoryBuild
-
getBuildStatus
public Status getBuildStatus()
- Specified by:
getBuildStatusin interfaceHistoryBuild- Returns:
- current build status (success, fail, etc)
-
getShortStatistics
public ShortStatistics getShortStatistics()
Description copied from interface:HistoryBuildReturns a "short" statistics for the build (including information about failed/successful tests, compilation errors), seeShortStatistics.This function doesn't guarantee that the returned statistics will actuial at this time. In opposite, if another thread is changing build informaition at the same time, this function returns a bit old data but does it quickly.
This behaviour is needed because a lot of UI pages required this statistics, often for many build for one page, so making this function providing always actual data will couse a seriouse performance problem.
- Specified by:
getShortStatisticsin interfaceHistoryBuild- Returns:
- short build statistics.
-
getBuildDescription
@Nullable public String getBuildDescription()
- Specified by:
getBuildDescriptionin interfaceHistoryBuild- Returns:
- explicit build description line, which was set explicitly to the build, if such description exists and null otherwise.
-
getAgentName
@NotNull public String getAgentName()
- Specified by:
getAgentNamein interfaceHistoryBuild- Returns:
- build agent name which is build is run on
-
getAgentTypeId
public int getAgentTypeId()
- Specified by:
getAgentTypeIdin interfaceHistoryBuild- Returns:
- agent type id of the associated agent
-
isPersonal
public boolean isPersonal()
- Specified by:
isPersonalin interfaceHistoryBuild- Returns:
- true if this build is personal one, like remote run or pre-tested commit
-
getBuildNumber
public String getBuildNumber()
- Specified by:
getBuildNumberin interfaceHistoryBuild- Returns:
- build number
-
getRawTriggeredBy
public String getRawTriggeredBy()
- Specified by:
getRawTriggeredByin interfaceHistoryBuild- Returns:
- build trigger string (triggered by VCS, user, schedule etc)
-
getQueuedDate
@NotNull public Date getQueuedDate()
Description copied from interface:HistoryBuildWhen the build was added to queue.- Specified by:
getQueuedDatein interfaceHistoryBuild- Returns:
- build queued time.
-
getServerStartDate
@NotNull public Date getServerStartDate()
Description copied from interface:HistoryBuildWhen the build was removed from queue and started.- Specified by:
getServerStartDatein interfaceHistoryBuild- Returns:
- build start time on the server.
-
getBuildId
public long getBuildId()
- Specified by:
getBuildIdin interfaceHistoryBuild- Returns:
- unique ID of the build
-
getBuildPromotion
public BuildPromotion getBuildPromotion()
Description copied from interface:HistoryBuildReturns promotion state associated with this build.- Specified by:
getBuildPromotionin interfaceHistoryBuild- Returns:
- see above
-
getBuildTypeId
public String getBuildTypeId()
- Specified by:
getBuildTypeIdin interfaceHistoryBuild- Returns:
- internal id of the build configuration
-
getProjectId
public String getProjectId()
- Specified by:
getProjectIdin interfaceHistoryBuild- Returns:
- internal id of the project
-
-