Package jenkins.scm.api.metadata
Class ObjectMetadataAction
java.lang.Object
hudson.model.InvisibleAction
jenkins.scm.api.metadata.ObjectMetadataAction
- All Implemented Interfaces:
Action
,ModelObject
,Serializable
Holds metadata about the object referenced by a
SCMRevision
, SCMHead
, SCMSource
or
SCMNavigator
.
For example:
- A
SCMNavigator
implementation that corresponds to a GitHub Team could use thegetObjectUrl()
to point to the GitHub Team page, and thegetObjectDisplayName()
to provide the team name - A
SCMSource
implementation that corresponds to a GitHub Repository could use thegetObjectUrl()
to point to the GitHub repository, and thegetObjectDescription()
to provide the repository description name - A
SCMHead
implementation that corresponds to a GitHub Pull Request could use thegetObjectUrl()
to point to the pull request on GitHub, thegetObjectDisplayName()
to provide the title of the pull request andgetObjectDescription()
to provide the description of the pull request
- Since:
- 2.0
- See Also:
-
Constructor Summary
ConstructorDescriptionObjectMetadataAction
(String objectDisplayName, String objectDescription, String objectUrl) -
Method Summary
Methods inherited from class hudson.model.InvisibleAction
getDisplayName, getIconFileName, getUrlName
-
Constructor Details
-
ObjectMetadataAction
-
-
Method Details
-
getObjectDisplayName
Returns the display name of the object ornull
. Consumers should assume the content is plain text that needs escaping withUtil.escape(String)
when being included in HTML output.- Returns:
- the display name of the object or
null
-
getObjectDescription
Returns the description of the object ornull
. Consumers should assume the content is plain text that needs escaping withUtil.escape(String)
when being included in HTML output.- Returns:
- the description of the object or
null
.
-
getObjectUrl
Returns the external url of the object ornull
if the object does not have an external url.- Returns:
- the display name of the object or
null
-
equals
-
hashCode
public int hashCode() -
toString
-