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
  • Constructor Details

    • CredentialsSnapshotTaker

      public CredentialsSnapshotTaker()
  • Method Details

    • type

      public abstract Class<C> type()
      The type of credentials that this CredentialsSnapshotTaker 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 this Credentials 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.