public abstract class FingerprintFacet extends Object implements ExtensionPoint
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.
TransientFingerprintFacetFactory
ExtensionPoint.LegacyInstancesAreScopedToHudson
Modifier | Constructor and Description |
---|---|
protected |
FingerprintFacet(Fingerprint fingerprint,
long timestamp) |
Modifier and Type | Method and Description |
---|---|
void |
_setOwner(Fingerprint fingerprint)
Backdoor for
Fingerprint to set itself to its facets. |
void |
createActions(List<Action> result)
Create action objects to be contributed to the owner
Fingerprint . |
Fingerprint |
getFingerprint()
Gets the
Fingerprint that this object belongs to. |
long |
getTimestamp()
Gets the timestamp associated with this facet.
|
boolean |
isFingerprintDeletionBlocked()
Returns whether Fingerprint deletion has been blocked by this Facet.
|
protected FingerprintFacet(@NonNull Fingerprint fingerprint, long timestamp)
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).@NonNull public Fingerprint getFingerprint()
Fingerprint
that this object belongs to.public void createActions(List<Action> result)
Fingerprint
.
By default, creates no actions.
Fingerprint
calls this method for every FingerprintFacet
that
it owns when the rendering is requested.
result
- Output listpublic long getTimestamp()
public boolean isFingerprintDeletionBlocked()
@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public void _setOwner(Fingerprint fingerprint)
Fingerprint
to set itself to its facets.
Public only because this needs to be accessible to Fingerprint
. Do not call this method directly.Copyright © 2004–2021. All rights reserved.