|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
@Transactional @PreAuthorize(value="hasRole(\'ROLE_ADMIN\')") public interface CustomCustomFieldManagerService
Custom-Field manager services which cannot be dynamically generated.
| Method Summary | |
|---|---|
void |
addOption(Long customFieldId,
org.squashtest.tm.domain.customfield.CustomFieldOption option)
Will check if the new option's label is available among all the concerned CustomField's
CustomFieldOption, check also if the code is available,if so, will add the new option at the bottom of the list. |
void |
changeCode(long customFieldId,
String code)
Will change the code of the custom field after having checked that : the code is unique among all custom fields, and that the code contains only letters (upper and lower cases), numbers or under-scores. |
void |
changeName(long customFieldId,
String newName)
Will check if new name is available among all custom fields and, if so, will change the name of the concerned CustomField. |
void |
changeOptional(Long customFieldId,
Boolean optional)
If custom-field becomes mandatory, will check that a default value exist. |
void |
changeOptionCode(long customFieldId,
String optionLabel,
String newCode)
Will check if the new code is available among all the concerned CustomField's CustomFieldOption,
if so, will change the code of the concerned custom-field's option. |
void |
changeOptionLabel(Long customFieldId,
String optionLabel,
String newLabel)
Will check if the new label is available among all the concerned CustomField's CustomFieldOption,
if so, will change the label of the concerned custom-field's option. |
void |
changeOptionsPositions(long customFieldId,
int newIndex,
List<String> optionsLabels)
Will change custom field's options positions. |
void |
deleteCustomField(long customFieldId)
Will delete the custom-field entity |
org.squashtest.tm.domain.customfield.SingleSelectField |
findSingleSelectFieldById(Long customFieldId)
Will find the SingleSelectField of the given id |
org.squashtest.tm.core.foundation.collection.PagedCollectionHolder<List<org.squashtest.tm.domain.customfield.CustomField>> |
findSortedCustomFields(org.squashtest.tm.core.foundation.collection.PagingAndSorting filter)
Will find all custom fields available and return them ordered according to the given parameters. |
void |
persist(org.squashtest.tm.domain.customfield.CustomField newCustomField)
Will persist the given custom field. |
void |
removeOption(long customFieldId,
String optionLabel)
Will remove the from the custom-field's option list. |
| Method Detail |
|---|
void deleteCustomField(long customFieldId)
customFieldId - : the id of the custom field to delete
void persist(@NotNull
org.squashtest.tm.domain.customfield.CustomField newCustomField)
newCustomField - : the custom field to persist
void changeName(long customFieldId,
String newName)
CustomField.
customFieldId - the id of the concerned CustomFieldnewName - the CustomField potential new name
void changeOptional(Long customFieldId,
Boolean optional)
customFieldId - the id of the concerned CustomFieldoptional - : true if the custom-field changes to be optionalfalse if it changes to be mandatory
org.squashtest.tm.exception.customfield.DefaultValueRequiredException
void changeOptionLabel(Long customFieldId,
String optionLabel,
String newLabel)
CustomField's CustomFieldOption,
if so, will change the label of the concerned custom-field's option.
customFieldId - : the id of the concerned CustomFieldoptionLabel - : the current CustomFieldOption's labelnewLabel - : the potential new label for the concerned custom-field's option
org.squashtest.tm.exception.customfield.OptionAlreadyExistException
void changeOptionCode(long customFieldId,
String optionLabel,
String newCode)
CustomField's CustomFieldOption,
if so, will change the code of the concerned custom-field's option.
customFieldId - : the id of the concerned CustomFieldoptionLabel - : the CustomFieldOption's labelnewCode - : the potential new code for the concerned custom-field's option
CodeAlreadyExistException
void addOption(Long customFieldId,
org.squashtest.tm.domain.customfield.CustomFieldOption option)
CustomField's
CustomFieldOption, check also if the code is available,if so, will add the new option at the bottom of the list.
customFieldId - : the id of the concerned CustomFieldoption - : the new CustomFieldOption
org.squashtest.tm.exception.customfield.OptionAlreadyExistException
void removeOption(long customFieldId,
String optionLabel)
CannotDeleteDefaultOptionException
customFieldId - : the id of the concerned SingleSelectFieldoptionLabel - : the label of the CustomFieldOption to remove.
org.squashtest.tm.exception.customfield.CannotDeleteDefaultOptionException
void changeOptionsPositions(long customFieldId,
int newIndex,
List<String> optionsLabels)
customFieldId - : the id of the concerned CustomField.newIndex - : the lowest index for the moved selectionoptionsLabels - : the labels of the moved optionsorg.squashtest.tm.core.foundation.collection.PagedCollectionHolder<List<org.squashtest.tm.domain.customfield.CustomField>> findSortedCustomFields(org.squashtest.tm.core.foundation.collection.PagingAndSorting filter)
filter - the PagedCollectionHolder that holds order and paging params.
org.squashtest.tm.domain.customfield.SingleSelectField findSingleSelectFieldById(Long customFieldId)
SingleSelectField of the given id
customFieldId - the id of the SingleSelectField
SingleSelectField or null
void changeCode(long customFieldId,
String code)
customFieldId - : the id of the concerned CustomFieldcode - : the new code
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||