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 C
Create a self-contained version of thisCredentials
that does not require access to any external files or resources.type()
The type of credentials that thisCredentialsSnapshotTaker
operates on.
-
Constructor Details
-
CredentialsSnapshotTaker
public CredentialsSnapshotTaker()
-
-
Method Details
-
type
The type of credentials that thisCredentialsSnapshotTaker
operates on.- Returns:
- the type of credentials that this
CredentialsSnapshotTaker
operates on.
-
snapshot
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.
-