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 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:
  • Constructor Details

    • FingerprintFacet

      protected FingerprintFacet(@NonNull Fingerprint fingerprint, long timestamp)
      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

      @NonNull public Fingerprint getFingerprint()
      Gets the Fingerprint that this object belongs to.
      Returns:
      always non-null.
    • createActions

      public void createActions(List<Action> result)
      Create action objects to be contributed to the owner Fingerprint. By default, creates no actions.

      Fingerprint calls this method for every FingerprintFacet 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 for Fingerprint to set itself to its facets. Public only because this needs to be accessible to Fingerprint. Do not call this method directly.