@Transactional
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(List<Long> customFieldIds) |
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.springframework.data.domain.Page<org.squashtest.tm.domain.customfield.CustomField> |
findSortedCustomFields(org.springframework.data.domain.Pageable filter)
Will find all custom fields available and return them ordered according to the given parameters.
|
List<String> |
getAvailableTagsForEntity(String boundEntityType,
List<Long> projectIds) |
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.
|
@PreAuthorize(value="hasRole(\'ROLE_ADMIN\')") void deleteCustomField(long customFieldId)
customFieldId - : the id of the custom field to delete@PreAuthorize(value="hasRole(\'ROLE_ADMIN\')") void deleteCustomField(List<Long> customFieldIds)
@PreAuthorize(value="hasRole(\'ROLE_ADMIN\')")
void persist(@NotNull
org.squashtest.tm.domain.customfield.CustomField newCustomField)
newCustomField - : the custom field to persist@PreAuthorize(value="hasRole(\'ROLE_ADMIN\')")
void changeName(long customFieldId,
String newName)
CustomField.customFieldId - the id of the concerned CustomFieldnewName - the CustomField potential new name@PreAuthorize(value="hasRole(\'ROLE_ADMIN\')") 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 mandatoryorg.squashtest.tm.exception.customfield.DefaultValueRequiredException@PreAuthorize(value="hasRole(\'ROLE_ADMIN\')") 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 optionorg.squashtest.tm.exception.customfield.OptionAlreadyExistException@PreAuthorize(value="hasRole(\'ROLE_ADMIN\')")
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 optionCodeAlreadyExistException@PreAuthorize(value="hasRole(\'ROLE_ADMIN\')") 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 CustomFieldOptionorg.squashtest.tm.exception.customfield.OptionAlreadyExistException@PreAuthorize(value="hasRole(\'ROLE_ADMIN\')")
void removeOption(long customFieldId,
String optionLabel)
CannotDeleteDefaultOptionExceptioncustomFieldId - : the id of the concerned SingleSelectFieldoptionLabel - : the label of the CustomFieldOption to remove.org.squashtest.tm.exception.customfield.CannotDeleteDefaultOptionException@PreAuthorize(value="hasRole(\'ROLE_ADMIN\')")
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.springframework.data.domain.Page<org.squashtest.tm.domain.customfield.CustomField> findSortedCustomFields(org.springframework.data.domain.Pageable filter)
filter - the Page 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 null@PreAuthorize(value="hasRole(\'ROLE_ADMIN\')")
void changeCode(long customFieldId,
String code)
customFieldId - : the id of the concerned CustomFieldcode - : the new codeCopyright © 2010–2017 Henix, henix.fr. All rights reserved.