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
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.sourceid.saml20.adapter.gui.FieldDescriptor
FieldDescriptor.FieldValidationWrapper -
Constructor Summary
ConstructorsConstructorDescriptionUploadFileFieldDescriptor(String name, String description) Create a new UploadFileFieldDescriptor.UploadFileFieldDescriptor(String name, String description, boolean encryptFile) Create a new UploadFileFieldDescriptor. -
Method Summary
Modifier and TypeMethodDescriptionbooleanIs 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 Details
-
UploadFileFieldDescriptor
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
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
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.
-