public class Build extends BaseBuildBean
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
STARTED_FORMAT |
| Constructor and Description |
|---|
Build() |
| Modifier and Type | Method and Description |
|---|---|
void |
addStatus(PromotionStatus promotionStatus) |
static java.lang.String |
formatBuildStarted(long timestamp)
Formats the timestamp to the ISO date time string format expected by the build info API.
|
Agent |
getAgent()
Returns the agent that triggered the build (e.g.
|
java.lang.String |
getArtifactoryPluginVersion()
Returns the Artifactory plugin version of the build
|
java.lang.String |
getArtifactoryPrincipal()
Returns the Artifactory principal of the build
|
BuildAgent |
getBuildAgent()
Returns the agent that executed the build (e.g.
|
java.util.List<BuildDependency> |
getBuildDependencies()
Returns the build dependencies of this build
|
BuildRetention |
getBuildRetention() |
long |
getDurationMillis()
Returns the duration milliseconds of the build
|
Issues |
getIssues() |
Module |
getModule(java.lang.String moduleId)
Returns the module object by the given ID
|
java.util.List<Module> |
getModules()
Returns the modules of the build
|
java.lang.String |
getName()
Returns the name of the build
|
java.lang.String |
getNumber()
Returns the number of the build
|
java.lang.String |
getParentBuildId()
Deprecated.
Use
getParentName() and getParentNumber() instead. |
java.lang.String |
getParentName()
Returns the name of the parent build
|
java.lang.String |
getParentNumber()
Returns the number of the parent build
|
java.lang.String |
getPrincipal()
Returns the principal of the build
|
java.lang.String |
getProject()
Returns the project of the build
|
java.util.List<MatrixParameter> |
getRunParameters() |
java.lang.String |
getStarted()
Returns the started time of the build
|
long |
getStartedMillis()
Returns the started time of the build in a unit of milliseconds
|
java.util.List<PromotionStatus> |
getStatuses() |
java.lang.String |
getUrl()
Returns the URL of the build
|
java.util.List<Vcs> |
getVcs() |
java.lang.String |
getVersion()
Returns the version of the build
|
void |
setAgent(Agent agent)
Sets the agent that triggered the build
|
void |
setArtifactoryPluginVersion(java.lang.String artifactoryPluginVersion)
Sets the Artifactory plugin version of the build
|
void |
setArtifactoryPrincipal(java.lang.String artifactoryPrincipal)
Sets the Artifactory principal of the build
|
void |
setBuildAgent(BuildAgent buildAgent)
Sets the agent that executed the build
|
void |
setBuildDependencies(java.util.List<BuildDependency> buildDependencies)
Sets build dependencies for this build
|
void |
setBuildRetention(BuildRetention buildRetention) |
void |
setDurationMillis(long durationMillis)
Sets the duration milliseconds of the build
|
void |
setIssues(Issues issues) |
void |
setModules(java.util.List<Module> modules)
Sets the modules of the build
|
void |
setName(java.lang.String name)
Sets the name of the build
|
void |
setNumber(java.lang.String number)
Sets the number of the build
|
void |
setParentBuildId(java.lang.String parentBuildId)
Deprecated.
Use
setParentName(String) and setParentNumber(String)
instead. |
void |
setParentName(java.lang.String parentName)
Sets the name of the parent build
|
void |
setParentNumber(java.lang.String parentNumber)
Sets the number of the parent build
|
void |
setPrincipal(java.lang.String principal)
Sets the principal of the build
|
void |
setProject(java.lang.String project)
Sets the project of the build
|
void |
setRunParameters(java.util.List<MatrixParameter> runParameters) |
void |
setStarted(java.lang.String started)
Sets the started time of the build
|
void |
setStartedDate(java.util.Date startedDate)
Sets the build start time
|
void |
setStartedMillis(long startedMillis)
Sets the started time of the build in a unit of milliseconds
|
void |
setStatuses(java.util.List<PromotionStatus> statuses) |
void |
setUrl(java.lang.String url)
Sets the URL of the build
|
void |
setVcs(java.util.List<Vcs> vcs) |
void |
setVersion(java.lang.String version)
Sets the version of the build
|
java.lang.String |
toString() |
getProperties, setPropertiespublic static final java.lang.String STARTED_FORMAT
public static java.lang.String formatBuildStarted(long timestamp)
timestamp - The build start time timestamppublic java.lang.String getVersion()
public void setVersion(java.lang.String version)
version - Build versionpublic java.lang.String getName()
public void setName(java.lang.String name)
name - Build namepublic java.lang.String getNumber()
public void setNumber(java.lang.String number)
number - Build numberpublic java.lang.String getProject()
public void setProject(java.lang.String project)
project - Build projectpublic java.lang.String getParentName()
public void setParentName(java.lang.String parentName)
parentName - Parent build numberpublic java.lang.String getParentNumber()
public void setParentNumber(java.lang.String parentNumber)
parentNumber - Parent build numberpublic java.util.List<Vcs> getVcs()
public void setVcs(java.util.List<Vcs> vcs)
public Agent getAgent()
getBuildAgent()public void setAgent(Agent agent)
agent - Triggering agentpublic BuildAgent getBuildAgent()
public void setBuildAgent(BuildAgent buildAgent)
buildAgent - Executing agentpublic java.lang.String getStarted()
public long getStartedMillis()
public void setStartedMillis(long startedMillis)
public void setStarted(java.lang.String started)
started - Build started timepublic void setStartedDate(java.util.Date startedDate)
startedDate - Build start date to setpublic long getDurationMillis()
public void setDurationMillis(long durationMillis)
durationMillis - Build duration millisecondspublic java.lang.String getPrincipal()
public void setPrincipal(java.lang.String principal)
principal - Build principalpublic java.lang.String getArtifactoryPrincipal()
public void setArtifactoryPrincipal(java.lang.String artifactoryPrincipal)
artifactoryPrincipal - Build Artifactory principalpublic java.lang.String getArtifactoryPluginVersion()
public void setArtifactoryPluginVersion(java.lang.String artifactoryPluginVersion)
artifactoryPluginVersion - Artifactory plugin versionpublic java.lang.String getUrl()
public void setUrl(java.lang.String url)
url - Build URL@Deprecated public java.lang.String getParentBuildId()
getParentName() and getParentNumber() instead.@Deprecated public void setParentBuildId(java.lang.String parentBuildId)
setParentName(String) and setParentNumber(String)
instead.parentBuildId - Build parent build IDpublic java.util.List<Module> getModules()
public void setModules(java.util.List<Module> modules)
modules - Build modulespublic Module getModule(java.lang.String moduleId)
moduleId - ID of module to locatepublic BuildRetention getBuildRetention()
public void setBuildRetention(BuildRetention buildRetention)
public java.util.List<MatrixParameter> getRunParameters()
public void setRunParameters(java.util.List<MatrixParameter> runParameters)
public java.util.List<PromotionStatus> getStatuses()
public void setStatuses(java.util.List<PromotionStatus> statuses)
public void addStatus(PromotionStatus promotionStatus)
public java.util.List<BuildDependency> getBuildDependencies()
public void setBuildDependencies(java.util.List<BuildDependency> buildDependencies)
buildDependencies - List of #BuildDependency objectspublic Issues getIssues()
public void setIssues(Issues issues)
public java.lang.String toString()
toString in class java.lang.Object