org.squashtest.tm.service.requirement
Interface VerifiedRequirementsManagerService

All Known Implementing Classes:
VerifiedRequirementsManagerServiceImpl

public interface VerifiedRequirementsManagerService

Service for management of Requirements verified by a TestCase

Author:
Gregory Fouquet

Method Summary
 Collection<org.squashtest.tm.exception.requirement.VerifiedRequirementException> addVerifiedRequirementsToTestCase(List<Long> requirementsIds, long testCaseId)
          Adds a list of requirements to the ones verified by a test case.
 Collection<org.squashtest.tm.exception.requirement.VerifiedRequirementException> addVerifiedRequirementsToTestStep(List<Long> requirementsIds, long testStepId)
          Adds a list of requirement-versions to the ones verified by the step's test case and bind them to the step.
 Collection<org.squashtest.tm.exception.requirement.VerifiedRequirementException> addVerifyingRequirementVersionsToTestCase(Map<org.squashtest.tm.domain.testcase.TestCase,List<org.squashtest.tm.domain.requirement.RequirementVersion>> requirementVersionsByTestCase)
          Adds a list of requirement-versions to the ones verified by a test case.
 int changeVerifiedRequirementVersionOnTestCase(long oldVerifiedRequirementVersionId, long newVerifiedRequirementVersionId, long testCaseId)
          Removes a requirement version from the given test case and replaces it with the wanted version if the same version is selected as was previously attached, nothing happens
 org.squashtest.tm.core.foundation.collection.PagedCollectionHolder<List<VerifiedRequirement>> findAllDirectlyVerifiedRequirementsByTestCaseId(long testCaseId, org.squashtest.tm.core.foundation.collection.PagingAndSorting pas)
          Returns the filtered list of VerifiedRequirements directly verified by a test case.
 org.squashtest.tm.core.foundation.collection.PagedCollectionHolder<List<VerifiedRequirement>> findAllDirectlyVerifiedRequirementsByTestStepId(long testStepId, org.squashtest.tm.core.foundation.collection.PagingAndSorting paging)
          Will find all RequirementVersion verified by the test case containing the step of the given id.
 List<VerifiedRequirement> findAllVerifiedRequirementsByTestCaseId(long testCaseId)
          Returns all VerifiedRequirement for the TestCase matching the given id.
 org.squashtest.tm.core.foundation.collection.PagedCollectionHolder<List<VerifiedRequirement>> findAllVerifiedRequirementsByTestCaseId(long testCaseId, org.squashtest.tm.core.foundation.collection.PagingAndSorting pas)
          Returns all VerifiedRequirement for the TestCase matching the given id.
 void removeVerifiedRequirementVersionFromTestCase(long requirementVersionId, long testCaseId)
          Removes a requirement from the ones verified by a test case.
 void removeVerifiedRequirementVersionsFromTestCase(List<Long> requirementVersionsIds, long testCaseId)
          Removes a list of requirements from the ones verified by a test case.
 void removeVerifiedRequirementVersionsFromTestStep(List<Long> requirementVersionsIds, long testStepId)
          Removes a requirement from the step but not from the test case.
 

Method Detail

addVerifiedRequirementsToTestCase

Collection<org.squashtest.tm.exception.requirement.VerifiedRequirementException> addVerifiedRequirementsToTestCase(List<Long> requirementsIds,
                                                                                                                   long testCaseId)
Adds a list of requirements to the ones verified by a test case. If a requirement is already verified, nothing special happens.

Parameters:
requirementsIds -
testCaseId -
Returns:

addVerifiedRequirementsToTestStep

Collection<org.squashtest.tm.exception.requirement.VerifiedRequirementException> addVerifiedRequirementsToTestStep(List<Long> requirementsIds,
                                                                                                                   long testStepId)
Adds a list of requirement-versions to the ones verified by the step's test case and bind them to the step. If the version already verified by the test case, it is only bound to the step. If a sister version is already bound to the test case the version is not added.

Parameters:
requirementsIds -
testStepId - : the id of the concerned ActionTestStep
Returns:

addVerifyingRequirementVersionsToTestCase

Collection<org.squashtest.tm.exception.requirement.VerifiedRequirementException> addVerifyingRequirementVersionsToTestCase(Map<org.squashtest.tm.domain.testcase.TestCase,List<org.squashtest.tm.domain.requirement.RequirementVersion>> requirementVersionsByTestCase)
Adds a list of requirement-versions to the ones verified by a test case. If the version or a sister is already verified, the requirement is not added and nothing special happens.

