public final class FileCredentialsImpl extends com.cloudbees.plugins.credentials.impl.BaseStandardCredentials implements FileCredentials
FileCredentials.| Modifier and Type | Class and Description |
|---|---|
static class |
FileCredentialsImpl.DescriptorImpl
Our descriptor.
|
com.cloudbees.plugins.credentials.impl.BaseStandardCredentials.BaseStandardCredentialsDescriptorFileCredentials.NameProvidercom.cloudbees.plugins.credentials.common.IdCredentials.HelpersExtensionPoint.LegacyInstancesAreScopedToHudson| Constructor and Description |
|---|
FileCredentialsImpl(com.cloudbees.plugins.credentials.CredentialsScope scope,
String id,
String description,
org.apache.commons.fileupload.FileItem file,
String fileName,
com.cloudbees.plugins.credentials.SecretBytes secretBytes)
Constructor for Stapler form binding.
|
FileCredentialsImpl(com.cloudbees.plugins.credentials.CredentialsScope scope,
String id,
String description,
org.apache.commons.fileupload.FileItem file,
String fileName,
String data)
Deprecated.
use
FileCredentialsImpl(CredentialsScope, String, String, FileItem, String, SecretBytes) for
stapler or FileCredentialsImpl(CredentialsScope, String, String, String, SecretBytes) for programatic
instantiation. |
FileCredentialsImpl(com.cloudbees.plugins.credentials.CredentialsScope scope,
String id,
String description,
String fileName,
com.cloudbees.plugins.credentials.SecretBytes secretBytes)
Constructor for everyone besides Stapler.
|
| Modifier and Type | Method and Description |
|---|---|
InputStream |
getContent()
Obtains the actual content of the secret file as a bytestream.
|
String |
getFileName()
Indicates the intended naming of the secret content.
|
com.cloudbees.plugins.credentials.SecretBytes |
getSecretBytes()
Exposes the encrypted content to jelly.
|
equals, getDescription, getId, hashCodegetDescriptor, getScopeclone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait@Deprecated public FileCredentialsImpl(@CheckForNull com.cloudbees.plugins.credentials.CredentialsScope scope, @CheckForNull String id, @CheckForNull String description, @NonNull org.apache.commons.fileupload.FileItem file, @CheckForNull String fileName, @CheckForNull String data) throws IOException
FileCredentialsImpl(CredentialsScope, String, String, FileItem, String, SecretBytes) for
stapler or FileCredentialsImpl(CredentialsScope, String, String, String, SecretBytes) for programatic
instantiation.scope - the scope of the credentials.id - the id of the credentials.description - the description of the credentials.file - the uploaded file.fileName - the name of the file.data - the content of the file.IOException - when things go wrong.@DataBoundConstructor
public FileCredentialsImpl(@CheckForNull
com.cloudbees.plugins.credentials.CredentialsScope scope,
@CheckForNull
String id,
@CheckForNull
String description,
@CheckForNull
org.apache.commons.fileupload.FileItem file,
@CheckForNull
String fileName,
@CheckForNull
com.cloudbees.plugins.credentials.SecretBytes secretBytes)
throws IOException
scope - the scope of the credentials.id - the id of the credentials.description - the description of the credentials.file - the uploaded file.fileName - the name of the file.secretBytes - the content of the file.IOException - when things go wrong.public FileCredentialsImpl(@CheckForNull
com.cloudbees.plugins.credentials.CredentialsScope scope,
@CheckForNull
String id,
@CheckForNull
String description,
@NonNull
String fileName,
@NonNull
com.cloudbees.plugins.credentials.SecretBytes secretBytes)
scope - the scope of the credentials.id - the id of the credentials.description - the description of the credentials.fileName - the name of the file.secretBytes - the content of the file.public String getFileName()
private-keys.zip or keystore.getFileName in interface FileCredentials@Restricted(value=org.kohsuke.accmod.restrictions.DoNotUse.class) public com.cloudbees.plugins.credentials.SecretBytes getSecretBytes()
public InputStream getContent() throws IOException
getContent in interface FileCredentialsIOException - if the data cannot be loadedCopyright © 2016–2022. All rights reserved.