org.squashtest.tm.service.customfield
@Transactional @PreAuthorize(value="hasRole(\'ROLE_ADMIN\')") public interface CustomCustomFieldManagerService
| Modifier and Type | Method and Description |
|---|---|
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.
|
void deleteCustomField(long customFieldId)
customFieldId - : the id of the custom field to deletevoid persist(@NotNull
org.squashtest.tm.domain.customfield.CustomField newCustomField)
newCustomField - : the custom field to persistvoid changeName(long customFieldId,
String newName)
CustomField.customFieldId - the id of the concerned CustomFieldnewName - the CustomField potential new namevoid 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 mandatoryorg.squashtest.tm.exception.customfield.DefaultValueRequiredExceptionvoid 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 optionorg.squashtest.tm.exception.customfield.OptionAlreadyExistExceptionvoid 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 optionCodeAlreadyExistExceptionvoid 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 CustomFieldOptionorg.squashtest.tm.exception.customfield.OptionAlreadyExistExceptionvoid removeOption(long customFieldId,
String optionLabel)
CannotDeleteDefaultOptionExceptioncustomFieldId - : the id of the concerned SingleSelectFieldoptionLabel - : the label of the CustomFieldOption to remove.org.squashtest.tm.exception.customfield.CannotDeleteDefaultOptionExceptionvoid 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 idcustomFieldId - the id of the SingleSelectFieldSingleSelectField or nullvoid changeCode(long customFieldId,
String code)
customFieldId - : the id of the concerned CustomFieldcode - : the new codeCopyright © 2010-2014 Henix, henix.fr. All Rights Reserved.