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 example
CertificateCredentialsImpl can use different keystores implementations
to hold the certificate. Calling snapshot(Credentials) resolve the actual source into
a source like CertificateCredentialsImpl.UploadedKeyStoreSource
which is self contained.- Since:
- 1.14
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract CCreate a self-contained version of thisCredentialsthat does not require access to any external files or resources.type()The type of credentials that thisCredentialsSnapshotTakeroperates on.
-
Constructor Details
-
CredentialsSnapshotTaker
public CredentialsSnapshotTaker()
-
-
Method Details
-
type
The type of credentials that thisCredentialsSnapshotTakeroperates on.- Returns:
- the type of credentials that this
CredentialsSnapshotTakeroperates on.
-
snapshot
Create a self-contained version of thisCredentialsthat does not require access to any external files or resources.- Parameters:
credentials- the credentials- Returns:
- either the original credentials if the
Credentialsis already self-contained or a new identical instance that is self-contained.
-