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
ConstructorsModifierConstructorDescriptionprotectedFingerprintFacet(Fingerprint fingerprint, long timestamp) -
Method Summary
Modifier and TypeMethodDescriptionvoid_setOwner(Fingerprint fingerprint) Backdoor forFingerprintto set itself to its facets.voidcreateActions(List<Action> result) Create action objects to be contributed to the ownerFingerprint.Gets theFingerprintthat this object belongs to.longGets the timestamp associated with this facet.booleanReturns whether Fingerprint deletion has been blocked by this Facet.
-
Constructor Details
-
FingerprintFacet
- 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 Details
-
getFingerprint
Gets theFingerprintthat this object belongs to.- Returns:
- always non-null.
-
createActions
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.
-