org.squashtest.csp.tm.internal.service
Class IterationTestPlanManagerServiceImpl

java.lang.Object
  extended by org.squashtest.csp.tm.internal.service.IterationTestPlanManagerServiceImpl
All Implemented Interfaces:
IterationTestPlanManagerService

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


Constructor Summary
IterationTestPlanManagerServiceImpl()
           
 
Method Summary
 void addTestCasesToIteration(List<Long> objectsIds, long iterationId)
          Adds a list of test cases to a campaign.
 void assignUserToTestPlanItem(Long testPlanId, long iterationId, Long userId)
          Assign User with Write Access to a TestPlan item.
 void assignUserToTestPlanItems(List<Long> testPlanIds, long iterationId, Long userId)
          Assign User with Write Access to a multiple TestPlan items.
 List<User> findAssignableUserForTestPlan(long iterationId)
          Get Users with Write Access for an Iteration and its TestPlan.
 Iteration findIteration(long iterationId)
          Find a iteration using its id
 List<TestCaseLibrary> findLinkableTestCaseLibraries()
          Returns a collection of TestCaseLibrary, the test cases of which may be added to the campaign
 List<TestCase> findPlannedTestCases(Long iterationId)
           
 FilteredCollectionHolder<List<IterationTestPlanItem>> findTestPlan(long iterationId, CollectionSorting filter)
           
 IterationTestPlanItem findTestPlanItem(Long iterationId, Long itemTestPlanId)
           
 IterationTestPlanItem findTestPlanItemByTestCaseId(long iterationId, long testCaseId)
          Adds a list of test cases to a campaign.
 boolean removeTestPlanFromIteration(Long testPlanId, long iterationId)
          Removes a test case from a campaign excepted the test plans which were executed
 boolean removeTestPlansFromIteration(List<Long> testPlanIds, long iterationId)
          Removes a list of test cases from a campaign excepted the test plans which were executed
 void setObjectAclService(org.squashtest.csp.core.security.acls.model.ObjectAclService aclService)
           
 void setObjectIdentityRetrievalStrategy(org.springframework.security.acls.model.ObjectIdentityRetrievalStrategy objectIdentityRetrievalStrategy)
           
 void updateTestCaseLastExecutedByAndOn(IterationTestPlanItem givenTestPlan, Date lastExecutedOn, String lastExecutedBy)
          Update item test plan lastExecuted data (by and on) (for the moment they're constants)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IterationTestPlanManagerServiceImpl

public IterationTestPlanManagerServiceImpl()
Method Detail

setObjectAclService

@ServiceReference
public void setObjectAclService(org.squashtest.csp.core.security.acls.model.ObjectAclService aclService)

setObjectIdentityRetrievalStrategy

@ServiceReference
public void setObjectIdentityRetrievalStrategy(org.springframework.security.acls.model.ObjectIdentityRetrievalStrategy objectIdentityRetrievalStrategy)

findIteration

public Iteration findIteration(long iterationId)
Description copied from interface: IterationTestPlanManagerService
Find a iteration using its id

Specified by:
findIteration in interface IterationTestPlanManagerService

findLinkableTestCaseLibraries

@PostFilter(value="hasPermission(filterObject, \'READ\') or hasRole(\'ROLE_ADMIN\')")
public List<TestCaseLibrary> findLinkableTestCaseLibraries()
Description copied from interface: IterationTestPlanManagerService
Returns a collection of TestCaseLibrary, the test cases of which may be added to the campaign

Specified by:
findLinkableTestCaseLibraries in interface IterationTestPlanManagerService

addTestCasesToIteration

@PreAuthorize(value="hasPermission(#iterationId, \'org.squashtest.csp.tm.domain.campaign.Iteration\', \'WRITE\') or hasRole(\'ROLE_ADMIN\')")
public void addTestCasesToIteration(List<Long> objectsIds,
                                                 long iterationId)
Description copied from interface: IterationTestPlanManagerService
Adds a list of test cases to a campaign.

Specified by:
addTestCasesToIteration in interface IterationTestPlanManagerService

removeTestPlansFromIteration

@PreAuthorize(value="hasPermission(#iterationId, \'org.squashtest.csp.tm.domain.campaign.Iteration\', \'WRITE\') or hasRole(\'ROLE_ADMIN\')")
public boolean removeTestPlansFromIteration(List<Long> testPlanIds,
                                                         long iterationId)
Description copied from interface: IterationTestPlanManagerService
Removes a list of test cases from a campaign excepted the test plans which were executed

Specified by:
removeTestPlansFromIteration in interface IterationTestPlanManagerService
Parameters:
testPlanIds - the ids of the test plan managing that test case for that iteration
iterationId - the id of the iteration
Returns:
true if at least one test plan was already executed and therefore not deleted

removeTestPlanFromIteration

@PreAuthorize(value="hasPermission(#iterationId, \'org.squashtest.csp.tm.domain.campaign.Iteration\', \'WRITE\') or hasRole(\'ROLE_ADMIN\')")
public boolean removeTestPlanFromIteration(Long testPlanId,
                                                        long iterationId)
Description copied from interface: IterationTestPlanManagerService
Removes a test case from a campaign excepted the test plans which were executed

Specified by:
removeTestPlanFromIteration in interface IterationTestPlanManagerService
Parameters:
testPlanId - the id of the test plan managing that test case for that iteration
Returns:
true if the test plan was already executed and therefore not deleted

findPlannedTestCases

@PreAuthorize(value="hasPermission(#iterationId, \'org.squashtest.csp.tm.domain.campaign.Iteration\', \'READ\') or hasRole(\'ROLE_ADMIN\')")
public List<TestCase> findPlannedTestCases(Long iterationId)
Specified by:
findPlannedTestCases in interface IterationTestPlanManagerService

updateTestCaseLastExecutedByAndOn

public void updateTestCaseLastExecutedByAndOn(IterationTestPlanItem givenTestPlan,
                                              Date lastExecutedOn,
                                              String lastExecutedBy)
Description copied from interface: IterationTestPlanManagerService
Update item test plan lastExecuted data (by and on) (for the moment they're constants)

Specified by:
updateTestCaseLastExecutedByAndOn in interface IterationTestPlanManagerService
Parameters:
givenTestPlan - : the test plan to update

findTestPlan

public FilteredCollectionHolder<List<IterationTestPlanItem>> findTestPlan(long iterationId,
                                                                          CollectionSorting filter)
Specified by:
findTestPlan in interface IterationTestPlanManagerService

findAssignableUserForTestPlan

public List<User> findAssignableUserForTestPlan(long iterationId)
Description copied from interface: IterationTestPlanManagerService
Get Users with Write Access for an Iteration and its TestPlan.

Specified by:
findAssignableUserForTestPlan in interface IterationTestPlanManagerService

assignUserToTestPlanItem

public void assignUserToTestPlanItem(Long testPlanId,
                                     long iterationId,
                                     Long userId)
Description copied from interface: IterationTestPlanManagerService
Assign User with Write Access to a TestPlan item.

Specified by:
assignUserToTestPlanItem in interface IterationTestPlanManagerService

assignUserToTestPlanItems

public void assignUserToTestPlanItems(List<Long> testPlanIds,
                                      long iterationId,
                                      Long userId)
Description copied from interface: IterationTestPlanManagerService
Assign User with Write Access to a multiple TestPlan items.

Specified by:
assignUserToTestPlanItems in interface IterationTestPlanManagerService

findTestPlanItemByTestCaseId

public IterationTestPlanItem findTestPlanItemByTestCaseId(long iterationId,
                                                          long testCaseId)
Description copied from interface: IterationTestPlanManagerService
Adds a list of test cases to a campaign.

Specified by:
findTestPlanItemByTestCaseId in interface IterationTestPlanManagerService

findTestPlanItem

public IterationTestPlanItem findTestPlanItem(Long iterationId,
                                              Long itemTestPlanId)
Specified by:
findTestPlanItem in interface IterationTestPlanManagerService


Copyright © 2010-2012 Squashtest TM, Squashtest.org. All Rights Reserved.