@Service(value="CustomTestCaseModificationService") @Transactional public class CustomTestCaseModificationServiceImpl extends Object implements CustomTestCaseModificationService
| Modifier and Type | Field and Description |
|---|---|
protected PrivateCustomFieldValueService |
customFieldValuesService |
TEST_CASE_IS_WRITABLE| 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,
int index) |
org.squashtest.tm.domain.testcase.ActionTestStep |
addActionTestStep(long parentTestCaseId,
org.squashtest.tm.domain.testcase.ActionTestStep newTestStep,
Map<Long,org.squashtest.tm.domain.customfield.RawValue> customFieldValues)
Adds an action test step to a test case, and its initial custom field values.
|
org.squashtest.tm.domain.testcase.ActionTestStep |
addActionTestStep(long parentTestCaseId,
org.squashtest.tm.domain.testcase.ActionTestStep newTestStep,
Map<Long,org.squashtest.tm.domain.customfield.RawValue> customFieldValues,
int index)
Adds an action test step to a test case, and its initial custom field values, inserted at the index value
The initial custom field values are passed as a Map
CustomField to the values of the corresponding CustomFieldValue. |
org.squashtest.tm.domain.testcase.TestCase |
addNewTestCaseVersion(long originalTcId,
org.squashtest.tm.domain.testcase.TestCase newVersionData)
Will create a new version of a test case and insert it next to it.
|
org.squashtest.tm.domain.testautomation.AutomatedTest |
bindAutomatedTest(Long testCaseId,
Long taProjectId,
String testName) |
org.squashtest.tm.domain.testautomation.AutomatedTest |
bindAutomatedTest(Long testCaseId,
String testPath)
Essentially the same than
CustomTestCaseModificationService.bindAutomatedTest(Long, Long, String). |
void |
bindMilestones(long testCaseId,
Collection<Long> milestoneIds) |
void |
changeImportance(long testCaseId,
org.squashtest.tm.domain.testcase.TestCaseImportance importance) |
void |
changeImportanceAuto(long testCaseId,
boolean auto)
will change the test case importance too if auto is true.
|
void |
changeNature(long testCaseId,
String natureCode) |
void |
changeReference(long testCaseId,
String reference) |
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.
|
void |
changeType(long testCaseId,
String typeCode) |
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.
|
List<org.squashtest.tm.domain.testcase.CallTestStep> |
findAllCallingTestSteps(long testCaseId) |
Collection<org.squashtest.tm.domain.milestone.Milestone> |
findAllMilestones(long testCaseId)
returns direct milestone membership, plus indirect milestones due to verified requirements
|
Collection<TestAutomationProjectContent> |
findAssignableAutomationTests(long testCaseId) |
Collection<org.squashtest.tm.domain.milestone.Milestone> |
findAssociableMilestones(long testCaseId) |
Collection<org.squashtest.tm.domain.milestone.Milestone> |
findAssociableMilestonesForMassModif(List<Long> testCaseIds) |
Collection<Long> |
findBindedMilestonesIdForMassModif(List<Long> testCaseIds) |
Set<Long> |
findCallingTCids(long updatedId,
Collection<Long> callingCandidates)
willgo through the list of test-case to update and retain the ones that are calling the updated test case.
|
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.
|
org.squashtest.tm.core.foundation.collection.PagedCollectionHolder<List<org.squashtest.tm.domain.testcase.CallTestStep>> |
findCallingTestSteps(long testCaseId,
org.squashtest.tm.core.foundation.collection.PagingAndSorting sorting) |
Map<Long,org.squashtest.tm.domain.testcase.TestCaseImportance> |
findImpTCWithImpAuto(Collection<Long> testCaseIds)
Will find the ids and importance of the given test cases with importanceAuto = true
|
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) |
boolean |
haveSamePerimeter(List<Long> testCaseIds) |
protected void |
initCustomFieldValues(org.squashtest.tm.domain.customfield.BoundEntity entity,
Map<Long,org.squashtest.tm.domain.customfield.RawValue> 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.
|
boolean |
pasteCopiedTestStep(long testCaseId,
long idInsertion,
long copiedTestStepId)
will insert a test step into a test case script, after the step identified by idInsertion.
|
boolean |
pasteCopiedTestSteps(long testCaseId,
long idInsertion,
List<Long> copiedTestStepIds)
Same as
CustomTestCaseModificationService.pasteCopiedTestStep(long, long, long), accepting a list of step ids |
boolean |
pasteCopiedTestStepToLastIndex(long testCaseId,
List<Long> copiedTestStepIds)
Same as
CustomTestCaseModificationService.pasteCopiedTestStepToLastIndex(long, long), accepting a list of step ids |
boolean |
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
|
List<org.squashtest.tm.domain.testcase.TestStep> |
removeListOfSteps(long testCaseId,
List<Long> testStepIds) |
void |
removeStepFromTestCase(long testCaseId,
long testStepId) |
void |
removeStepFromTestCaseByIndex(long testCaseId,
int index) |
void |
rename(long testCaseId,
String newName) |
void |
unbindMilestones(long testCaseId,
Collection<Long> milestoneIds) |
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\' , \'WRITE\') or hasRole(\'ROLE_ADMIN\')")
public void changeReference(long testCaseId,
String reference)
changeReference in interface CustomTestCaseModificationService@PreAuthorize(value="hasPermission(#testCaseId, \'org.squashtest.tm.domain.testcase.TestCase\' , \'WRITE\') or hasRole(\'ROLE_ADMIN\')")
public void changeImportance(long testCaseId,
org.squashtest.tm.domain.testcase.TestCaseImportance importance)
changeImportance in interface CustomTestCaseModificationService@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,
int index)
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,org.squashtest.tm.domain.customfield.RawValue> customFieldValues)
CustomTestCaseModificationServiceCustomField to the values of the corresponding CustomFieldValue.
Read that last sentence again.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,org.squashtest.tm.domain.customfield.RawValue> customFieldValues,
int index)
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@PreAuthorize(value="hasPermission(#testCaseId, \'org.squashtest.tm.domain.testcase.TestCase\' , \'WRITE\') or hasRole(\'ROLE_ADMIN\')")
public void removeStepFromTestCaseByIndex(long testCaseId,
int index)
removeStepFromTestCaseByIndex 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 List<org.squashtest.tm.domain.testcase.TestStep> 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 boolean pasteCopiedTestStep(long testCaseId,
long idInsertion,
long copiedTestStepId)
CustomTestCaseModificationServicepasteCopiedTestStep in interface CustomTestCaseModificationServicetestCaseId - the id of the test case.idInsertion - the id of the step after which we'll insert the copy of a stepcopiedTestStepId - the id of the testStep to copy.@PreAuthorize(value="hasPermission(#testCaseId, \'org.squashtest.tm.domain.testcase.TestCase\' , \'WRITE\') or hasRole(\'ROLE_ADMIN\')")
public boolean pasteCopiedTestSteps(long testCaseId,
long idInsertion,
List<Long> copiedTestStepIds)
CustomTestCaseModificationServiceCustomTestCaseModificationService.pasteCopiedTestStep(long, long, long), accepting a list of step idspasteCopiedTestSteps in interface CustomTestCaseModificationService@PreAuthorize(value="hasPermission(#testCaseId, \'org.squashtest.tm.domain.testcase.TestCase\' , \'WRITE\') or hasRole(\'ROLE_ADMIN\')")
public boolean pasteCopiedTestStepToLastIndex(long testCaseId,
long copiedTestStepId)
CustomTestCaseModificationServicepasteCopiedTestStepToLastIndex in interface CustomTestCaseModificationServicetestCaseId - the id of the test case.copiedTestStepId - the id of the testStep to copy.@PreAuthorize(value="hasPermission(#testCaseId, \'org.squashtest.tm.domain.testcase.TestCase\' , \'WRITE\') or hasRole(\'ROLE_ADMIN\')")
public boolean pasteCopiedTestStepToLastIndex(long testCaseId,
List<Long> copiedTestStepIds)
CustomTestCaseModificationServiceCustomTestCaseModificationService.pasteCopiedTestStepToLastIndex(long, long), accepting a list of step idspasteCopiedTestStepToLastIndex in interface CustomTestCaseModificationService@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.public org.squashtest.tm.core.foundation.collection.PagedCollectionHolder<List<org.squashtest.tm.domain.testcase.CallTestStep>> findCallingTestSteps(long testCaseId, org.squashtest.tm.core.foundation.collection.PagingAndSorting sorting)
findCallingTestSteps in interface CustomTestCaseFinderpublic List<org.squashtest.tm.domain.testcase.CallTestStep> findAllCallingTestSteps(long testCaseId)
findAllCallingTestSteps in interface CustomTestCaseFinder@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 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, String testPath)
CustomTestCaseModificationServiceCustomTestCaseModificationService.bindAutomatedTest(Long, Long, String). The single argument (the testPath) is the concatenation
of the TA project label and the test name.bindAutomatedTest in interface CustomTestCaseModificationServicepublic void removeAutomation(long testCaseId)
CustomTestCaseModificationServiceremoveAutomation in interface CustomTestCaseModificationServiceprotected void initCustomFieldValues(org.squashtest.tm.domain.customfield.BoundEntity entity,
Map<Long,org.squashtest.tm.domain.customfield.RawValue> 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 CustomTestCaseFinderpublic Map<Long,org.squashtest.tm.domain.testcase.TestCaseImportance> findImpTCWithImpAuto(Collection<Long> testCaseIds)
CustomTestCaseFinderfindImpTCWithImpAuto in interface CustomTestCaseFindertestCaseIds - : the id of the testCasesTestCaseImportanceCustomTestCaseFinder.findImpTCWithImpAuto(Collection)public Set<Long> findCallingTCids(long updatedId, Collection<Long> callingCandidates)
CustomTestCaseFinderfindCallingTCids in interface CustomTestCaseFinderupdatedId - : the id of the test case we want the calling test cases ofcallingCandidates - : the ids of potential calling test cases we are interested inCustomTestCaseFinder.findCallingTCids(long, Collection)public org.squashtest.tm.domain.testcase.TestCase addNewTestCaseVersion(long originalTcId,
org.squashtest.tm.domain.testcase.TestCase newVersionData)
CustomTestCaseModificationServiceaddNewTestCaseVersion in interface CustomTestCaseModificationService@PreAuthorize(value="hasPermission(#testCaseId, \'org.squashtest.tm.domain.testcase.TestCase\' , \'WRITE\') or hasRole(\'ROLE_ADMIN\')")
public void changeNature(long testCaseId,
String natureCode)
changeNature in interface CustomTestCaseModificationService@PreAuthorize(value="hasPermission(#testCaseId, \'org.squashtest.tm.domain.testcase.TestCase\' , \'WRITE\') or hasRole(\'ROLE_ADMIN\')")
public void changeType(long testCaseId,
String typeCode)
changeType in interface CustomTestCaseModificationService@PreAuthorize(value="hasPermission(#testCaseId, \'org.squashtest.tm.domain.testcase.TestCase\' , \'WRITE\') or hasRole(\'ROLE_ADMIN\')")
public void bindMilestones(long testCaseId,
Collection<Long> milestoneIds)
bindMilestones in interface CustomTestCaseModificationService@PreAuthorize(value="hasPermission(#testCaseId, \'org.squashtest.tm.domain.testcase.TestCase\' , \'WRITE\') or hasRole(\'ROLE_ADMIN\')")
public void unbindMilestones(long testCaseId,
Collection<Long> milestoneIds)
unbindMilestones in interface CustomTestCaseModificationService@PreAuthorize(value="hasPermission(#testCaseId, \'org.squashtest.tm.domain.testcase.TestCase\' , \'READ\') or hasRole(\'ROLE_ADMIN\')") public Collection<org.squashtest.tm.domain.milestone.Milestone> findAllMilestones(long testCaseId)
CustomTestCaseFinderfindAllMilestones in interface CustomTestCaseFinder@PreAuthorize(value="hasPermission(#testCaseId, \'org.squashtest.tm.domain.testcase.TestCase\' , \'WRITE\') or hasRole(\'ROLE_ADMIN\')") public Collection<org.squashtest.tm.domain.milestone.Milestone> findAssociableMilestones(long testCaseId)
findAssociableMilestones in interface CustomTestCaseModificationServicepublic Collection<org.squashtest.tm.domain.milestone.Milestone> findAssociableMilestonesForMassModif(List<Long> testCaseIds)
findAssociableMilestonesForMassModif in interface CustomTestCaseModificationServicepublic Collection<Long> findBindedMilestonesIdForMassModif(List<Long> testCaseIds)
findBindedMilestonesIdForMassModif in interface CustomTestCaseModificationServicepublic boolean haveSamePerimeter(List<Long> testCaseIds)
haveSamePerimeter in interface CustomTestCaseModificationServiceCopyright © 2010–2017 Henix, henix.fr. All rights reserved.