|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.squashtest.csp.tm.internal.service.customField.CustomFieldBindingModificationServiceImpl
@Transactional @Service(value="squashtest.tm.service.CustomFieldBindingService") public class CustomFieldBindingModificationServiceImpl
| Constructor Summary | |
|---|---|
CustomFieldBindingModificationServiceImpl()
|
|
| Method Summary | |
|---|---|
void |
addNewCustomFieldBinding(long projectId,
BindableEntity entity,
long customFieldId,
CustomFieldBinding newBinding)
Will attach a CustomField to a Project. |
void |
copyCustomFieldsSettingsFromTemplate(Project newProject,
ProjectTemplate projectTemplate)
Will copy the custom field bindings of the template and apply them to the project. |
List<CustomField> |
findAvailableCustomFields()
returns all the existing custom fields. |
List<CustomField> |
findAvailableCustomFields(long projectId,
BindableEntity entity)
same as CustomFieldBindingFinderService.findAvailableCustomFields(), restricted to the given
project and bindable entity. |
List<CustomFieldBinding> |
findCustomFieldsForBoundEntity(BoundEntity boundEntity)
returns all the custom field bindinds associated to that entity wrt its project and BindableEntity type |
List<CustomFieldBinding> |
findCustomFieldsForGenericProject(long projectId)
returns all the custom field bindings associated to a GenericProject. |
List<CustomFieldBinding> |
findCustomFieldsForProjectAndEntity(long projectId,
BindableEntity entity)
returns all the custom field bindings associated to a project for a given entity type |
org.squashtest.tm.core.foundation.collection.PagedCollectionHolder<List<CustomFieldBinding>> |
findCustomFieldsForProjectAndEntity(long projectId,
BindableEntity entity,
org.squashtest.tm.core.foundation.collection.Paging paging)
returns all the custom field bindings associated to a project for a given entity type (paged version) |
void |
moveCustomFieldbindings(List<Long> bindingIds,
int newIndex)
Given a list of CustomFieldBindings, will reorder them with respect to their project and bound entity. |
void |
removeCustomFieldBindings(List<Long> bindingIds)
removes a batch of custom field bindings using their ids. |
void |
removeCustomFieldBindings(Long projectId)
removes all the custom field bindings defined for a project. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CustomFieldBindingModificationServiceImpl()
| Method Detail |
|---|
public List<CustomField> findAvailableCustomFields()
CustomFieldBindingFinderService
findAvailableCustomFields in interface CustomFieldBindingFinderService
public List<CustomField> findAvailableCustomFields(long projectId,
BindableEntity entity)
CustomFieldBindingFinderServiceCustomFieldBindingFinderService.findAvailableCustomFields(), restricted to the given
project and bindable entity. The only returned fields are those who
aren't already mapped for that project and entity.
findAvailableCustomFields in interface CustomFieldBindingFinderServicepublic List<CustomFieldBinding> findCustomFieldsForGenericProject(long projectId)
CustomFieldBindingFinderService
findCustomFieldsForGenericProject in interface CustomFieldBindingFinderService
public List<CustomFieldBinding> findCustomFieldsForProjectAndEntity(long projectId,
BindableEntity entity)
CustomFieldBindingFinderService
findCustomFieldsForProjectAndEntity in interface CustomFieldBindingFinderServicepublic List<CustomFieldBinding> findCustomFieldsForBoundEntity(BoundEntity boundEntity)
CustomFieldBindingFinderServiceBindableEntity type
findCustomFieldsForBoundEntity in interface CustomFieldBindingFinderService
public org.squashtest.tm.core.foundation.collection.PagedCollectionHolder<List<CustomFieldBinding>> findCustomFieldsForProjectAndEntity(long projectId,
BindableEntity entity,
org.squashtest.tm.core.foundation.collection.Paging paging)
CustomFieldBindingFinderService
findCustomFieldsForProjectAndEntity in interface CustomFieldBindingFinderService
@PreAuthorize(value="hasRole(\'ROLE_TM_PROJECT_MANAGER\') or hasRole(\'ROLE_ADMIN\')")
public void addNewCustomFieldBinding(long projectId,
BindableEntity entity,
long customFieldId,
CustomFieldBinding newBinding)
CustomFieldBindingModificationServiceCustomField to a Project. The details and conditions of that binding
is described in the CustomFieldBinding newBinding. The new binding will be inserted last.
addNewCustomFieldBinding in interface CustomFieldBindingModificationService@PreAuthorize(value="hasRole(\'ROLE_TM_PROJECT_MANAGER\') or hasRole(\'ROLE_ADMIN\')") public void removeCustomFieldBindings(List<Long> bindingIds)
CustomFieldBindingModificationService
removeCustomFieldBindings in interface CustomFieldBindingModificationService@PreAuthorize(value="hasRole(\'ROLE_TM_PROJECT_MANAGER\') or hasRole(\'ROLE_ADMIN\')") public void removeCustomFieldBindings(Long projectId)
CustomFieldBindingModificationService
removeCustomFieldBindings in interface CustomFieldBindingModificationServiceprojectId - the id of the project
@PreAuthorize(value="hasRole(\'ROLE_TM_PROJECT_MANAGER\') or hasRole(\'ROLE_ADMIN\')")
public void moveCustomFieldbindings(List<Long> bindingIds,
int newIndex)
CustomFieldBindingModificationServiceCustomFieldBindings, will reorder them with respect to their project and bound entity. This method assumes that
they all bind the same entity to the same project. If the input list mixes binding for different projects and/or entities, unexpected
behavior may occur.
moveCustomFieldbindings in interface CustomFieldBindingModificationServiceCustomFieldBindingModificationService.copyCustomFieldsSettingsFromTemplate(Project, ProjectTemplate)
@PreAuthorize(value="hasRole(\'ROLE_ADMIN\')")
public void copyCustomFieldsSettingsFromTemplate(Project newProject,
ProjectTemplate projectTemplate)
CustomFieldBindingModificationService
copyCustomFieldsSettingsFromTemplate in interface CustomFieldBindingModificationServiceCustomFieldBindingModificationService.copyCustomFieldsSettingsFromTemplate(Project, ProjectTemplate)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||