Class UploadFileFieldDescriptor

java.lang.Object
org.sourceid.saml20.adapter.gui.FieldDescriptor
org.sourceid.saml20.adapter.gui.UploadFileFieldDescriptor
All Implemented Interfaces:
Serializable

public class UploadFileFieldDescriptor extends FieldDescriptor
A field descriptor that will render a file upload field on the GUI configuration screen.

The value of this field in the Configuration will be either obfuscated or base64 encoded depending on if encryption is enabled or not. Use Field.getFileValueAsByteArray() or Field.getFileValueAsString() helper methods to simplify access to the file contents.

See Also:
  • Constructor Details

    • UploadFileFieldDescriptor

      public UploadFileFieldDescriptor(String name, String description)
      Create a new UploadFileFieldDescriptor.
      Parameters:
      name - The field name (must be unique per AdapterConfigurationGuiDescriptor or TableDescriptor). This name will also be used as the label for the field in the administrative console. To ensure configuration can be read in future releases of a plugin, it is recommended to not change a field's name - instead use a label to rename it in the administrative console.
      description - A helpful description of the field.
    • UploadFileFieldDescriptor

      public UploadFileFieldDescriptor(String name, String description, boolean encryptFile)
      Create a new UploadFileFieldDescriptor.
      Parameters:
      name - The field name (must be unique per AdapterConfigurationGuiDescriptor or TableDescriptor). This name will also be used as the label for the field in the administrative console. To ensure configuration can be read in future releases of a plugin, it is recommended to not change a field's name - instead use a label to rename it in the administrative console.
      description - A helpful description of the field.
      encryptFile - A flag to indicate if uploaded files will be encrypted when stored in configuration. If not specified (i.e.: using an alternate constructor) then encryption is disabled.
      Since:
      9.0
  • Method Details

    • setDefaultValue

      public void setDefaultValue(String defaultValue)
      Note: default values are not supported for the UploadFileFieldDescriptor field type.
      Overrides:
      setDefaultValue in class FieldDescriptor
      Parameters:
      defaultValue - for this field.
    • isEncryptedFile

      public boolean isEncryptedFile()
      Is the file encrypted when stored in configuration?
      Returns:
      true if the file is encrypted when stored in configuration.