org.squashtest.tm.service.internal.project
Class CustomProjectModificationServiceImpl

java.lang.Object
  extended by org.squashtest.tm.service.internal.project.CustomProjectModificationServiceImpl
All Implemented Interfaces:
CustomProjectModificationService, ProjectFinder

@Service(value="CustomProjectModificationService")
@Transactional
public class CustomProjectModificationServiceImpl
extends Object
implements CustomProjectModificationService

Author:
mpagnon

Constructor Summary
CustomProjectModificationServiceImpl()
           
 
Method Summary
 org.squashtest.tm.domain.project.Project addProjectAndCopySettingsFromTemplate(org.squashtest.tm.domain.project.Project newProject, long templateId, boolean copyAssignedUsers, boolean copyCustomFieldsSettings, boolean copyBugtrackerSettings, boolean copyTestAutomationSettings)
          Will persist the new Project and add settings copied from a given ProjectTemplate.
 void deleteProject(long projectId)
           
 List<org.squashtest.tm.domain.project.Project> findAllReadable()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CustomProjectModificationServiceImpl

public CustomProjectModificationServiceImpl()
Method Detail

deleteProject

@PreAuthorize(value="hasRole(\'ROLE_ADMIN\')")
public void deleteProject(long projectId)
Specified by:
deleteProject in interface CustomProjectModificationService

findAllReadable

@PostFilter(value="hasPermission(filterObject, \'READ\') or  hasRole(\'ROLE_ADMIN\')")
@Transactional(readOnly=true)
public List<org.squashtest.tm.domain.project.Project> findAllReadable()
Specified by:
findAllReadable in interface ProjectFinder

addProjectAndCopySettingsFromTemplate

@PreAuthorize(value="hasRole(\'ROLE_ADMIN\')")
public org.squashtest.tm.domain.project.Project addProjectAndCopySettingsFromTemplate(org.squashtest.tm.domain.project.Project newProject,
                                                                                                   long templateId,
                                                                                                   boolean copyAssignedUsers,
                                                                                                   boolean copyCustomFieldsSettings,
                                                                                                   boolean copyBugtrackerSettings,
                                                                                                   boolean copyTestAutomationSettings)
Description copied from interface: CustomProjectModificationService
Will persist the new Project and add settings copied from a given ProjectTemplate.

Specified by:
addProjectAndCopySettingsFromTemplate in interface CustomProjectModificationService
Parameters:
newProject - : the new Project entity to persist
templateId - : the id of the ProjectTemplate to copy the settings from
copyAssignedUsers - : whether to copy the Template's assigned Users or not
copyCustomFieldsSettings - : whether to copy the Template's CustomFields settings or not
copyBugtrackerSettings - : whether to copy the Template's bug-tracker settings or not
copyTestAutomationSettings - : whether to copy the Template's automation settings or not
Returns:
the persisted new Project
See Also:
CustomProjectModificationService.addProjectAndCopySettingsFromTemplate(Project, long, boolean, boolean, boolean, boolean)


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