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 Date
convertToServerTime(Date clientTime)
String
getAgentName()
int
getAgentTypeId()
String
getBuildDescription()
long
getBuildId()
String
getBuildNumber()
BuildPromotion
getBuildPromotion()
Returns promotion state associated with this build.Status
getBuildStatus()
String
getBuildTypeId()
CanceledInfo
getCanceledInfo()
Date
getClientStartDate()
String
getFinalStatusText()
String
getFullName()
String
getProjectId()
Date
getQueuedDate()
When the build was added to queue.String
getRawTriggeredBy()
Date
getRemoveFromQueueDate()
Date
getServerStartDate()
When the build was removed from queue and started.ShortStatistics
getShortStatistics()
Returns a "short" statistics for the build (including information about failed/successful tests, compilation errors), seeShortStatistics
.Date
getStartDate()
boolean
isPersonal()
-
-
-
Constructor Detail
-
HistoryBuildSnapshot
public HistoryBuildSnapshot(@NotNull BuildStatisticsPrinterFactory buildStatisticsPrinterFactory, @NotNull RunningBuildEx build)
-
-
Method Detail
-
getFinalStatusText
@NotNull public String getFinalStatusText()
- Specified by:
getFinalStatusText
in interfaceHistoryBuild
-
getCanceledInfo
@Nullable public CanceledInfo getCanceledInfo()
- Specified by:
getCanceledInfo
in interfaceHistoryBuild
- Returns:
- build cancellation information if the build was cancelled, null otherwise
-
getFullName
public String getFullName()
- Specified by:
getFullName
in interfaceHistoryBuild
- Returns:
- full name of the
-
getClientStartDate
@Nullable public Date getClientStartDate()
- Specified by:
getClientStartDate
in interfaceHistoryBuild
-
convertToServerTime
@NotNull public Date convertToServerTime(@NotNull Date clientTime)
- Specified by:
convertToServerTime
in interfaceHistoryBuild
-
getStartDate
@NotNull public Date getStartDate()
- Specified by:
getStartDate
in interfaceHistoryBuild
-
getRemoveFromQueueDate
@NotNull public Date getRemoveFromQueueDate()
- Specified by:
getRemoveFromQueueDate
in interfaceHistoryBuild
-
getBuildStatus
public Status getBuildStatus()
- Specified by:
getBuildStatus
in interfaceHistoryBuild
- Returns:
- current build status (success, fail, etc)
-
getShortStatistics
public ShortStatistics getShortStatistics()
Description copied from interface:HistoryBuild
Returns 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:
getShortStatistics
in interfaceHistoryBuild
- Returns:
- short build statistics.
-
getBuildDescription
@Nullable public String getBuildDescription()
- Specified by:
getBuildDescription
in 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:
getAgentName
in interfaceHistoryBuild
- Returns:
- build agent name which is build is run on
-
getAgentTypeId
public int getAgentTypeId()
- Specified by:
getAgentTypeId
in interfaceHistoryBuild
- Returns:
- agent type id of the associated agent
-
isPersonal
public boolean isPersonal()
- Specified by:
isPersonal
in interfaceHistoryBuild
- Returns:
- true if this build is personal one, like remote run or pre-tested commit
-
getBuildNumber
public String getBuildNumber()
- Specified by:
getBuildNumber
in interfaceHistoryBuild
- Returns:
- build number
-
getRawTriggeredBy
public String getRawTriggeredBy()
- Specified by:
getRawTriggeredBy
in interfaceHistoryBuild
- Returns:
- build trigger string (triggered by VCS, user, schedule etc)
-
getQueuedDate
@NotNull public Date getQueuedDate()
Description copied from interface:HistoryBuild
When the build was added to queue.- Specified by:
getQueuedDate
in interfaceHistoryBuild
- Returns:
- build queued time.
-
getServerStartDate
@NotNull public Date getServerStartDate()
Description copied from interface:HistoryBuild
When the build was removed from queue and started.- Specified by:
getServerStartDate
in interfaceHistoryBuild
- Returns:
- build start time on the server.
-
getBuildId
public long getBuildId()
- Specified by:
getBuildId
in interfaceHistoryBuild
- Returns:
- unique ID of the build
-
getBuildPromotion
public BuildPromotion getBuildPromotion()
Description copied from interface:HistoryBuild
Returns promotion state associated with this build.- Specified by:
getBuildPromotion
in interfaceHistoryBuild
- Returns:
- see above
-
getBuildTypeId
public String getBuildTypeId()
- Specified by:
getBuildTypeId
in interfaceHistoryBuild
- Returns:
- internal id of the build configuration
-
getProjectId
public String getProjectId()
- Specified by:
getProjectId
in interfaceHistoryBuild
- Returns:
- internal id of the project
-
-