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

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

@Service(value="CustomIterationModificationService")
public class CustomIterationModificationServiceImpl
extends Object
implements CustomIterationModificationService


Constructor Summary
CustomIterationModificationServiceImpl()
           
 
Method Summary
 void addExecution(long iterationId, long testPlanId)
           
 int addIterationToCampaign(Iteration iteration, long campaignId)
          Adds an iteration to the list of iterations of a campaign.
 void changeTestPlanPosition(long iterationId, long testPlanId, int newTestPlanPosition)
          Method which change the index of test case in the selected iteration
 String delete(long iterationId)
           
 List<Long> deleteNodes(List<Long> targetIds)
          that method should delete the nodes.
 List<Execution> findAllExecutions(long iterationId)
           
 Iteration findById(long iterationId)
           
 List<Execution> findExecutionsByTestPlan(long iterationId, long testPlanId)
           
 List<Iteration> findIterationsByCampaignId(long campaignId)
           
 FilteredCollectionHolder<List<IterationTestPlanItem>> findIterationTestPlan(long iterationId, CollectionSorting filter)
           
 List<TestCase> findPlannedTestCases(long iterationId)
           
 void rename(long iterationId, String newName)
           
 List<SuppressionPreviewReport> simulateDeletion(List<Long> targetIds)
          that method should investigate the consequences of the deletion request, and return a report about what will happen.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CustomIterationModificationServiceImpl

public CustomIterationModificationServiceImpl()
Method Detail

addIterationToCampaign

@PreAuthorize(value="hasPermission(#campaignId, \'org.squashtest.csp.tm.domain.campaign.Campaign\', \'WRITE\') or hasRole(\'ROLE_ADMIN\')")
public int addIterationToCampaign(Iteration iteration,
                                               long campaignId)
Description copied from interface: CustomIterationModificationService
Adds an iteration to the list of iterations of a campaign.

Specified by:
addIterationToCampaign in interface CustomIterationModificationService
Returns:
the index of the added iteration.

findIterationsByCampaignId

@PreAuthorize(value="hasPermission(#campaignId, \'org.squashtest.csp.tm.domain.campaign.Campaign\', \'READ\') or hasRole(\'ROLE_ADMIN\')")
public List<Iteration> findIterationsByCampaignId(long campaignId)
Specified by:
findIterationsByCampaignId in interface CustomIterationModificationService

findById

@PostAuthorize(value="hasPermission(returnObject, \'READ\') or hasRole(\'ROLE_ADMIN\')")
public Iteration findById(long iterationId)
Specified by:
findById in interface CustomIterationModificationService

delete

@PreAuthorize(value="hasPermission(#iterationId, \'org.squashtest.csp.tm.domain.campaign.Iteration\', \'WRITE\') or hasRole(\'ROLE_ADMIN\')")
public String delete(long iterationId)
Specified by:
delete in interface CustomIterationModificationService

rename

@PreAuthorize(value="hasPermission(#iterationId, \'org.squashtest.csp.tm.domain.campaign.Iteration\', \'WRITE\') or hasRole(\'ROLE_ADMIN\')")
public void rename(long iterationId,
                                String newName)
Specified by:
rename in interface CustomIterationModificationService

addExecution

@PreAuthorize(value="hasPermission(#iterationId, \'org.squashtest.csp.tm.domain.campaign.Iteration\', \'WRITE\') or hasRole(\'ROLE_ADMIN\')")
public void addExecution(long iterationId,
                                      long testPlanId)
Specified by:
addExecution in interface CustomIterationModificationService

changeTestPlanPosition

@PreAuthorize(value="hasPermission(#iterationId, \'org.squashtest.csp.tm.domain.campaign.Iteration\', \'WRITE\') or hasRole(\'ROLE_ADMIN\')")
public void changeTestPlanPosition(long iterationId,
                                                long testPlanId,
                                                int newTestPlanPosition)
Method which change the index of test case in the selected iteration

Specified by:
changeTestPlanPosition in interface CustomIterationModificationService
Parameters:
iterationId - the iteration at which the test case is attached
testCaseId - the test case to move
newTestCasePosition - the test case new position

findAllExecutions

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

findExecutionsByTestPlan

@PreAuthorize(value="hasPermission(#iterationId, \'org.squashtest.csp.tm.domain.campaign.Iteration\', \'READ\') or hasRole(\'ROLE_ADMIN\')")
public List<Execution> findExecutionsByTestPlan(long iterationId,
                                                             long testPlanId)
Specified by:
findExecutionsByTestPlan in interface CustomIterationModificationService

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 CustomIterationModificationService

findIterationTestPlan

@PreAuthorize(value="hasPermission(#iterationId, \'org.squashtest.csp.tm.domain.campaign.Iteration\', \'READ\') or hasRole(\'ROLE_ADMIN\')")
public FilteredCollectionHolder<List<IterationTestPlanItem>> findIterationTestPlan(long iterationId,
                                                                                                CollectionSorting filter)
Specified by:
findIterationTestPlan in interface CustomIterationModificationService

simulateDeletion

public List<SuppressionPreviewReport> simulateDeletion(List<Long> targetIds)
Description copied from interface: CustomIterationModificationService
that method should investigate the consequences of the deletion request, and return a report about what will happen.

Specified by:
simulateDeletion in interface CustomIterationModificationService
Returns:

deleteNodes

public List<Long> deleteNodes(List<Long> targetIds)
Description copied from interface: CustomIterationModificationService
that method should delete the nodes. It still takes care of non deletable nodes so the implementation should filter out the ids who can't be deleted.

Specified by:
deleteNodes in interface CustomIterationModificationService
Returns:


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