Parameters:
requirementVersionsByTestCase - : list of requirementVersions mapped by test-case
Returns:

removeVerifiedRequirementVersionsFromTestCase

void removeVerifiedRequirementVersionsFromTestCase(List<Long> requirementVersionsIds,
                                                   long testCaseId)
Removes a list of requirements from the ones verified by a test case. If a requirement is not verified by the test case, nothing special happens.

Parameters:
testCaseId -
requirementVersionsIds -

removeVerifiedRequirementVersionFromTestCase

void removeVerifiedRequirementVersionFromTestCase(long requirementVersionId,
                                                  long testCaseId)
Removes a requirement from the ones verified by a test case. If the requirement was not previously verified by the test case, nothing special happens.

Parameters:
testCaseId -
requirementsIds -

removeVerifiedRequirementVersionsFromTestStep

void removeVerifiedRequirementVersionsFromTestStep(List<Long> requirementVersionsIds,
                                                   long testStepId)
Removes a requirement from the step but not from the test case. If the requirement was not previously verified by the test step, nothing special happens.

Parameters:
testStepId -
requirementsIds -

changeVerifiedRequirementVersionOnTestCase

int changeVerifiedRequirementVersionOnTestCase(long oldVerifiedRequirementVersionId,
                                               long newVerifiedRequirementVersionId,
                                               long testCaseId)
Removes a requirement version from the given test case and replaces it with the wanted version if the same version is selected as was previously attached, nothing happens

Parameters:
testCaseId -
oldVerifiedRequirementVersionId -
newVerifiedRequirementVersionId -
Throws:
org.squashtest.tm.exception.requirement.RequirementVersionNotLinkableException

findAllDirectlyVerifiedRequirementsByTestCaseId

org.squashtest.tm.core.foundation.collection.PagedCollectionHolder<List<VerifiedRequirement>> findAllDirectlyVerifiedRequirementsByTestCaseId(long testCaseId,
                                                                                                                                              org.squashtest.tm.core.foundation.collection.PagingAndSorting pas)
Returns the filtered list of VerifiedRequirements directly verified by a test case. The non directly verified requirements (by called test-cases) are NOT included in the result.

Parameters:
testCaseId - : the id of the concerned TestCase.
pas: - the PagingAndSorting to organize the result with
Returns:
a PagedCollectionHolder of VerifiedRequirement containing directly verified requirements for the test case of the given id.

findAllVerifiedRequirementsByTestCaseId

org.squashtest.tm.core.foundation.collection.PagedCollectionHolder<List<VerifiedRequirement>> findAllVerifiedRequirementsByTestCaseId(long testCaseId,
                                                                                                                                      org.squashtest.tm.core.foundation.collection.PagingAndSorting pas)
Returns all VerifiedRequirement for the TestCase matching the given id. VerifiedRequirements verified by the CallTestSteps of the TestCase will be included.

Parameters:
testCaseId - : the id of the concerned TestCase
pas - : the PagingAndSorting to organize the result with
Returns:
a PagedCollectionHolder of VerifiedRequirement containing directly and non directly (call steps) verified requirements for the test case of the given id.

findAllVerifiedRequirementsByTestCaseId

List<VerifiedRequirement> findAllVerifiedRequirementsByTestCaseId(long testCaseId)
Returns all VerifiedRequirement for the TestCase matching the given id. VerifiedRequirements verified by the CallTestSteps of the TestCase will be included.

Parameters:
testCaseId - : the id of the concerned TestCase
Returns:
a List of VerifiedRequirement containing directly and non directly (call steps) verified requirements for the test case of the given id.

findAllDirectlyVerifiedRequirementsByTestStepId

org.squashtest.tm.core.foundation.collection.PagedCollectionHolder<List<VerifiedRequirement>> findAllDirectlyVerifiedRequirementsByTestStepId(long testStepId,
                                                                                                                                              org.squashtest.tm.core.foundation.collection.PagingAndSorting paging)
Will find all RequirementVersion verified by the test case containing the step of the given id. The result will be paged according to the given PagingAndSorting param.

Parameters:
testStepId - : the id of the concerned TestStep
paging - : the PagingAndSorting to organize the result with
Returns:
the list of verified requirements, paged and sorted.


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