Class CredentialsSnapshotTaker<C extends Credentials>
- java.lang.Object
-
- com.cloudbees.plugins.credentials.CredentialsSnapshotTaker<C>
-
- All Implemented Interfaces:
ExtensionPoint
- Direct Known Subclasses:
UsernamePasswordCredentialsSnapshotTaker
public abstract class CredentialsSnapshotTaker<C extends Credentials> extends Object implements ExtensionPoint
Some credential types can store some of the credential details in a file outside of Jenkins. Taking a snapshot of the credential ensures that all the details are captured within the credential. For exampleCertificateCredentialsImpl
can use different keystores implementations to hold the certificate. Callingsnapshot(Credentials)
resolve the actual source into a source likeCertificateCredentialsImpl.UploadedKeyStoreSource
which is self contained.- Since:
- 1.14
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description CredentialsSnapshotTaker()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract C
snapshot(C credentials)
Create a self-contained version of thisCredentials
that does not require access to any external files or resources.abstract Class<C>
type()
The type of credentials that thisCredentialsSnapshotTaker
operates on.
-
-
-
Method Detail
-
type
public abstract Class<C> type()
The type of credentials that thisCredentialsSnapshotTaker
operates on.- Returns:
- the type of credentials that this
CredentialsSnapshotTaker
operates on.
-
snapshot
public abstract C snapshot(C credentials)
Create a self-contained version of thisCredentials
that does not require access to any external files or resources.- Parameters:
credentials
- the credentials- Returns:
- either the original credentials if the
Credentials
is already self-contained or a new identical instance that is self-contained.
-
-