org.squashtest.tm.service.customfield
Interface CustomFieldBindingModificationService

All Superinterfaces:
CustomFieldBindingFinderService
All Known Implementing Classes:
CustomFieldBindingModificationServiceImpl

public interface CustomFieldBindingModificationService
extends CustomFieldBindingFinderService

An interface for services around CustomField. The user calling the following methods must have a role 'admin' or 'project manager'.

Author:
bsiri

Method Summary
 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.Project newProject, org.squashtest.tm.domain.project.ProjectTemplate projectTemplate)
          Will copy the custom field bindings of the template and apply them to the project.
 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
 
Methods inherited from interface org.squashtest.tm.service.customfield.CustomFieldBindingFinderService
findAvailableCustomFields, findAvailableCustomFields, findBoundCustomFields, findCustomFieldsForBoundEntity, findCustomFieldsForGenericProject, findCustomFieldsForProjectAndEntity, findCustomFieldsForProjectAndEntity
 

Method Detail

addNewCustomFieldBinding

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. The details and conditions of that binding is described in the CustomFieldBinding newBinding. The new binding will be inserted last.

Parameters:
projectId -
customFieldId -
entity -
newBinding -

addRenderingLocation

void addRenderingLocation(long bindingId,
                          org.squashtest.tm.domain.customfield.RenderingLocation location)
Add a rendering location to a custom field binding

Parameters:
bindingId -
location -

removeRenderingLocation

void removeRenderingLocation(long bindingId,
                             org.squashtest.tm.domain.customfield.RenderingLocation location)
Remove the rendering location from a custom field binding

Parameters:
bindingId -
location -

removeCustomFieldBindings

void removeCustomFieldBindings(List<Long> bindingIds)
removes a batch of custom field bindings using their ids.


removeCustomFieldBindings

void removeCustomFieldBindings(Long projectId)
removes all the custom field bindings defined for a project.

Parameters:
projectId - the id of the project

moveCustomFieldbindings

void moveCustomFieldbindings(List<Long> bindingIds,
                             int newIndex)
Given a list of CustomFieldBindings, 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.

Parameters:
bindingIds -
newIndex -

copyCustomFieldsSettingsFromTemplate

void copyCustomFieldsSettingsFromTemplate(org.squashtest.tm.domain.project.Project newProject,
                                          org.squashtest.tm.domain.project.ProjectTemplate projectTemplate)
Will copy the custom field bindings of the template and apply them to the project.

Parameters:
newProject -
projectTemplate -


Copyright © 2010-2013 Henix, henix.fr. All Rights Reserved.