Class BitbucketBuildStatus
java.lang.Object
com.cloudbees.jenkins.plugins.bitbucket.api.BitbucketBuildStatus
- Direct Known Subclasses:
BitbucketServerBuildStatus
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEnumeration 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 TypeMethodDescriptionvoidaddOptionalData(String attribute, Object value) Add a new attribute to the payload to send.booleanlongintgetHash()getKey()getName()This represent additional informations contributed byBitbucketBuildStatusCustomizers.getState()getUrl()inthashCode()voidsetBuildDuration(long buildDuration) voidsetBuildNumber(int buildNumber) voidsetDescription(String description) voidvoidvoidvoidvoidsetRefname(String refname) voidvoid
-
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 byBitbucketBuildStatusCustomizers.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
-