|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.squashtest.tm.service.internal.customfield.CustomCustomFieldManagerServiceImpl
@Service(value="CustomCustomFieldManagerService") public class CustomCustomFieldManagerServiceImpl
Implementations for (non dynamically generated) custom-field management services.
| Constructor Summary | |
|---|---|
CustomCustomFieldManagerServiceImpl()
|
|
| 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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CustomCustomFieldManagerServiceImpl()
| Method Detail |
|---|
public org.squashtest.tm.core.foundation.collection.PagedCollectionHolder<List<org.squashtest.tm.domain.customfield.CustomField>> findSortedCustomFields(org.squashtest.tm.core.foundation.collection.PagingAndSorting filter)
CustomCustomFieldManagerService
findSortedCustomFields in interface CustomCustomFieldManagerServicefilter - the PagedCollectionHolder that holds order and paging params.
CustomFieldFinderService.findSortedCustomFields(PagingAndSorting)public void deleteCustomField(long customFieldId)
CustomCustomFieldManagerService
deleteCustomField in interface CustomCustomFieldManagerServicecustomFieldId - : the id of the custom field to deleteCustomCustomFieldManagerService.deleteCustomField(long)@PreAuthorize(value="hasRole(\'ROLE_ADMIN\')") public void persist(org.squashtest.tm.domain.customfield.CustomField newCustomField)
CustomCustomFieldManagerService
persist 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)
CustomCustomFieldManagerService
changeOptional 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 id
findSingleSelectFieldById in interface CustomCustomFieldManagerServicecustomFieldId - the id of the SingleSelectField
SingleSelectField or nullCustomFieldFinderService.findSingleSelectFieldById(Long)
public void removeOption(long customFieldId,
String optionLabel)
CustomCustomFieldManagerServiceCannotDeleteDefaultOptionException
removeOption 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)
CustomCustomFieldManagerService
changeOptionsPositions 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)
CustomCustomFieldManagerService
changeCode in interface CustomCustomFieldManagerServicecustomFieldId - : the id of the concerned CustomFieldcode - : the new codeCustomCustomFieldManagerService.changeCode(long, String)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||