public abstract class FieldDescriptor extends Object implements Serializable
Modifier and Type | Class and Description |
---|---|
class |
FieldDescriptor.FieldValidationWrapper
A wrapper class to support the 'skip if' functionality in
addValidator(org.sourceid.saml20.adapter.gui.validation.FieldValidator, boolean) . |
Modifier and Type | Method and Description |
---|---|
void |
addValidator(FieldValidator validator)
Adds a FieldValidator to the back of the ordered list of validators for this field.
|
void |
addValidator(FieldValidator validator,
boolean skipIfEmptyValue)
Adds a FieldValidator to the back of the ordered list of validators for this field.
|
String |
getDefaultForLegacyConfig()
This method returns a default value for the field of a plugin instance created before adding the current field.
|
String |
getDefaultValue()
Gets the default value for this field.
|
String |
getDescription()
Gets a description of this field.
|
String |
getFormattedValue(String value)
Gets a value that is formatted according to this FieldDescriptor.
|
String |
getLabel()
Gets the label of this field that will be rendered in the administrative console configuration pages.
|
String |
getName()
Gets the name of this field.
|
List<FieldDescriptor.FieldValidationWrapper> |
getValidationChain()
Gets the ordered list of FieldValidators.
|
void |
setDefaultForLegacyConfig(String defaultValue)
This method allows a newly added field to have a default value specifically for instances of a plugin that were created before adding this field.
|
void |
setDefaultValue(String defaultValue)
Sets the default value for this individual field.
|
void |
setLabel(String label)
Sets the label of this field that will be rendered in the administrative console configuration pages.
|
public String getName()
public void setLabel(String label)
label
- The desired field label value.public String getLabel()
public String getDescription()
public String getDefaultValue()
public String getFormattedValue(String value)
value
- The value to be formatted.public void setDefaultValue(String defaultValue)
defaultValue
- for this field.public void setDefaultForLegacyConfig(String defaultValue)
defaultValue
- The default value that should be used for legacy configurations.public String getDefaultForLegacyConfig()
public void addValidator(FieldValidator validator)
addValidator(org.sourceid.saml20.adapter.gui.validation.FieldValidator, boolean)
with
false for the last parameter.validator
- the FieldValidatorpublic void addValidator(FieldValidator validator, boolean skipIfEmptyValue)
validator
- validator the FieldValidatorskipIfEmptyValue
- a boolean indicating if validator should be skipped when the field value is null or empty.
This is useful for situations where you want to perform some validation on a field only if the user entered a
value for the field. For example, you might want a field that is not required but must be an integer if used.public List<FieldDescriptor.FieldValidationWrapper> getValidationChain()
Copyright 2019 Ping Identity Corp. All rights reserved.