@Service(value="squashtest.tm.service.CustomFieldBindingService") @Transactional public class CustomFieldBindingModificationServiceImpl extends Object implements CustomFieldBindingModificationService
| Constructor and Description |
|---|
CustomFieldBindingModificationServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
addNewCustomFieldBinding(long projectId,
org.squashtest.tm.domain.customfield.BindableEntity entity,
long customFieldId,
org.squashtest.tm.domain.customfield.CustomFieldBinding newBinding)
Will attach a
CustomField to a Project. |
void |
addRenderingLocation(long bindingId,
org.squashtest.tm.domain.customfield.RenderingLocation location)
Add a rendering location to a custom field binding
|
void |
copyCustomFieldsSettingsFromTemplate(org.squashtest.tm.domain.project.GenericProject target,
org.squashtest.tm.domain.project.GenericProject source)
Will copy the custom field bindings of the template and apply them to the project.
|
List<org.squashtest.tm.domain.customfield.CustomField> |
findAvailableCustomFields()
returns all the existing custom fields.
|
List<org.squashtest.tm.domain.customfield.CustomField> |
findAvailableCustomFields(long projectId,
org.squashtest.tm.domain.customfield.BindableEntity entity)
same as
CustomFieldBindingFinderService.findAvailableCustomFields(), restricted to the given project and bindable entity. |
List<org.squashtest.tm.domain.customfield.CustomField> |
findBoundCustomFields(long projectId,
org.squashtest.tm.domain.customfield.BindableEntity entity)
Returns the complementary of
CustomFieldBindingFinderService.findAvailableCustomFields(long, BindableEntity) |
List<org.squashtest.tm.domain.customfield.CustomFieldBinding> |
findCustomFieldsForBoundEntity(org.squashtest.tm.domain.customfield.BoundEntity boundEntity)
returns all the custom field bindinds associated to that entity wrt its project and
BindableEntity type |
List<org.squashtest.tm.domain.customfield.CustomFieldBinding> |
findCustomFieldsForGenericProject(long projectId)
returns all the custom field bindings associated to a GenericProject.
|
List<org.squashtest.tm.domain.customfield.CustomFieldBinding> |
findCustomFieldsForProjectAndEntity(long projectId,
org.squashtest.tm.domain.customfield.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<org.squashtest.tm.domain.customfield.CustomFieldBinding>> |
findCustomFieldsForProjectAndEntity(long projectId,
org.squashtest.tm.domain.customfield.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.
|
void |
removeRenderingLocation(long bindingId,
org.squashtest.tm.domain.customfield.RenderingLocation location)
Remove the rendering location from a custom field binding
|
public CustomFieldBindingModificationServiceImpl()
@Transactional(readOnly=true) public List<org.squashtest.tm.domain.customfield.CustomField> findAvailableCustomFields()
CustomFieldBindingFinderServicefindAvailableCustomFields in interface CustomFieldBindingFinderService@Transactional(readOnly=true) public List<org.squashtest.tm.domain.customfield.CustomField> findAvailableCustomFields(long projectId, org.squashtest.tm.domain.customfield.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 CustomFieldBindingFinderService@Transactional(readOnly=true) public List<org.squashtest.tm.domain.customfield.CustomField> findBoundCustomFields(long projectId, org.squashtest.tm.domain.customfield.BindableEntity entity)
CustomFieldBindingFinderServiceCustomFieldBindingFinderService.findAvailableCustomFields(long, BindableEntity)findBoundCustomFields in interface CustomFieldBindingFinderService@Transactional(readOnly=true) public List<org.squashtest.tm.domain.customfield.CustomFieldBinding> findCustomFieldsForGenericProject(long projectId)
CustomFieldBindingFinderServicefindCustomFieldsForGenericProject in interface CustomFieldBindingFinderService@Transactional(readOnly=true) public List<org.squashtest.tm.domain.customfield.CustomFieldBinding> findCustomFieldsForProjectAndEntity(long projectId, org.squashtest.tm.domain.customfield.BindableEntity entity)
CustomFieldBindingFinderServicefindCustomFieldsForProjectAndEntity in interface CustomFieldBindingFinderService@Transactional(readOnly=true) public List<org.squashtest.tm.domain.customfield.CustomFieldBinding> findCustomFieldsForBoundEntity(org.squashtest.tm.domain.customfield.BoundEntity boundEntity)
CustomFieldBindingFinderServiceBindableEntity typefindCustomFieldsForBoundEntity in interface CustomFieldBindingFinderService@Transactional(readOnly=true) public org.squashtest.tm.core.foundation.collection.PagedCollectionHolder<List<org.squashtest.tm.domain.customfield.CustomFieldBinding>> findCustomFieldsForProjectAndEntity(long projectId, org.squashtest.tm.domain.customfield.BindableEntity entity, org.squashtest.tm.core.foundation.collection.Paging paging)
CustomFieldBindingFinderServicefindCustomFieldsForProjectAndEntity in interface CustomFieldBindingFinderService@PreAuthorize(value="hasRole(\'ROLE_TM_PROJECT_MANAGER\') or hasRole(\'ROLE_ADMIN\')")
public void addNewCustomFieldBinding(long projectId,
org.squashtest.tm.domain.customfield.BindableEntity entity,
long customFieldId,
org.squashtest.tm.domain.customfield.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 addRenderingLocation(long bindingId,
org.squashtest.tm.domain.customfield.RenderingLocation location)
CustomFieldBindingModificationServiceaddRenderingLocation in interface CustomFieldBindingModificationService@PreAuthorize(value="hasRole(\'ROLE_TM_PROJECT_MANAGER\') or hasRole(\'ROLE_ADMIN\')")
public void removeRenderingLocation(long bindingId,
org.squashtest.tm.domain.customfield.RenderingLocation location)
CustomFieldBindingModificationServiceremoveRenderingLocation in interface CustomFieldBindingModificationService@PreAuthorize(value="hasRole(\'ROLE_TM_PROJECT_MANAGER\') or hasRole(\'ROLE_ADMIN\')") public void removeCustomFieldBindings(List<Long> bindingIds)
CustomFieldBindingModificationServiceremoveCustomFieldBindings in interface CustomFieldBindingModificationService@PreAuthorize(value="hasRole(\'ROLE_TM_PROJECT_MANAGER\') or hasRole(\'ROLE_ADMIN\')") public void removeCustomFieldBindings(Long projectId)
CustomFieldBindingModificationServiceremoveCustomFieldBindings 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(org.squashtest.tm.domain.project.GenericProject target,
org.squashtest.tm.domain.project.GenericProject source)
CustomFieldBindingModificationServicecopyCustomFieldsSettingsFromTemplate in interface CustomFieldBindingModificationServiceCustomFieldBindingModificationService#copyCustomFieldsSettingsFromTemplate(Project, ProjectTemplate)Copyright © 2010–2017 Henix, henix.fr. All rights reserved.