org.squashtest.tm.service.internal.testcase
@Service(value="CustomTestCaseModificationService") @Transactional public class CustomTestCaseModificationServiceImpl extends Object implements CustomTestCaseModificationService
| Modifier and Type | Field and Description |
|---|---|
protected PrivateCustomFieldValueService |
customFieldValuesService |
| Constructor and Description |
|---|
CustomTestCaseModificationServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
org.squashtest.tm.domain.testcase.ActionTestStep |
addActionTestStep(long parentTestCaseId,
org.squashtest.tm.domain.testcase.ActionTestStep newTestStep) |
org.squashtest.tm.domain.testcase.ActionTestStep |
addActionTestStep(long parentTestCaseId,
org.squashtest.tm.domain.testcase.ActionTestStep newTestStep,
Map<Long,String> customFieldValues)
Adds an action test step to a test case, and its initial custom field values.
|
org.squashtest.tm.domain.testautomation.AutomatedTest |
bindAutomatedTest(Long testCaseId,
Long taProjectId,
String testName) |
void |
changeImportanceAuto(long testCaseId,
boolean auto)
will change the test case importance too if auto is true.
|
void |
changeTestStepPosition(long testCaseId,
long testStepId,
int newStepPosition)
Deprecated.
|
void |
changeTestStepsPosition(long testCaseId,
int newPosition,
List<Long> stepIds)
Will move a list of steps to a new position.
|
List<org.squashtest.tm.domain.testcase.TestCase> |
findAllByAncestorIds(Collection<Long> folderIds)
Fetches all the test cases which have at least one ancestor from the given list.
|
List<org.squashtest.tm.domain.testcase.TestCase> |
findAllCallingTestCases(long calleeId)
Fetches all the test cases calling the one matching the given id param.
|
Collection<TestAutomationProjectContent> |
findAssignableAutomationTests(long testCaseId) |
org.squashtest.tm.core.foundation.collection.PagedCollectionHolder<List<org.squashtest.tm.domain.testcase.TestCase>> |
findCallingTestCases(long testCaseId,
org.squashtest.tm.core.foundation.collection.PagingAndSorting sorting)
That method returns the list of test cases having at least one CallTestStep directly calling the test case
identified by testCaseId.
|
List<org.squashtest.tm.domain.testcase.TestStep> |
findStepsByTestCaseId(long testCaseId) |
org.squashtest.tm.core.foundation.collection.PagedCollectionHolder<List<org.squashtest.tm.domain.testcase.TestStep>> |
findStepsByTestCaseIdFiltered(long testCaseId,
org.squashtest.tm.core.foundation.collection.Paging paging) |
org.squashtest.tm.domain.testcase.TestCase |
findTestCaseFromStep(long testStepId) |
org.squashtest.tm.domain.testcase.TestCase |
findTestCaseWithSteps(long testCaseId) |
protected void |
initCustomFieldValues(org.squashtest.tm.domain.customfield.BoundEntity entity,
Map<Long,String> initialCustomFieldValues)
initialCustomFieldValues maps the id of a CustomField to the value of the corresponding CustomFieldValues for
that BoundEntity. read it again until it makes sense. it assumes that the CustomFieldValues instances already
exists.
|
void |
pasteCopiedTestStep(long testCaseId,
long idToCopyAfter,
long copiedTestStepId)
will insert a test step into a test case script, possibly after a step (the position), given their Ids.
|
void |
pasteCopiedTestStepToLastIndex(long testCaseId,
long copiedTestStepId)
will insert a test step into a test case script at the last position
|
void |
removeAutomation(long testCaseId)
Will delete the link
|
void |
removeListOfSteps(long testCaseId,
List<Long> testStepIds) |
void |
removeStepFromTestCase(long testCaseId,
long testStepId) |
void |
rename(long testCaseId,
String newName) |
void |
updateTestStepAction(long testStepId,
String newAction) |
void |
updateTestStepExpectedResult(long testStepId,
String newExpectedResult) |
@Inject protected PrivateCustomFieldValueService customFieldValuesService
public CustomTestCaseModificationServiceImpl()
@PreAuthorize(value="hasPermission(#testCaseId, \'org.squashtest.tm.domain.testcase.TestCase\' , \'WRITE\') or hasRole(\'ROLE_ADMIN\')")
public void rename(long testCaseId,
String newName)
throws org.squashtest.tm.exception.DuplicateNameException
rename in interface CustomTestCaseModificationServiceorg.squashtest.tm.exception.DuplicateNameException@PreAuthorize(value="hasPermission(#testCaseId, \'org.squashtest.tm.domain.testcase.TestCase\' , \'READ\') or hasRole(\'ROLE_ADMIN\')") @Transactional(readOnly=true) public List<org.squashtest.tm.domain.testcase.TestStep> findStepsByTestCaseId(long testCaseId)
findStepsByTestCaseId in interface CustomTestCaseFinder@PreAuthorize(value="hasPermission(#parentTestCaseId, \'org.squashtest.tm.domain.testcase.TestCase\' , \'WRITE\') or hasRole(\'ROLE_ADMIN\')")
public org.squashtest.tm.domain.testcase.ActionTestStep addActionTestStep(long parentTestCaseId,
org.squashtest.tm.domain.testcase.ActionTestStep newTestStep)
addActionTestStep in interface CustomTestCaseModificationService@PreAuthorize(value="hasPermission(#parentTestCaseId, \'org.squashtest.tm.domain.testcase.TestCase\' , \'WRITE\') or hasRole(\'ROLE_ADMIN\')")
public org.squashtest.tm.domain.testcase.ActionTestStep addActionTestStep(long parentTestCaseId,
org.squashtest.tm.domain.testcase.ActionTestStep newTestStep,
Map<Long,String> customFieldValues)
CustomTestCaseModificationServiceCustomField to the values of the corresponding CustomFieldValue.
Read that last sentence again.addActionTestStep in interface CustomTestCaseModificationService@PreAuthorize(value="hasPermission(#testStepId, \'org.squashtest.tm.domain.testcase.TestStep\' , \'WRITE\') or hasRole(\'ROLE_ADMIN\')")
public void updateTestStepAction(long testStepId,
String newAction)
updateTestStepAction in interface CustomTestCaseModificationService@PreAuthorize(value="hasPermission(#testStepId, \'org.squashtest.tm.domain.testcase.TestStep\' , \'WRITE\') or hasRole(\'ROLE_ADMIN\')")
public void updateTestStepExpectedResult(long testStepId,
String newExpectedResult)
updateTestStepExpectedResult in interface CustomTestCaseModificationService@Deprecated @PreAuthorize(value="hasPermission(#testCaseId, \'org.squashtest.tm.domain.testcase.TestCase\' , \'WRITE\') or hasRole(\'ROLE_ADMIN\')") public void changeTestStepPosition(long testCaseId, long testStepId, int newStepPosition)
changeTestStepPosition in interface CustomTestCaseModificationService@PreAuthorize(value="hasPermission(#testCaseId, \'org.squashtest.tm.domain.testcase.TestCase\' , \'WRITE\') or hasRole(\'ROLE_ADMIN\')")
public void changeTestStepsPosition(long testCaseId,
int newPosition,
List<Long> stepIds)
CustomTestCaseModificationServicechangeTestStepsPosition in interface CustomTestCaseModificationServicetestCaseId - the id of the test casenewPosition - the position we want the first element of movedSteps to be once the operation is complete@PreAuthorize(value="hasPermission(#testCaseId, \'org.squashtest.tm.domain.testcase.TestCase\' , \'WRITE\') or hasRole(\'ROLE_ADMIN\')")
public void removeStepFromTestCase(long testCaseId,
long testStepId)
removeStepFromTestCase in interface CustomTestCaseModificationService@PostAuthorize(value="hasPermission(returnObject, \'READ\') or hasRole(\'ROLE_ADMIN\')") @Transactional(readOnly=true) public org.squashtest.tm.domain.testcase.TestCase findTestCaseWithSteps(long testCaseId)
findTestCaseWithSteps in interface CustomTestCaseFinder@PreAuthorize(value="hasPermission(#testCaseId, \'org.squashtest.tm.domain.testcase.TestCase\' , \'WRITE\') or hasRole(\'ROLE_ADMIN\')")
public void removeListOfSteps(long testCaseId,
List<Long> testStepIds)
removeListOfSteps in interface CustomTestCaseModificationService@PreAuthorize(value="hasPermission(#testCaseId, \'org.squashtest.tm.domain.testcase.TestCase\' , \'READ\') or hasRole(\'ROLE_ADMIN\')") @Transactional(readOnly=true) public org.squashtest.tm.core.foundation.collection.PagedCollectionHolder<List<org.squashtest.tm.domain.testcase.TestStep>> findStepsByTestCaseIdFiltered(long testCaseId, org.squashtest.tm.core.foundation.collection.Paging paging)
findStepsByTestCaseIdFiltered in interface CustomTestCaseFinder@PreAuthorize(value="hasPermission(#testCaseId, \'org.squashtest.tm.domain.testcase.TestCase\' , \'WRITE\') or hasRole(\'ROLE_ADMIN\')")
public void pasteCopiedTestStep(long testCaseId,
long idToCopyAfter,
long copiedTestStepId)
CustomTestCaseModificationServicepasteCopiedTestStep in interface CustomTestCaseModificationServicetestCaseId - the id of the test case.idToCopyAfter - the id of the step after which we'll insert the copy of a step, may be null.copiedTestStepId - the id of the testStep to copy.@PreAuthorize(value="hasPermission(#testCaseId, \'org.squashtest.tm.domain.testcase.TestCase\' , \'WRITE\') or hasRole(\'ROLE_ADMIN\')")
public void pasteCopiedTestStepToLastIndex(long testCaseId,
long copiedTestStepId)
CustomTestCaseModificationServicepasteCopiedTestStepToLastIndex in interface CustomTestCaseModificationServicetestCaseId - the id of the test case.copiedTestStepId - the id of the testStep to copy.@Transactional(readOnly=true) public org.squashtest.tm.core.foundation.collection.PagedCollectionHolder<List<org.squashtest.tm.domain.testcase.TestCase>> findCallingTestCases(long testCaseId, org.squashtest.tm.core.foundation.collection.PagingAndSorting sorting)
CustomTestCaseFinderfindCallingTestCases in interface CustomTestCaseFindertestCaseId - the Id of the called test case.sorting - the sorting parameters.@PreAuthorize(value="hasPermission(#testCaseId, \'org.squashtest.tm.domain.testcase.TestCase\' , \'WRITE\') or hasRole(\'ROLE_ADMIN\')")
public void changeImportanceAuto(long testCaseId,
boolean auto)
CustomTestCaseModificationServicechangeImportanceAuto in interface CustomTestCaseModificationService@PreAuthorize(value="hasPermission(#testCaseId, \'org.squashtest.tm.domain.testcase.TestCase\' , \'WRITE\') or hasRole(\'ROLE_ADMIN\')") @Transactional(readOnly=true) public Collection<TestAutomationProjectContent> findAssignableAutomationTests(long testCaseId)
findAssignableAutomationTests in interface CustomTestCaseModificationService@PreAuthorize(value="hasPermission(#testCaseId, \'org.squashtest.tm.domain.testcase.TestCase\' , \'WRITE\') or hasRole(\'ROLE_ADMIN\')") public org.squashtest.tm.domain.testautomation.AutomatedTest bindAutomatedTest(Long testCaseId, Long taProjectId, String testName)
bindAutomatedTest in interface CustomTestCaseModificationServicepublic void removeAutomation(long testCaseId)
CustomTestCaseModificationServiceremoveAutomation in interface CustomTestCaseModificationServiceprotected void initCustomFieldValues(org.squashtest.tm.domain.customfield.BoundEntity entity,
Map<Long,String> initialCustomFieldValues)
entity - initialCustomFieldValues - @PostFilter(value="hasPermission(filterObject , \'READ\') or hasRole(\'ROLE_ADMIN\')") public List<org.squashtest.tm.domain.testcase.TestCase> findAllByAncestorIds(Collection<Long> folderIds)
CustomTestCaseFinderfindAllByAncestorIds in interface CustomTestCaseFinderorg.squashtest.tm.service.testcase.CustomTestCaseFinder#findAllByAncestorIds(java.util.List)@PostFilter(value="hasPermission(filterObject , \'READ\') or hasRole(\'ROLE_ADMIN\')") public List<org.squashtest.tm.domain.testcase.TestCase> findAllCallingTestCases(long calleeId)
CustomTestCaseFinderfindAllCallingTestCases in interface CustomTestCaseFinderCustomTestCaseFinder.findAllCallingTestCases(long)public org.squashtest.tm.domain.testcase.TestCase findTestCaseFromStep(long testStepId)
findTestCaseFromStep in interface CustomTestCaseFinderCopyright © 2010-2014 Henix, henix.fr. All Rights Reserved.