Class ItemCredentialsFingerprintFacet
- java.lang.Object
-
- jenkins.model.FingerprintFacet
-
- com.cloudbees.plugins.credentials.fingerprints.AbstractCredentialsFingerprintFacet
-
- com.cloudbees.plugins.credentials.fingerprints.ItemCredentialsFingerprintFacet
-
- All Implemented Interfaces:
ExtensionPoint
public class ItemCredentialsFingerprintFacet extends AbstractCredentialsFingerprintFacet
A facet to track the usage of a credential for a specific item outside of the context of a build, for example SCM polling.- Since:
- 2.1.1
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description ItemCredentialsFingerprintFacet(Item item, Fingerprint fingerprint, long timestamp)
Constructor.ItemCredentialsFingerprintFacet(Item item, Fingerprint fingerprint, long timestamp0, long timestamp)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
Item
getItem()
Returns theItem
.String
getItemFullName()
Returns theItem.getFullName()
.long
getTimestamp0()
Returns the timestamp of first usage.String
getTimestampString()
Returns the timestamp range as a string.int
hashCode()
-
Methods inherited from class jenkins.model.FingerprintFacet
_setOwner, createActions, getFingerprint, getTimestamp, isFingerprintDeletionBlocked
-
-
-
-
Constructor Detail
-
ItemCredentialsFingerprintFacet
public ItemCredentialsFingerprintFacet(@NonNull Item item, @NonNull Fingerprint fingerprint, long timestamp)
Constructor.- Parameters:
item
- the itemfingerprint
-Fingerprint
object to which this facet is going to be added to.timestamp
- timestamp when the use happened (milliseconds since midnight Jan 1, 1970 UTC).
-
ItemCredentialsFingerprintFacet
public ItemCredentialsFingerprintFacet(@NonNull Item item, @NonNull Fingerprint fingerprint, long timestamp0, long timestamp)
Constructor.- Parameters:
item
- the itemfingerprint
-Fingerprint
object to which this facet is going to be added to.timestamp0
- timestamp when the first usage happened.timestamp
- timestamp when the use happened (milliseconds since midnight Jan 1, 1970 UTC).
-
-
Method Detail
-
getItemFullName
@NonNull public String getItemFullName()
Returns theItem.getFullName()
.- Returns:
- the
Item.getFullName()
.
-
getItem
@CheckForNull public Item getItem()
Returns theItem
.- Returns:
- the
Item
ornull
if either the item no longer exists or the current authentication does not have permission to access the item.
-
getTimestamp0
public long getTimestamp0()
Returns the timestamp of first usage.- Returns:
- the timestamp of first usage.
-
getTimestampString
public String getTimestampString()
Returns the timestamp range as a string.- Returns:
- the timestamp range as a string.
-
equals
public boolean equals(Object o)
- Overrides:
equals
in classAbstractCredentialsFingerprintFacet
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classAbstractCredentialsFingerprintFacet
-
-