|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.squashtest.csp.tm.domain.customfield.CustomField
org.squashtest.csp.tm.domain.customfield.SingleSelectField
@Entity public class SingleSelectField
A CustomField which stores a single option selected from a list.
| Field Summary |
|---|
| Fields inherited from class org.squashtest.csp.tm.domain.customfield.CustomField |
|---|
code, CODE_REGEXP, defaultValue, id, inputType, label, MAX_CODE_SIZE, MIN_CODE_SIZE, name, optional |
| Constructor Summary | |
|---|---|
SingleSelectField()
Created a SingleSelectField with a |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class org.squashtest.csp.tm.domain.customfield.CustomField |
|---|
getCode, getDefaultValue, getId, getInputType, getLabel, getName, isOptional, setCode, setDefaultValue, setLabel, setName, setOptional |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SingleSelectField()
| Method Detail |
|---|
public void addOption(CustomFieldOption option)
option - : the new option
OptionAlreadyExistsException
public void removeOption(@NotBlank
String label)
label -
CannotDeleteDefaultOptionException
public void changeOptionLabel(String previousLabel,
String newlabel)
previousLabel - newlabel -
OptionAlreadyExistException
public void changeOptionCode(String optionLabel,
String newCode)
optionLabel - : the label to identify the concerned option.newCode - : the new code for the concerned option.
CodeAlreadyExistExceptionpublic 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 CustomField
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||