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

java.lang.Object
  extended by org.squashtest.csp.tm.domain.library.GenericLibraryNode
      extended by org.squashtest.csp.tm.domain.campaign.CampaignLibraryNode
          extended by org.squashtest.csp.tm.domain.campaign.Campaign
All Implemented Interfaces:
org.squashtest.csp.core.domain.Identified, AttachmentHolder, LibraryNode, ProjectResource

@Entity
public class Campaign
extends CampaignLibraryNode
implements AttachmentHolder


Constructor Summary
Campaign()
           
Campaign(String name, String description)
           
 
Method Summary
 void accept(CampaignLibraryNodeVisitor visitor)
           
 void addIteration(Iteration iteration)
           
 void addToTestPlan(CampaignTestPlanItem itemTestPlan)
           
 Campaign createPastableCopy()
           
 CampaignTestPlanItem findTestPlanItem(TestCase testCase)
           
 Date getActualEndDate()
           
 Date getActualStartDate()
           
 AttachmentList getAttachmentList()
          Should return the container for this object's attachments.
 List<Iteration> getIterations()
           
 Date getScheduledEndDate()
           
 Date getScheduledStartDate()
           
 List<CampaignTestPlanItem> getTestPlan()
           
 CampaignTestPlanItem getTestPlanForTestPlanItemId(Long testCaseId)
          Deprecated. use findTestPlanItem(TestCase)
 boolean hasIterations()
           
 boolean isActualEndAuto()
           
 boolean isActualStartAuto()
           
 boolean isContentNameAvailable(String name)
           
 void removeIteration(Iteration iteration)
           
 void removeTestPlanItem(CampaignTestPlanItem itemTestPlan)
           
 void setActualEndAuto(boolean actualEndAuto)
           
 void setActualEndDate(Date actualEndDate)
           
 void setActualStartAuto(boolean actualStartAuto)
           
 void setActualStartDate(Date actualStartDate)
           
 void setScheduledEndDate(Date endDate)
           
 void setScheduledStartDate(Date startDate)
           
 boolean testPlanContains(TestCase tc)
           
 void updateActualEnd(Date newIterationEndDate)
           
 void updateActualStart(Date newIterationStartDate)
          If the iteration have autodates set, they will be updated accordingly.
 
Methods inherited from class org.squashtest.csp.tm.domain.campaign.CampaignLibraryNode
getId
 
Methods inherited from class org.squashtest.csp.tm.domain.library.GenericLibraryNode
getDescription, getName, getProject, hashCode, notifyAssociatedWithProject, setDescription, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Campaign

public Campaign()

Campaign

public Campaign(String name,
                String description)
Method Detail

accept

public void accept(CampaignLibraryNodeVisitor visitor)
Specified by:
accept in class CampaignLibraryNode

setScheduledStartDate

public void setScheduledStartDate(Date startDate)

getScheduledStartDate

public Date getScheduledStartDate()

setScheduledEndDate

public void setScheduledEndDate(Date endDate)

getScheduledEndDate

public Date getScheduledEndDate()

getActualStartDate

public Date getActualStartDate()

setActualStartDate

public void setActualStartDate(Date actualStartDate)

getActualEndDate

public Date getActualEndDate()

getTestPlan

public List<CampaignTestPlanItem> getTestPlan()

setActualEndDate

public void setActualEndDate(Date actualEndDate)

isActualStartAuto

public boolean isActualStartAuto()

isActualEndAuto

public boolean isActualEndAuto()

setActualStartAuto

public void setActualStartAuto(boolean actualStartAuto)

setActualEndAuto

public void setActualEndAuto(boolean actualEndAuto)

getTestPlanForTestPlanItemId

@Deprecated
public CampaignTestPlanItem getTestPlanForTestPlanItemId(Long testCaseId)
Deprecated. use findTestPlanItem(TestCase)

Parameters:
testCaseId -
Returns:

findTestPlanItem

public CampaignTestPlanItem findTestPlanItem(TestCase testCase)
Parameters:
testCase -
Returns:
the test plan item which references the given test case, if any.

addToTestPlan

public void addToTestPlan(@NotNull
                          CampaignTestPlanItem itemTestPlan)
                   throws TestCaseAlreadyInTestPlanException
Parameters:
itemTestPlan -
Throws:
TestCaseAlreadyInTestPlanException

removeTestPlanItem

public void removeTestPlanItem(@NotNull
                               CampaignTestPlanItem itemTestPlan)

removeIteration

public void removeIteration(@NotNull
                            Iteration iteration)

getIterations

public List<Iteration> getIterations()

addIteration

public void addIteration(@NotNull
                         Iteration iteration)

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.

createPastableCopy

public Campaign createPastableCopy()
Specified by:
createPastableCopy in interface LibraryNode
Specified by:
createPastableCopy in class CampaignLibraryNode

isContentNameAvailable

public boolean isContentNameAvailable(String name)

updateActualStart

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

Parameters:
newItemTestPlanDate -

updateActualEnd

public void updateActualEnd(Date newIterationEndDate)

testPlanContains

public boolean testPlanContains(@NotNull
                                TestCase tc)

hasIterations

public boolean hasIterations()


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