public class Build extends BaseBuildBean
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
STARTED_FORMAT |
ARTIFACT, ARTIFACTS, DEPENDENCIES, DEPENDENCY, EXCLUDED_ARTIFACTS, MODULE, MODULES, ROOT, RUN_PARAMETERS| Constructor and Description |
|---|
Build() |
| Modifier and Type | Method and Description |
|---|---|
void |
addBuildDependency(BuildDependency buildDependency)
Adds one #BuildDependency to build dependencies list
|
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
|
Governance |
getGovernance() |
Issues |
getIssues() |
LicenseControl |
getLicenseControl() |
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.util.List<MatrixParameter> |
getRunParameters() |
java.lang.String |
getStarted()
Returns the started time of the build
|
java.util.List<PromotionStatus> |
getStatuses() |
BuildType |
getType()
Deprecated.
Use
getBuildAgent() instead. |
java.lang.String |
getUrl()
Returns the URL of the build
|
java.util.List<Vcs> |
getVcs() |
java.lang.String |
getVcsRevision()
Returns the vcs revision (format is vcs specific)
|
java.lang.String |
getVcsUrl()
Returns the vcs URL (format is vcs specific)
|
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 |
setGovernance(Governance governance) |
void |
setIssues(Issues issues) |
void |
setLicenseControl(LicenseControl licenseControl) |
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 |
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 |
setStatuses(java.util.List<PromotionStatus> statuses) |
void |
setType(BuildType type)
Deprecated.
Use
setBuildAgent(BuildAgent) instead. |
void |
setUrl(java.lang.String url)
Sets the URL of the build
|
void |
setVcs(java.util.List<Vcs> vcs) |
void |
setVcsRevision(java.lang.String vcsRevision)
Sets the vcs revision (format is vcs specific)
|
void |
setVcsUrl(java.lang.String vcsUrl)
Sets the vcs URL (format is vcs specific)
|
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 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 java.lang.String getVcsRevision()
public void setVcsRevision(java.lang.String vcsRevision)
vcsRevision - The vcs revisionpublic java.lang.String getVcsUrl()
public void setVcsUrl(java.lang.String vcsUrl)
vcsUrl - The vcs URL@Deprecated public BuildType getType()
getBuildAgent() instead.@Deprecated public void setType(BuildType type)
setBuildAgent(BuildAgent) instead.type - Build typepublic 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 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()
@Deprecated public void setParentBuildId(java.lang.String parentBuildId)
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 LicenseControl getLicenseControl()
public void setLicenseControl(LicenseControl licenseControl)
public 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 void addBuildDependency(BuildDependency buildDependency)
buildDependency - the #BuildDependency to addpublic Issues getIssues()
public void setIssues(Issues issues)
public Governance getGovernance()
public void setGovernance(Governance governance)
public java.lang.String toString()
toString in class java.lang.Object