Package org.sourceid.saml20.adapter.gui
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
Configurationwill be either obfuscated or base64 encoded depending on if encryption is enabled or not. UseField.getFileValueAsByteArray()orField.getFileValueAsString()helper methods to simplify access to the file contents.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.sourceid.saml20.adapter.gui.FieldDescriptor
FieldDescriptor.FieldValidationWrapper
-
-
Constructor Summary
Constructors Constructor Description UploadFileFieldDescriptor(String name, String description)Create a new UploadFileFieldDescriptor.UploadFileFieldDescriptor(String name, String description, boolean encryptFile)Create a new UploadFileFieldDescriptor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisEncryptedFile()Is the file encrypted when stored in configuration?voidsetDefaultValue(String defaultValue)Note: default values are not supported for the UploadFileFieldDescriptor field type.-
Methods inherited from class org.sourceid.saml20.adapter.gui.FieldDescriptor
addValidator, addValidator, getDefaultForLegacyConfig, getDefaultValue, getDescription, getFormattedValue, getLabel, getName, getValidationChain, isHidden, setDefaultForLegacyConfig, setHidden, setLabel
-
-
-
-
Constructor Detail
-
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 Detail
-
setDefaultValue
public void setDefaultValue(String defaultValue)
Note: default values are not supported for the UploadFileFieldDescriptor field type.- Overrides:
setDefaultValuein classFieldDescriptor- 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.
-
-