Interface FileCredentials

  • All Superinterfaces:
    com.cloudbees.plugins.credentials.Credentials, Describable<com.cloudbees.plugins.credentials.Credentials>, ExtensionPoint, com.cloudbees.plugins.credentials.common.IdCredentials, Serializable, com.cloudbees.plugins.credentials.common.StandardCredentials
    All Known Implementing Classes:
    FileCredentialsImpl

    @NameWith(NameProvider.class)
    public interface FileCredentials
    extends com.cloudbees.plugins.credentials.common.StandardCredentials
    Credentials consisting of a secret file.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      InputStream getContent()
      Obtains the actual content of the secret file as a bytestream.
      String getFileName()
      Indicates the intended naming of the secret content.
      • Methods inherited from interface com.cloudbees.plugins.credentials.Credentials

        forRun, getDescriptor, getScope
      • Methods inherited from interface com.cloudbees.plugins.credentials.common.IdCredentials

        getId
      • Methods inherited from interface com.cloudbees.plugins.credentials.common.StandardCredentials

        getDescription
    • Method Detail

      • getFileName

        @NonNull
        String getFileName()
        Indicates the intended naming of the secret content. For example, private-keys.zip or keystore.
        Returns:
        a simple file name (no path separators)
      • getContent

        @NonNull
        InputStream getContent()
                        throws IOException
        Obtains the actual content of the secret file as a bytestream.
        Returns:
        some binary data
        Throws:
        IOException - if the data cannot be loaded