@Service(value="CustomCustomFieldManagerService") public class CustomCustomFieldManagerServiceImpl extends Object implements CustomCustomFieldManagerService
| Constructor and Description |
|---|
CustomCustomFieldManagerServiceImpl() |
| 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 pageable)
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.
|
public org.springframework.data.domain.Page<org.squashtest.tm.domain.customfield.CustomField> findSortedCustomFields(org.springframework.data.domain.Pageable pageable)
CustomCustomFieldManagerServicefindSortedCustomFields in interface CustomCustomFieldManagerServicepageable - the Page that holds order and paging params.org.squashtest.tm.service.customfield.CustomFieldFinderService#findSortedCustomFields(Pageable)public void deleteCustomField(long customFieldId)
CustomCustomFieldManagerServicedeleteCustomField in interface CustomCustomFieldManagerServicecustomFieldId - : the id of the custom field to deleteCustomCustomFieldManagerService.deleteCustomField(long)public void deleteCustomField(List<Long> customFieldIds)
deleteCustomField in interface CustomCustomFieldManagerServiceCustomCustomFieldManagerService.deleteCustomField(long)@PreAuthorize(value="hasRole(\'ROLE_ADMIN\')") public void persist(org.squashtest.tm.domain.customfield.CustomField newCustomField)
CustomCustomFieldManagerServicepersist in interface CustomCustomFieldManagerServicenewCustomField - : the custom field to persistCustomCustomFieldManagerService.persist(org.squashtest.tm.domain.customfield.CustomField)public void changeName(long customFieldId,
String newName)
CustomCustomFieldManagerServiceCustomField.changeName in interface CustomCustomFieldManagerServicecustomFieldId - the id of the concerned CustomFieldnewName - the CustomField potential new nameCustomCustomFieldManagerService.changeName(long, String)public void changeOptional(Long customFieldId, Boolean optional)
CustomCustomFieldManagerServicechangeOptional in interface CustomCustomFieldManagerServicecustomFieldId - the id of the concerned CustomFieldoptional - : true if the custom-field changes to be optionalfalse if it changes to be mandatoryCustomCustomFieldManagerService.changeOptional(Long, Boolean)public void changeOptionLabel(Long customFieldId, String optionLabel, String newLabel)
CustomCustomFieldManagerServiceCustomField's CustomFieldOption,
if so, will change the label of the concerned custom-field's option.changeOptionLabel in interface CustomCustomFieldManagerServicecustomFieldId - : the id of the concerned CustomFieldoptionLabel - : the current CustomFieldOption's labelnewLabel - : the potential new label for the concerned custom-field's optionCustomCustomFieldManagerService.changeOptionLabel(Long, String,
String)public void changeOptionCode(long customFieldId,
String optionLabel,
String newCode)
CustomCustomFieldManagerServiceCustomField's CustomFieldOption,
if so, will change the code of the concerned custom-field's option.changeOptionCode in interface CustomCustomFieldManagerServicecustomFieldId - : the id of the concerned CustomFieldoptionLabel - : the CustomFieldOption's labelnewCode - : the potential new code for the concerned custom-field's optionorg.squashtest.tm.service.customfield.CustomCustomFieldManagerService#changeOptionCode(Long, String,
String)public void addOption(Long customFieldId, org.squashtest.tm.domain.customfield.CustomFieldOption option)
CustomCustomFieldManagerServiceCustomField's
CustomFieldOption, check also if the code is available,if so, will add the new option at the bottom of the list.addOption in interface CustomCustomFieldManagerServicecustomFieldId - : the id of the concerned CustomFieldoption - : the new CustomFieldOptionCustomCustomFieldManagerService.addOption(Long, CustomFieldOption)public org.squashtest.tm.domain.customfield.SingleSelectField findSingleSelectFieldById(Long customFieldId)
CustomCustomFieldManagerServiceSingleSelectField of the given idfindSingleSelectFieldById in interface CustomCustomFieldManagerServicecustomFieldId - the id of the SingleSelectFieldSingleSelectField or nullCustomFieldFinderService.findSingleSelectFieldById(Long)public void removeOption(long customFieldId,
String optionLabel)
CustomCustomFieldManagerServiceCannotDeleteDefaultOptionExceptionremoveOption in interface CustomCustomFieldManagerServicecustomFieldId - : the id of the concerned SingleSelectFieldoptionLabel - : the label of the CustomFieldOption to remove.CustomCustomFieldManagerService.removeOption(long, String)public void changeOptionsPositions(long customFieldId,
int newIndex,
List<String> optionsLabels)
CustomCustomFieldManagerServicechangeOptionsPositions in interface CustomCustomFieldManagerServicecustomFieldId - : the id of the concerned CustomField.newIndex - : the lowest index for the moved selectionoptionsLabels - : the labels of the moved optionsCustomCustomFieldManagerService.changeOptionsPositions(long, int,
List)public void changeCode(long customFieldId,
String code)
CustomCustomFieldManagerServicechangeCode in interface CustomCustomFieldManagerServicecustomFieldId - : the id of the concerned CustomFieldcode - : the new codeCustomCustomFieldManagerService.changeCode(long, String)public List<String> getAvailableTagsForEntity(String boundEntityType, List<Long> projectIds)
getAvailableTagsForEntity in interface CustomCustomFieldManagerServiceCopyright © 2010–2017 Henix, henix.fr. All rights reserved.