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

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

@Entity
public class IterationTestPlanItem
extends Object
implements HasExecutionStatus, org.squashtest.csp.core.domain.Identified


Constructor Summary
IterationTestPlanItem()
           
IterationTestPlanItem(TestCase testCase)
           
 
Method Summary
 void addExecution(Execution execution)
           
 Execution createAutomatedExecution(TestCaseCyclicCallChecker cyclicCallChecker)
           
 IterationTestPlanItem createCopy()
          Factory method.
 Execution createExecution(TestCaseCyclicCallChecker cyclicCallChecker)
          Creates an execution of this item and returns it.
 void emptyExecutions()
           
 TestCaseExecutionMode getExecutionMode()
           
 List<Execution> getExecutions()
           
 ExecutionStatus getExecutionStatus()
           
 Long getId()
           
 Iteration getIteration()
           
 String getLabel()
           
 String getLastExecutedBy()
           
 Date getLastExecutedOn()
           
 Execution getLatestExecution()
           
 Set<ExecutionStatus> getLegalStatusSet()
           
 Project getProject()
           
 TestCase getReferencedTestCase()
           
 TestSuite getTestSuite()
           
 User getUser()
           
 boolean isAutomated()
           
 boolean isExecutableThroughIteration()
           
 boolean isExecutableThroughTestSuite()
           
 boolean isTestCaseDeleted()
          One should use isExecutableThroughIteration() in favor of this method.
 void removeExecution(Execution execution)
           
 void setExecutionStatus(ExecutionStatus executionStatus)
           
 void setLabel(String label)
           
 void setLastExecutedBy(String lastExecutedBy)
           
 void setLastExecutedOn(Date lastExecutedOn)
          that method will also forward the information to the iteration for update of autoset dates.
 void setReferencedTestCase(TestCase referencedTestCase)
           
 void setTestSuite(TestSuite suite)
           
 void setUser(User user)
           
 void updateExecutionStatus()
          the IterationTestPlanItem will fetch the ExecutionStatus of the last "live" Execution in his execution list
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IterationTestPlanItem

public IterationTestPlanItem()

IterationTestPlanItem

public IterationTestPlanItem(TestCase testCase)
Method Detail

getIteration

public Iteration getIteration()

getExecutionStatus

public ExecutionStatus getExecutionStatus()
Specified by:
getExecutionStatus in interface HasExecutionStatus

getLegalStatusSet

public Set<ExecutionStatus> getLegalStatusSet()
Specified by:
getLegalStatusSet in interface HasExecutionStatus
Returns:
which ExecutionStatus are available for the implementor : among all ExecutionStatus available not all might be relevant for that entity. The given collection is unmodifiable.

setExecutionStatus

public void setExecutionStatus(ExecutionStatus executionStatus)

updateExecutionStatus

public void updateExecutionStatus()
the IterationTestPlanItem will fetch the ExecutionStatus of the last "live" Execution in his execution list


getReferencedTestCase

public TestCase getReferencedTestCase()

setReferencedTestCase

public void setReferencedTestCase(TestCase referencedTestCase)

getId

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

getExecutions

public List<Execution> getExecutions()

setLabel

public void setLabel(String label)

getLabel

public String getLabel()

getLastExecutedBy

public String getLastExecutedBy()

setLastExecutedBy

public void setLastExecutedBy(String lastExecutedBy)

getLastExecutedOn

public Date getLastExecutedOn()

setLastExecutedOn

public void setLastExecutedOn(Date lastExecutedOn)
that method will also forward the information to the iteration for update of autoset dates.


emptyExecutions

public void emptyExecutions()

addExecution

public void addExecution(@NotNull
                         Execution execution)

createExecution

public Execution createExecution(TestCaseCyclicCallChecker cyclicCallChecker)
                          throws TestPlanItemNotExecutableException
Creates an execution of this item and returns it.

Returns:
the new execution
Throws:
TestPlanItemNotExecutableException

createAutomatedExecution

public Execution createAutomatedExecution(TestCaseCyclicCallChecker cyclicCallChecker)
                                   throws TestPlanItemNotExecutableException
Throws:
TestPlanItemNotExecutableException

isAutomated

public boolean isAutomated()

removeExecution

public void removeExecution(Execution execution)

createCopy

public IterationTestPlanItem createCopy()
Factory method. Creates a copy of this object according to copy / paste rules.

Returns:
the copy, never null

getProject

public Project getProject()

getUser

public User getUser()

setUser

public void setUser(User user)

isExecutableThroughIteration

public boolean isExecutableThroughIteration()

isExecutableThroughTestSuite

public boolean isExecutableThroughTestSuite()
Returns:
true if (the item last execution with unexecuted step) or (item has no execution and is linked to a testCase).

isTestCaseDeleted

public boolean isTestCaseDeleted()
One should use isExecutableThroughIteration() in favor of this method.

Returns:

getTestSuite

public TestSuite getTestSuite()

setTestSuite

public void setTestSuite(TestSuite suite)

getLatestExecution

public Execution getLatestExecution()
Returns:
the last Execution or null if there is none

getExecutionMode

public TestCaseExecutionMode getExecutionMode()


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