Package jenkins.model
Class FingerprintFacet
- java.lang.Object
-
- jenkins.model.FingerprintFacet
-
- All Implemented Interfaces:
ExtensionPoint
public abstract class FingerprintFacet extends Object implements ExtensionPoint
Plugin-specific additions to fingerprint information.Each
Fingerprintobject 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:
TransientFingerprintFacetFactory
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedFingerprintFacet(Fingerprint fingerprint, long timestamp)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void_setOwner(Fingerprint fingerprint)Backdoor forFingerprintto set itself to its facets.voidcreateActions(List<Action> result)Create action objects to be contributed to the ownerFingerprint.FingerprintgetFingerprint()Gets theFingerprintthat this object belongs to.longgetTimestamp()Gets the timestamp associated with this facet.booleanisFingerprintDeletionBlocked()Returns whether Fingerprint deletion has been blocked by this Facet.
-
-
-
Constructor Detail
-
FingerprintFacet
protected FingerprintFacet(@NonNull Fingerprint fingerprint, long timestamp)- Parameters:
fingerprint-Fingerprintobject to which this facet is going to be added to.timestamp- Timestamp when the use happened (when the facet has been created).
-
-
Method Detail
-
getFingerprint
@NonNull public Fingerprint getFingerprint()
Gets theFingerprintthat this object belongs to.- Returns:
- always non-null.
-
createActions
public void createActions(List<Action> result)
Create action objects to be contributed to the ownerFingerprint. By default, creates no actions.Fingerprintcalls this method for everyFingerprintFacetthat 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 forFingerprintto set itself to its facets. Public only because this needs to be accessible toFingerprint. Do not call this method directly.
-
-