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

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

@Entity
public class Iteration
extends Object
implements AttachmentHolder


Constructor Summary
Iteration()
           
 
Method Summary
 void addExecution(Execution execution)
          That method will add an Execution to the iteration.
 void addTestPlan(IterationTestPlanItem testPlan)
           
 Iteration createCopy()
           
 int findTestCaseInIteration(Long testCaseId)
          Method which returns the position of a test case in the current iteration
 int findTestPlanInIteration(Long testPlanId)
          Method which returns the position of an item test plan in the current iteration
 Date getActualEndDate()
           
 Date getActualStartDate()
           
 AttachmentList getAttachmentList()
          Should return the container for this object's attachments.
 Campaign getCampaign()
           
 String getDescription()
           
 List<Execution> getExecutions()
           
 Long getId()
           
 String getName()
           
 List<TestCase> getPlannedTestCase()
           
 Project getProject()
           
 Date getScheduledEndDate()
           
 Date getScheduledStartDate()
           
 IterationTestPlanItem getTestPlan(Long testPlanId)
           
 IterationTestPlanItem getTestPlanForTestCaseId(Long testCaseId)
           
 List<IterationTestPlanItem> getTestPlans()
           
 boolean isActualEndAuto()
           
 boolean isActualStartAuto()
           
 boolean isTestCasePlanned(Long testCaseId)
           
 boolean isTestCasePlanned(TestCase testCase)
           
 void moveTestPlan(int currentPosition, int newPosition)
          Method which sets a test case at a new position
 void removeTestPlan(IterationTestPlanItem testPlan)
           
 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.
 
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

getTestPlans

public List<IterationTestPlanItem> getTestPlans()

addExecution

public void addExecution(@NotNull
                         Execution execution)
That method will add an Execution to the iteration. In order to detect which IterationTestPlanItem we will attach that Execution to, the Execution must be referencing at TestCase prior calling that method (ie execution.getReferencedTestCase() must not return null), or no operation will be performed.

Parameters:
execution -

getPlannedTestCase

public List<TestCase> getPlannedTestCase()

addTestPlan

public void addTestPlan(@NotNull
                        IterationTestPlanItem testPlan)

removeTestPlan

public void removeTestPlan(@NotNull
                           IterationTestPlanItem testPlan)

getExecutions

public List<Execution> getExecutions()

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()

getTestPlanForTestCaseId

public IterationTestPlanItem getTestPlanForTestCaseId(Long testCaseId)

getTestPlan

public IterationTestPlanItem getTestPlan(Long testPlanId)

isTestCasePlanned

public boolean isTestCasePlanned(Long testCaseId)

isTestCasePlanned

public boolean isTestCasePlanned(TestCase testCase)

createCopy

public Iteration createCopy()

findTestCaseInIteration

public int findTestCaseInIteration(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.

findTestPlanInIteration

public int findTestPlanInIteration(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

public void moveTestPlan(int currentPosition,
                         int newPosition)
Method which sets a test case at a new position

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

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()

updateAutoDates

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

Parameters:
newItemTestPlanDate -


Copyright © 2010-2012 Squashtest TM, Squashtest.org. All Rights Reserved.