Class CertificateCredentialsImpl.UploadedKeyStoreSource
- java.lang.Object
-
- hudson.model.AbstractDescribableImpl<CertificateCredentialsImpl.KeyStoreSource>
-
- com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl.KeyStoreSource
-
- com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl.UploadedKeyStoreSource
-
- All Implemented Interfaces:
Describable<CertificateCredentialsImpl.KeyStoreSource>
,Serializable
- Enclosing class:
- CertificateCredentialsImpl
public static class CertificateCredentialsImpl.UploadedKeyStoreSource extends CertificateCredentialsImpl.KeyStoreSource implements Serializable
Let the user reference an uploaded file.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CertificateCredentialsImpl.UploadedKeyStoreSource.DescriptorImpl
The base class for allCertificateCredentialsImpl.KeyStoreSource
Descriptor
instances.static class
CertificateCredentialsImpl.UploadedKeyStoreSource.Upload
Deprecated.since 2.4.
-
Constructor Summary
Constructors Constructor Description UploadedKeyStoreSource(SecretBytes uploadedKeystore)
Deprecated.UploadedKeyStoreSource(String uploadedKeystore)
Deprecated.UploadedKeyStoreSource(org.apache.commons.fileupload.FileItem uploadedCertFile, SecretBytes uploadedKeystore)
Constructor able to receive file directly
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
getKeyStoreBytes()
Returns thebyte[]
content of theKeyStore
.long
getKeyStoreLastModified()
Returns aSystem.currentTimeMillis()
comparable timestamp of when the content was last modified.SecretBytes
getUploadedKeystore()
Returns the private key file name.boolean
isSnapshotSource()
Returnstrue
if and only if the source is self contained.String
toString()
-
Methods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
-
-
-
-
Constructor Detail
-
UploadedKeyStoreSource
@Deprecated public UploadedKeyStoreSource(String uploadedKeystore)
Deprecated.Our constructor.- Parameters:
uploadedKeystore
- the keystore content.
-
UploadedKeyStoreSource
@Deprecated public UploadedKeyStoreSource(@CheckForNull SecretBytes uploadedKeystore)
Deprecated.Our constructor.- Parameters:
uploadedKeystore
- the keystore content.
-
UploadedKeyStoreSource
@DataBoundConstructor public UploadedKeyStoreSource(org.apache.commons.fileupload.FileItem uploadedCertFile, @CheckForNull SecretBytes uploadedKeystore)
Constructor able to receive file directly- Parameters:
uploadedCertFile
- the keystore content from the file uploaduploadedKeystore
- the keystore encrypted data, in case the file is not uploaded (e.g. update of the password / description)
-
-
Method Detail
-
getUploadedKeystore
public SecretBytes getUploadedKeystore()
Returns the private key file name.- Returns:
- the private key file name.
-
getKeyStoreBytes
@NonNull public byte[] getKeyStoreBytes()
Returns thebyte[]
content of theKeyStore
.- Specified by:
getKeyStoreBytes
in classCertificateCredentialsImpl.KeyStoreSource
- Returns:
- the
byte[]
content of theKeyStore
.
-
getKeyStoreLastModified
public long getKeyStoreLastModified()
Returns aSystem.currentTimeMillis()
comparable timestamp of when the content was last modified. Used to track refreshing theCertificateCredentialsImpl.keyStore
cache for sources that pull from an external source.- Specified by:
getKeyStoreLastModified
in classCertificateCredentialsImpl.KeyStoreSource
- Returns:
- a
System.currentTimeMillis()
comparable timestamp of when the content was last modified.
-
isSnapshotSource
public boolean isSnapshotSource()
Returnstrue
if and only if the source is self contained.- Overrides:
isSnapshotSource
in classCertificateCredentialsImpl.KeyStoreSource
- Returns:
true
if and only if the source is self contained.
-
-