org.squashtest.tm.service.internal.testcase
Class CallStepManagerServiceImpl

java.lang.Object
  extended by org.squashtest.tm.service.internal.testcase.CallStepManagerServiceImpl
All Implemented Interfaces:
CallStepManagerService, TestCaseCyclicCallChecker

@Service(value="squashtest.tm.service.CallStepManagerService")
@Transactional
public class CallStepManagerServiceImpl
extends Object
implements CallStepManagerService, TestCaseCyclicCallChecker


Constructor Summary
CallStepManagerServiceImpl()
           
 
Method Summary
 void addCallTestStep(long parentTestCaseId, long calledTestCaseId)
          will add a call test step.
 void checkForCyclicStepCallBeforePaste(long destinationTestCaseId, List<Long> pastedStepId)
          same as CallStepManagerService.checkForCyclicStepCallBeforePaste(long, String[]) with a more comfortable signature
 void checkForCyclicStepCallBeforePaste(long destinationTestCaseId, String[] pastedStepId)
          Used to check if the destination test case id is found in the calling tree of the pasted steps if so : a CyclicStepCallException is thrown.
 void checkNoCyclicCall(org.squashtest.tm.domain.testcase.TestCase testCase)
          Used to check if the testPlan call tree is not cyclic This method is used to prevent infinite cycle in case of bugged data.
 org.squashtest.tm.domain.testcase.TestCase findTestCase(long testCaseId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CallStepManagerServiceImpl

public CallStepManagerServiceImpl()
Method Detail

addCallTestStep

@PreAuthorize(value="(hasPermission(#parentTestCaseId, \'org.squashtest.tm.domain.testcase.TestCase\' , \'WRITE\') and hasPermission(#calledTestCaseId, \'org.squashtest.tm.domain.testcase.TestCase\' , \'READ\')) or hasRole(\'ROLE_ADMIN\')")
public void addCallTestStep(long parentTestCaseId,
                                         long calledTestCaseId)
Description copied from interface: CallStepManagerService
will add a call test step.

Specified by:
addCallTestStep in interface CallStepManagerService
Parameters:
parentTestCaseId - that calls a step
calledTestCaseId - being called

findTestCase

@PreAuthorize(value="hasPermission(#testCaseId, \'org.squashtest.tm.domain.testcase.TestCase\' , \'READ\') or hasRole(\'ROLE_ADMIN\')\t")
public org.squashtest.tm.domain.testcase.TestCase findTestCase(long testCaseId)
Specified by:
findTestCase in interface CallStepManagerService

checkForCyclicStepCallBeforePaste

@PreAuthorize(value="hasPermission(#destinationTestCaseId, \'org.squashtest.tm.domain.testcase.TestCase\' , \'READ\') or hasRole(\'ROLE_ADMIN\')")
public void checkForCyclicStepCallBeforePaste(long destinationTestCaseId,
                                                           String[] pastedStepId)
Description copied from interface: CallStepManagerService
Used to check if the destination test case id is found in the calling tree of the pasted steps if so : a CyclicStepCallException is thrown.

Specified by:
checkForCyclicStepCallBeforePaste in interface CallStepManagerService

checkForCyclicStepCallBeforePaste

@PreAuthorize(value="hasPermission(#destinationTestCaseId, \'org.squashtest.tm.domain.testcase.TestCase\' , \'READ\') or hasRole(\'ROLE_ADMIN\')")
public void checkForCyclicStepCallBeforePaste(long destinationTestCaseId,
                                                           List<Long> pastedStepId)
Description copied from interface: CallStepManagerService
same as CallStepManagerService.checkForCyclicStepCallBeforePaste(long, String[]) with a more comfortable signature

Specified by:
checkForCyclicStepCallBeforePaste in interface CallStepManagerService

checkNoCyclicCall

@Transactional(readOnly=true)
public void checkNoCyclicCall(org.squashtest.tm.domain.testcase.TestCase testCase)
                       throws org.squashtest.tm.exception.CyclicStepCallException
Description copied from interface: TestCaseCyclicCallChecker
Used to check if the testPlan call tree is not cyclic This method is used to prevent infinite cycle in case of bugged data. if so : a CyclicStepCallException is thrown.

Specified by:
checkNoCyclicCall in interface TestCaseCyclicCallChecker
Throws:
org.squashtest.tm.exception.CyclicStepCallException


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