Class BitbucketBuildStatus
java.lang.Object
com.cloudbees.jenkins.plugins.bitbucket.api.BitbucketBuildStatus
- Direct Known Subclasses:
BitbucketServerBuildStatus
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Enumeration of possible Bitbucket commit notification states -
Constructor Summary
ConstructorsConstructorDescriptionCopy constructor.BitbucketBuildStatus
(String hash, String description, BitbucketBuildStatus.Status state, String url, String key, String name, String refname) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addOptionalData
(String attribute, Object value) Add a new attribute to the payload to send.boolean
long
int
getHash()
getKey()
getName()
This represent additional informations contributed byBitbucketBuildStatusCustomizer
s.getState()
getUrl()
int
hashCode()
void
setBuildDuration
(long buildDuration) void
setBuildNumber
(int buildNumber) void
setDescription
(String description) void
void
void
void
void
setRefname
(String refname) void
void
-
Constructor Details
-
BitbucketBuildStatus
@Restricted(org.kohsuke.accmod.restrictions.DoNotUse.class) public BitbucketBuildStatus() -
BitbucketBuildStatus
-
BitbucketBuildStatus
Copy constructor.- Parameters:
other
- from copy to.
-
-
Method Details
-
getHash
-
setHash
-
getDescription
-
setDescription
-
getState
-
setState
-
getUrl
-
setUrl
-
getKey
-
setKey
-
getName
-
setName
-
getRefname
-
setRefname
-
getBuildDuration
public long getBuildDuration() -
setBuildDuration
public void setBuildDuration(long buildDuration) -
getBuildNumber
public int getBuildNumber() -
setBuildNumber
public void setBuildNumber(int buildNumber) -
setParent
-
getParent
-
getOptionalData
This represent additional informations contributed byBitbucketBuildStatusCustomizer
s.The contents of this map will be added to the root of the sent payload.
For example:
buildStatus.addOptionalData("testResults", new TestResult(1, 2, 3)); buildStatus.addOptionalData("optX", true);
Will be serialised as:{ "description": "The build is in progress..." ... "testResult": { "successful": 5, "failed": 2, "skipped": 1 }, "optX": true }
- Returns:
- an unmodifiable map of extra informations
-
addOptionalData
Add a new attribute to the payload to send. If the attribute has already been valued than it is ignored.- Parameters:
attribute
- attribute of build status, refer to the Bitbucket APIvalue
- bean to associate to the given attribute name- See Also:
-
hashCode
public int hashCode() -
equals
-