org.squashtest.csp.tm.domain.campaign
Class Iteration

java.lang.Object
  extended by org.squashtest.csp.tm.domain.campaign.Iteration
All Implemented Interfaces:
org.squashtest.csp.core.domain.Identified, AttachmentHolder

@Entity
public class Iteration
extends Object
implements AttachmentHolder, org.squashtest.csp.core.domain.Identified


Constructor Summary
Iteration()
           
 
Method Summary
 void addTestPlan(IterationTestPlanItem testPlan)
           
 void addTestSuite(TestSuite suite)
           
 boolean checkSuiteNameAvailable(String name)
           
 Iteration createCopy()
           copy of iteration doesn't contain test-suites !!
 Map<TestSuite,List<Integer>> createTestSuitesPastableCopy()
          this method is used in case of copy paste of an iteration with test suites.
 int findItemIndexInTestPlan(long testPlanId)
          Method which returns the position of an item test plan in the current iteration
 int findTestCaseIndexInTestPlan(long testCaseId)
          Method which returns the position of a test case in the current iteration
 Date getActualEndDate()
           
 Date getActualStartDate()
           
 AttachmentList getAttachmentList()
          Should return the container for this object's attachments.
 Campaign getCampaign()
           
 CampaignLibrary getCampaignLibrary()
           
 String getDescription()
           
 List<Execution> getExecutions()
          flattened list of the executions
 Long getId()
           
 int getIndexOf(IterationTestPlanItem item)
           
 String getName()
           
 List<TestCase> getPlannedTestCase()
           
 Project getProject()
           
 Date getScheduledEndDate()
           
 Date getScheduledStartDate()
           
 IterationTestPlanItem getTestPlan(Long testPlanId)
           
 IterationTestPlanItem getTestPlanForTestCaseId(Long testCaseId)
           
 List<IterationTestPlanItem> getTestPlans()
           
 Set<TestSuite> getTestSuites()
           
 boolean hasTestSuites()
           
 boolean isActualEndAuto()
           
 boolean isActualStartAuto()
           
 boolean isTestCasePlanned(Long testCaseId)
           
 boolean isTestCasePlanned(TestCase testCase)
           
 void moveTestPlan(int currentPosition, int newPosition)
          Deprecated. 
 void moveTestPlans(int newIndex, List<IterationTestPlanItem> movedItems)
           
 void removeTestPlan(IterationTestPlanItem testPlan)
           
 void removeTestSuite(TestSuite testSuite)
           
 void setActualEndAuto(boolean actualEndAuto)
           
 void setActualEndDate(Date endDate)
           
 void setActualStartAuto(boolean actualStartAuto)
           
 void setActualStartDate(Date startDate)
           
 void setDescription(String description)
           
 void setName(String name)
           
 void setScheduledEndDate(Date endDate)
           
 void setScheduledStartDate(Date startDate)
           
 void updateAutoDates(Date newItemTestPlanDate)
          If the iteration have autodates set, they will be updated accordingly.
 void updateAutoDatesAfterExecutionDetach(IterationTestPlanItem iterationTestPlanItem, Execution execution)
          will update acual end and start dates if are auto and if they were driven by the execution last-executed on
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Iteration

public Iteration()
Method Detail

getExecutions

public List<Execution> getExecutions()
flattened list of the executions


setName

public void setName(String name)

getName

@NotBlank
public String getName()

getCampaign

public Campaign getCampaign()

setDescription

public void setDescription(String description)

getDescription

public String getDescription()

setScheduledStartDate

public void setScheduledStartDate(Date startDate)

getScheduledStartDate

public Date getScheduledStartDate()

setScheduledEndDate

public void setScheduledEndDate(Date endDate)

getScheduledEndDate

public Date getScheduledEndDate()

setActualStartDate

public void setActualStartDate(Date startDate)

getActualStartDate

public Date getActualStartDate()

setActualEndDate

