org.squashtest.tm.service.internal.campaign
Class TestSuiteTestPlanManagerServiceImpl

java.lang.Object
  extended by org.squashtest.tm.service.internal.campaign.TestSuiteTestPlanManagerServiceImpl
All Implemented Interfaces:
TestSuiteTestPlanManagerService

@Service(value="squashtest.tm.service.TestSuiteTestPlanManagerService")
@Transactional
public class TestSuiteTestPlanManagerServiceImpl
extends Object
implements TestSuiteTestPlanManagerService


Constructor Summary
TestSuiteTestPlanManagerServiceImpl()
           
 
Method Summary
 void addTestCasesToIterationAndTestSuite(List<Long> testCaseIds, long suiteId)
           
 void bindTestPlan(long suiteId, List<Long> itemTestPlanIds)
          That method will attach several IterationTestPlanItem to the given TestSuite.
 void bindTestPlanObj(org.squashtest.tm.domain.campaign.TestSuite testSuite, List<org.squashtest.tm.domain.campaign.IterationTestPlanItem> itemTestPlans)
          That method will attach several IterationTestPlanItem to the given TestSuite.
 void bindTestPlanToMultipleSuites(List<Long> suiteIds, List<Long> itemTestPlanIds)
          That method will attach several IterationTestPlanItem to several TestSuite.
 void bindTestPlanToMultipleSuitesObj(List<org.squashtest.tm.domain.campaign.TestSuite> testSuites, List<org.squashtest.tm.domain.campaign.IterationTestPlanItem> itemTestPlans)
          That method will attach several IterationTestPlanItem to the given TestSuites.
 void changeTestPlanPosition(long suiteId, int newIndex, List<Long> itemIds)
           
 void detachTestPlanFromTestSuite(List<Long> testPlanIds, long suiteId)
           
 boolean detachTestPlanFromTestSuiteAndRemoveFromIteration(List<Long> testPlanIds, long suiteId)
           
 org.squashtest.tm.core.foundation.collection.PagedCollectionHolder<List<IndexedIterationTestPlanItem>> findAssignedTestPlan(long testSuiteId, org.squashtest.tm.core.foundation.collection.PagingAndMultiSorting sorting, org.squashtest.tm.core.foundation.collection.ColumnFiltering columnFiltering)
          Returns a suite test plan filtered for a specific user.
 org.squashtest.tm.domain.campaign.TestSuite findTestSuite(long testSuiteId)
          Find a iteration using its id
 void reorderTestPlan(long suiteId, org.squashtest.tm.core.foundation.collection.MultiSorting newSorting)
           
 void unbindTestPlanObj(org.squashtest.tm.domain.campaign.TestSuite testSuite, List<org.squashtest.tm.domain.campaign.IterationTestPlanItem> itemTestPlans)
          That method will detach several IterationTestPlanItem from the given TestSuite.
 void unbindTestPlanToMultipleSuites(List<Long> unboundTestSuiteIds, List<Long> itpIds)
          That method will detach several IterationTestPlanItem from the given TestSuites.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestSuiteTestPlanManagerServiceImpl

public TestSuiteTestPlanManagerServiceImpl()
Method Detail

findTestSuite

@PreAuthorize(value="hasPermission(#testSuiteId, \'org.squashtest.tm.domain.campaign.TestSuite\', \'READ\') or hasRole(\'ROLE_ADMIN\')")
public org.squashtest.tm.domain.campaign.TestSuite findTestSuite(long testSuiteId)
Description copied from interface: TestSuiteTestPlanManagerService
Find a iteration using its id

Specified by:
findTestSuite in interface TestSuiteTestPlanManagerService

bindTestPlan

@PreAuthorize(value="hasPermission(#suiteId, \'org.squashtest.tm.domain.campaign.TestSuite\', \'LINK\') or hasRole(\'ROLE_ADMIN\')")
public void bindTestPlan(long suiteId,
                                      List<Long> itemTestPlanIds)
Description copied from interface: TestSuiteTestPlanManagerService

That method will attach several IterationTestPlanItem to the given TestSuite. As usual, they are identified using their Ids.

The implementation must also check that all these entities all belong to the same iteration or throw an unchecked exception if not. TODO : define that exception.

Specified by:
bindTestPlan in interface TestSuiteTestPlanManagerService

bindTestPlanToMultipleSuites

public void bindTestPlanToMultipleSuites(List<Long> suiteIds,
                                         List<Long> itemTestPlanIds)
Description copied from interface: TestSuiteTestPlanManagerService

That method will attach several IterationTestPlanItem to several TestSuite. As usual, they are identified using their Ids.

The implementation must also check that all these entities all belong to the same iteration or throw an unchecked exception if not. TODO : define that exception.

Specified by:
bindTestPlanToMultipleSuites in interface TestSuiteTestPlanManagerService

bindTestPlanObj

@PreAuthorize(value="hasPermission(#testSuite, \'LINK\') or hasRole(\'ROLE_ADMIN\')")
public void bindTestPlanObj(org.squashtest.tm.domain.campaign.TestSuite testSuite,
                                         List<org.squashtest.tm.domain.campaign.IterationTestPlanItem> itemTestPlans)
