Package jenkins.model
Class FingerprintFacet
java.lang.Object
jenkins.model.FingerprintFacet
- All Implemented Interfaces:
ExtensionPoint
Plugin-specific additions to fingerprint information.
Each Fingerprint
object records how a particular object (most typically a file,
but it can be generalized to anything else that can be turned into a checksum) is used.
Traditionally, this "use" is narrowly defined as "seen in build #N of job X", but this
extension point generalizes this to allow arbitrary use (such as "deployed to Maven repository",
"released to UAT environment", etc.
Plugins can just define subtypes of this and fingerprint.getFacets().add(new MyFacet(fingerprint))
to add it to a fingerprint. The intended design is that every time some use happens, you create
an instance of new facet and add it.
Views
main.groovy
This view is rendered into the- Since:
- 1.421
- Author:
- Kohsuke Kawaguchi
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Constructor Summary
ModifierConstructorDescriptionprotected
FingerprintFacet
(Fingerprint fingerprint, long timestamp) -
Method Summary
Modifier and TypeMethodDescriptionvoid
_setOwner
(Fingerprint fingerprint) Backdoor forFingerprint
to set itself to its facets.void
createActions
(List<Action> result) Create action objects to be contributed to the ownerFingerprint
.Gets theFingerprint
that this object belongs to.long
Gets the timestamp associated with this facet.boolean
Returns whether Fingerprint deletion has been blocked by this Facet.
-
Constructor Details
-
FingerprintFacet
- Parameters:
fingerprint
-Fingerprint
object to which this facet is going to be added to.timestamp
- Timestamp when the use happened (when the facet has been created).
-
-
Method Details
-
getFingerprint
Gets theFingerprint
that this object belongs to.- Returns:
- always non-null.
-
createActions
Create action objects to be contributed to the ownerFingerprint
. By default, creates no actions.Fingerprint
calls this method for everyFingerprintFacet
that it owns when the rendering is requested.- Parameters:
result
- Output list
-
getTimestamp
public long getTimestamp()Gets the timestamp associated with this facet. The rendering of facets are sorted by their chronological order. -
isFingerprintDeletionBlocked
public boolean isFingerprintDeletionBlocked()Returns whether Fingerprint deletion has been blocked by this Facet. Returns false by default. Override the default to block the deletion of the associated Fingerprint.- Since:
- 2.223
-
_setOwner
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public void _setOwner(Fingerprint fingerprint) Backdoor forFingerprint
to set itself to its facets. Public only because this needs to be accessible toFingerprint
. Do not call this method directly.
-