@Entity public class SingleSelectField extends CustomField
code, CODE_REGEXP, defaultValue, id, inputType, label, MAX_CODE_SIZE, MIN_CODE_SIZE, name, OPTION_REGEXP, optional| Constructor and Description |
|---|
SingleSelectField()
Created a SingleSelectField with a
|
| Modifier and Type | Method and Description |
|---|---|
void |
accept(CustomFieldVisitor visitor) |
void |
addOption(CustomFieldOption option)
Will check if label and the code are available among the existing options.
|
void |
changeOptionCode(String optionLabel,
String newCode)
Checks if the newCode is available among all options.
|
void |
changeOptionLabel(String previousLabel,
String newlabel)
Checks if the newlabel is available among all options.
|
List<CustomFieldOption> |
getOptions() |
void |
moveOptions(int newIndex,
List<String> optionsLabels)
Will remove all options and recreate them at their right-full positions.
|
void |
removeOption(String label)
Checks first if the option is the default one.
|
getCode, getDefaultValue, getDefaultValueAsDate, getId, getInputType, getLabel, getName, isOptional, setCode, setDefaultValue, setLabel, setName, setOptionalpublic void addOption(CustomFieldOption option)
option - : the new optionpublic void removeOption(@NotBlank
String label)
public void changeOptionLabel(String previousLabel, String newlabel)
OptionAlreadyExistExceptionpublic void changeOptionCode(String optionLabel, String newCode)
optionLabel - : the label to identify the concerned option.newCode - : the new code for the concerned option.public List<CustomFieldOption> getOptions()
public void moveOptions(int newIndex,
List<String> optionsLabels)
newIndex - : the lowest index for the moved selectionoptionsLabels - : the labels of the moved optionspublic void accept(CustomFieldVisitor visitor)
accept in class CustomFieldCopyright © 2010–2016 Henix, henix.fr. All rights reserved.