Class DeploymentInstance
- java.lang.Object
-
- jetbrains.buildServer.serverSide.deploymentDashboards.entities.DeploymentInstance
-
public class DeploymentInstance extends Object
-
-
Constructor Summary
Constructors Constructor Description DeploymentInstance(String id, DeploymentHistory deploymentHistory, Map<String,String> attributes, String dashboardId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAttribute(String key, String value)Adds information about attribute `key` with value `value`.voidaddNewState(DeploymentStateEntry deploymentStateEntry)Adds information about new deployment state `deploymentStateEntry`.voidaddNewState(DeploymentState newState, Date statusChangedAt, Long buildId)Adds information about new state `newState`, reported at `statusChangedAt`, with optional `buildId` to be associated with the state.Map<String,String>getAttributes()Return a map of attribute names and values for this instance.LonggetBuildId()Returns build ID associated with current (latest) state of this instance, if present, otherwise returns `null`.DeploymentStategetCurrentState()Return current (the latest reported) state of this instance.DategetCurrentStateChangeDate()Return the change date of current (the latest reported) state of this instance.StringgetDashboardId()StringgetId()Return unique identifier of this instance.List<DeploymentStateEntry>getKnownStates()Returns a list of all known states of this instance.
-
-
-
Method Detail
-
getId
@NotNull public String getId()
Return unique identifier of this instance.
-
getCurrentStateChangeDate
public Date getCurrentStateChangeDate()
Return the change date of current (the latest reported) state of this instance. If no state was reported for some reason, returns current timestamp.
-
getCurrentState
public DeploymentState getCurrentState()
Return current (the latest reported) state of this instance. If no state was reported for some reason, returns `DeploymentState.UNKNOWN` state.
-
getAttributes
public Map<String,String> getAttributes()
Return a map of attribute names and values for this instance.
-
getBuildId
@Nullable public Long getBuildId()
Returns build ID associated with current (latest) state of this instance, if present, otherwise returns `null`.
-
getKnownStates
public List<DeploymentStateEntry> getKnownStates()
Returns a list of all known states of this instance.
-
addNewState
public void addNewState(DeploymentState newState, Date statusChangedAt, @Nullable Long buildId)
Adds information about new state `newState`, reported at `statusChangedAt`, with optional `buildId` to be associated with the state.
-
addNewState
public void addNewState(DeploymentStateEntry deploymentStateEntry)
Adds information about new deployment state `deploymentStateEntry`.
-
addAttribute
public void addAttribute(String key, String value)
Adds information about attribute `key` with value `value`.
-
getDashboardId
@NotNull public String getDashboardId()
-
-