Description copied from interface: TestSuiteTestPlanManagerService

That method will attach several IterationTestPlanItem to the given TestSuite. They are identified using their Objects.

These entities all belong to the same iteration since they have previously been attached to it.

Specified by:
bindTestPlanObj in interface TestSuiteTestPlanManagerService

bindTestPlanToMultipleSuitesObj

public void bindTestPlanToMultipleSuitesObj(List<org.squashtest.tm.domain.campaign.TestSuite> testSuites,
                                            List<org.squashtest.tm.domain.campaign.IterationTestPlanItem> itemTestPlans)
Description copied from interface: TestSuiteTestPlanManagerService

That method will attach several IterationTestPlanItem to the given TestSuites. They are identified using their Objects.

These entities all belong to the same iteration since they have previously been attached to it.

Specified by:
bindTestPlanToMultipleSuitesObj in interface TestSuiteTestPlanManagerService

unbindTestPlanObj

@PreAuthorize(value="hasPermission(#testSuite, \'LINK\') or hasRole(\'ROLE_ADMIN\')")
public void unbindTestPlanObj(org.squashtest.tm.domain.campaign.TestSuite testSuite,
                                           List<org.squashtest.tm.domain.campaign.IterationTestPlanItem> itemTestPlans)
Description copied from interface: TestSuiteTestPlanManagerService

That method will detach several IterationTestPlanItem from the given TestSuite. They are identified using their Objects.

These entities all belong to the same iteration since they have previously been attached to it.

Specified by:
unbindTestPlanObj in interface TestSuiteTestPlanManagerService

unbindTestPlanToMultipleSuites

public void unbindTestPlanToMultipleSuites(List<Long> unboundTestSuiteIds,
                                           List<Long> itpIds)
Description copied from interface: TestSuiteTestPlanManagerService

That method will detach several IterationTestPlanItem from the given TestSuites. They are identified using their ids.

These entities all belong to the same iteration since they have previously been attached to it.

Specified by:
unbindTestPlanToMultipleSuites in interface TestSuiteTestPlanManagerService

findAssignedTestPlan

public org.squashtest.tm.core.foundation.collection.PagedCollectionHolder<List<IndexedIterationTestPlanItem>> findAssignedTestPlan(long testSuiteId,
                                                                                                                                   org.squashtest.tm.core.foundation.collection.PagingAndMultiSorting sorting,
                                                                                                                                   org.squashtest.tm.core.foundation.collection.ColumnFiltering columnFiltering)
Description copied from interface: TestSuiteTestPlanManagerService
Returns a suite test plan filtered for a specific user. It returns an collection of items only the items that are assigned to that user or have been executed by that user.

Specified by:
findAssignedTestPlan in interface TestSuiteTestPlanManagerService
Returns:
the test plan of given iteration filtered by the current user
See Also:
TestSuiteTestPlanManagerService#findAssignedTestPlan(long, PagingAndMultiSorting)

changeTestPlanPosition

@PreAuthorize(value="hasPermission(#suiteId, \'org.squashtest.tm.domain.campaign.TestSuite\', \'LINK\') or hasRole(\'ROLE_ADMIN\')")
public void changeTestPlanPosition(long suiteId,
                                                int newIndex,
                                                List<Long> itemIds)
Specified by:
changeTestPlanPosition in interface TestSuiteTestPlanManagerService

reorderTestPlan

@PreAuthorize(value="hasPermission(#suiteId, \'org.squashtest.tm.domain.campaign.TestSuite\', \'LINK\') or hasRole(\'ROLE_ADMIN\')")
public void reorderTestPlan(long suiteId,
                                         org.squashtest.tm.core.foundation.collection.MultiSorting newSorting)
Specified by:
reorderTestPlan in interface TestSuiteTestPlanManagerService

addTestCasesToIterationAndTestSuite

@PreAuthorize(value="hasPermission(#suiteId, \'org.squashtest.tm.domain.campaign.TestSuite\', \'LINK\') or hasRole(\'ROLE_ADMIN\')")
public void addTestCasesToIterationAndTestSuite(List<Long> testCaseIds,
                                                             long suiteId)
Specified by:
addTestCasesToIterationAndTestSuite in interface TestSuiteTestPlanManagerService

detachTestPlanFromTestSuite

@PreAuthorize(value="hasPermission(#suiteId, \'org.squashtest.tm.domain.campaign.TestSuite\', \'LINK\') or hasRole(\'ROLE_ADMIN\')")
public void detachTestPlanFromTestSuite(List<Long> testPlanIds,
                                                     long suiteId)
Specified by:
detachTestPlanFromTestSuite in interface TestSuiteTestPlanManagerService

detachTestPlanFromTestSuiteAndRemoveFromIteration

@PreAuthorize(value="hasPermission(#suiteId, \'org.squashtest.tm.domain.campaign.TestSuite\', \'LINK\') or hasRole(\'ROLE_ADMIN\')")
public boolean detachTestPlanFromTestSuiteAndRemoveFromIteration(List<Long> testPlanIds,
                                                                              long suiteId)
Specified by:
detachTestPlanFromTestSuiteAndRemoveFromIteration in interface TestSuiteTestPlanManagerService


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