public void setActualEndDate(Date endDate)

getActualEndDate

public Date getActualEndDate()

isActualStartAuto

public boolean isActualStartAuto()

isActualEndAuto

public boolean isActualEndAuto()

setActualStartAuto

public void setActualStartAuto(boolean actualStartAuto)

setActualEndAuto

public void setActualEndAuto(boolean actualEndAuto)

getId

public Long getId()
Specified by:
getId in interface org.squashtest.csp.core.domain.Identified

getTestPlan

public IterationTestPlanItem getTestPlan(Long testPlanId)

createCopy

public Iteration createCopy()

copy of iteration doesn't contain test-suites !!

Returns:

getTestPlans

public List<IterationTestPlanItem> getTestPlans()

getPlannedTestCase

public List<TestCase> getPlannedTestCase()

removeTestSuite

public void removeTestSuite(@NotNull
                            TestSuite testSuite)

removeTestPlan

public void removeTestPlan(@NotNull
                           IterationTestPlanItem testPlan)

addTestPlan

public void addTestPlan(@NotNull
                        IterationTestPlanItem testPlan)

findTestCaseIndexInTestPlan

public int findTestCaseIndexInTestPlan(long testCaseId)
Method which returns the position of a test case in the current iteration

Parameters:
testCaseId - the id of the test case we're looking for
Returns:
the position of the test case (int)
Throws:
UnknownEntityException - if not found.

findItemIndexInTestPlan

public int findItemIndexInTestPlan(long testPlanId)
Method which returns the position of an item test plan in the current iteration

Parameters:
testPlanId - the id of the test plan we're looking for
Returns:
the position of the test plan (int)
Throws:
UnknownEntityException - if not found.

moveTestPlan

@Deprecated
public void moveTestPlan(int currentPosition,
                                    int newPosition)
Deprecated. 

Method which sets a test case at a new position

Parameters:
currentPosition - the current position
newPosition - the new position

moveTestPlans

public void moveTestPlans(int newIndex,
                          List<IterationTestPlanItem> movedItems)

getIndexOf

public int getIndexOf(IterationTestPlanItem item)

isTestCasePlanned

public boolean isTestCasePlanned(Long testCaseId)

isTestCasePlanned

public boolean isTestCasePlanned(TestCase testCase)

getTestPlanForTestCaseId

public IterationTestPlanItem getTestPlanForTestCaseId(Long testCaseId)

getTestSuites

public Set<TestSuite> getTestSuites()

addTestSuite

public void addTestSuite(TestSuite suite)

checkSuiteNameAvailable

public boolean checkSuiteNameAvailable(String name)

hasTestSuites

public boolean hasTestSuites()

getAttachmentList

public AttachmentList getAttachmentList()
Description copied from interface: AttachmentHolder
Should return the container for this object's attachments. Should never return null.

Specified by:
getAttachmentList in interface AttachmentHolder
Returns:
the AttachmentList of this object.

getProject

public Project getProject()

getCampaignLibrary

public CampaignLibrary getCampaignLibrary()

updateAutoDates

public void updateAutoDates(Date newItemTestPlanDate)
If the iteration have autodates set, they will be updated accordingly.

Parameters:
newItemTestPlanDate -

createTestSuitesPastableCopy

public Map<TestSuite,List<Integer>> createTestSuitesPastableCopy()
this method is used in case of copy paste of an iteration with test suites.

Returns:
A map of test suite and indexes
One entry-set contains
  • a copied test suite (without it's test plan)
  • and the indexes of the copied test plan that are to be linked with it (taking into account test_plan_items that are test_case deleted)

updateAutoDatesAfterExecutionDetach

public void updateAutoDatesAfterExecutionDetach(IterationTestPlanItem iterationTestPlanItem,
                                                Execution execution)
will update acual end and start dates if are auto and if they were driven by the execution last-executed on

Parameters:
execution -


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