public class UploadFileFieldDescriptor extends FieldDescriptor
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.FieldDescriptor.FieldValidationWrapper
Constructor and Description |
---|
UploadFileFieldDescriptor(String name,
String description)
Create a new UploadFileFieldDescriptor.
|
UploadFileFieldDescriptor(String name,
String description,
boolean encryptFile)
Create a new UploadFileFieldDescriptor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isEncryptedFile()
Is the file encrypted when stored in configuration?
|
void |
setDefaultValue(String defaultValue)
Note: default values are not supported for the UploadFileFieldDescriptor field type.
|
addValidator, addValidator, getDefaultForLegacyConfig, getDefaultValue, getDescription, getFormattedValue, getLabel, getName, getValidationChain, setDefaultForLegacyConfig, setLabel
public UploadFileFieldDescriptor(String name, String description)
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.public UploadFileFieldDescriptor(String name, String description, boolean encryptFile)
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.public void setDefaultValue(String defaultValue)
setDefaultValue
in class FieldDescriptor
defaultValue
- for this field.public boolean isEncryptedFile()
Copyright 2019 Ping Identity Corp. All rights reserved.