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

java.lang.Object
  extended by org.squashtest.tm.service.internal.testcase.ParameterModificationServiceImpl
All Implemented Interfaces:
ParameterFinder, ParameterModificationService

@Service(value="squashtest.tm.service.ParameterModificationService")
public class ParameterModificationServiceImpl
extends Object
implements ParameterModificationService


Constructor Summary
ParameterModificationServiceImpl()
           
 
Method Summary
 void addNewParameterToTestCase(org.squashtest.tm.domain.testcase.Parameter parameter, long testCaseId)
           
 void changeDescription(long parameterId, String newDescription)
           
 void changeName(long parameterId, String newName)
           
 void createParamsForStep(long stepId)
          Will create all parameters used in the step if they don't already exist.
 void createParamsForStep(org.squashtest.tm.domain.testcase.TestStep step)
          Will create all parameters used in the step if they don't already exist.
 void createParamsForTestCaseSteps(org.squashtest.tm.domain.testcase.TestCase testCase)
          Will go through the test case's steps and create the missing parameter.
 List<org.squashtest.tm.domain.testcase.Parameter> findAllforTestCase(long testCaseId)
          Will find all parameters for the test case along with all parameters found for the call steps.
 org.squashtest.tm.domain.testcase.Parameter findById(long parameterId)
          Simply find the parameter matching the given id
static List<String> findUsedParamsNamesTestCaseSteps(org.squashtest.tm.domain.testcase.TestCase testCase)
           
 boolean isUsed(long parameterId)
          Returns true if the parameter is used in one of it's test case action steps
 void remove(org.squashtest.tm.domain.testcase.Parameter parameter)
           
 void removeAllByTestCaseIds(List<Long> testCaseIds)
           
 void removeById(long parameterId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParameterModificationServiceImpl

public ParameterModificationServiceImpl()
Method Detail

findAllforTestCase

public List<org.squashtest.tm.domain.testcase.Parameter> findAllforTestCase(long testCaseId)
Description copied from interface: ParameterFinder
Will find all parameters for the test case along with all parameters found for the call steps.

Specified by:
findAllforTestCase in interface ParameterFinder
Returns:
returns a list of parameters ordered by test case and name
See Also:

addNewParameterToTestCase

public void addNewParameterToTestCase(org.squashtest.tm.domain.testcase.Parameter parameter,
                                      long testCaseId)
Specified by:
addNewParameterToTestCase in interface ParameterModificationService
See Also:
ParameterModificationService.addNewParameterToTestCase(Parameter, long)

changeName

public void changeName(long parameterId,
                       String newName)
Specified by:
changeName in interface ParameterModificationService
See Also:
ParameterModificationService.addNewParameterToTestCase(Parameter, long)

changeDescription

public void changeDescription(long parameterId,
                              String newDescription)
Specified by:
changeDescription in interface ParameterModificationService
See Also:
ParameterModificationService.changeDescription(long, String)

remove

public void remove(org.squashtest.tm.domain.testcase.Parameter parameter)
Specified by:
remove in interface ParameterModificationService
See Also:
ParameterModificationService.remove(Parameter)

removeAllByTestCaseIds

public void removeAllByTestCaseIds(List<Long> testCaseIds)
Specified by:
removeAllByTestCaseIds in interface ParameterModificationService
See Also:
ParameterModificationService.removeAllByTestCaseIds(List)

removeById

public void removeById(long parameterId)
Specified by:
removeById in interface ParameterModificationService
See Also:
ParameterModificationService.removeById(long)

createParamsForStep

public void createParamsForStep(long stepId)
Description copied from interface: ParameterModificationService
Will create all parameters used in the step if they don't already exist. And will update all Datasets and calling test cases datasets in consequence.

Specified by:
createParamsForStep in interface ParameterModificationService
Parameters:
stepId - : the id of the concerned step
See Also:
ParameterModificationService.createParamsForStep(long)

createParamsForStep

public void createParamsForStep(org.squashtest.tm.domain.testcase.TestStep step)
Description copied from interface: ParameterModificationService
Will create all parameters used in the step if they don't already exist. And will update all Datasets and calling test cases datasets in consequence.

Specified by:
createParamsForStep in interface ParameterModificationService
Parameters:
step - : the concerned step
See Also:
ParameterModificationService.createParamsForStep(TestStep)

isUsed

public boolean isUsed(long parameterId)
Description copied from interface: ParameterFinder
Returns true if the parameter is used in one of it's test case action steps

Specified by:
isUsed in interface ParameterFinder
Parameters:
parameterId - : the id of the concerned parameter
Returns:
true if the parameter is used in one of it's test case action step.
See Also:
ParameterFinder.isUsed(long)

findById

public org.squashtest.tm.domain.testcase.Parameter findById(long parameterId)
Description copied from interface: ParameterFinder
Simply find the parameter matching the given id

Specified by:
findById in interface ParameterFinder
Parameters:
parameterId - : the id of the Parameter to find
Returns:
the Parameter matching the id or null
See Also:
ParameterFinder.findById(long)

createParamsForTestCaseSteps

public void createParamsForTestCaseSteps(org.squashtest.tm.domain.testcase.TestCase testCase)
Description copied from interface: ParameterModificationService
Will go through the test case's steps and create the missing parameter. If the test case has datasets, will create the new datasetParamValues.

Specified by:
createParamsForTestCaseSteps in interface ParameterModificationService
Parameters:
testCase - : the concerned test case
See Also:
ParameterModificationService.createParamsForTestCaseSteps(TestCase)

findUsedParamsNamesTestCaseSteps

public static List<String> findUsedParamsNamesTestCaseSteps(org.squashtest.tm.domain.testcase.TestCase testCase)


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