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, BoundEntity, Copiable, LibraryNode, NodeContainer<Iteration>, TreeNode, ProjectResource<Project>

@Entity
public class Campaign
extends CampaignLibraryNode
implements NodeContainer<Iteration>, BoundEntity


Constructor Summary
Campaign()
           
 
Method Summary
 void accept(CampaignLibraryNodeVisitor visitor)
           
 void accept(NodeVisitor visitor)
           
 void addContent(Iteration iteration)
          Adds new content to this container.
 void addIteration(Iteration iteration)
           
 void addToTestPlan(CampaignTestPlanItem itemTestPlan)
           
 Campaign createCopy()
           
 CampaignTestPlanItem findTestPlanItem(TestCase testCase)
           
 Date getActualEndDate()
           
 Date getActualStartDate()
           
 Long getBoundEntityId()
           
 BindableEntity getBoundEntityType()
           
 Set<Iteration> getContent()
           
 List<String> getContentNames()
           
 List<Iteration> getIterations()
           
 Date getScheduledEndDate()
           
 Date getScheduledStartDate()
           
 List<CampaignTestPlanItem> getTestPlan()
           
 CampaignTestPlanItem getTestPlanForTestPlanItemId(Long testCaseId)
          Deprecated. use findTestPlanItem(TestCase)
 boolean hasContent()
           
 boolean hasIterations()
           
 boolean isActualEndAuto()
           
 boolean isActualStartAuto()
           
 boolean isContentNameAvailable(String name)
           
 void moveTestPlanItems(int targetIndex, List<Long> itemIds)
           
 void removeContent(Iteration contentToRemove)
           
 void removeIteration(Iteration iteration)
           
 void removeTestPlanItem(CampaignTestPlanItem itemTestPlan)
           
 void removeTestPlanItem(long itemId)
           
 void removeTestPlanItems(List<Long> itemIds)
           
 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, getLibrary
 
Methods inherited from class org.squashtest.csp.tm.domain.library.GenericLibraryNode
equals, getAttachmentList, getDescription, getName, getProject, hashCode, notifyAssociatedWithProject, setDescription, setName
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.squashtest.csp.core.domain.Identified
getId
 
Methods inherited from interface org.squashtest.csp.tm.domain.customfield.BoundEntity
getProject
 

Constructor Detail

Campaign

public Campaign()
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)
Parameters:
itemTestPlan -

removeTestPlanItem

public void removeTestPlanItem(@NotNull
                               CampaignTestPlanItem itemTestPlan)

removeTestPlanItem

public void removeTestPlanItem(long itemId)

removeTestPlanItems

public void removeTestPlanItems(List<Long> itemIds)

removeIteration

public void removeIteration(@NotNull
                            Iteration iteration)

getIterations

public List<Iteration> getIterations()

addIteration

public void addIteration(@NotNull
                         Iteration iteration)

createCopy

public Campaign createCopy()
Specified by:
createCopy in interface Copiable

isContentNameAvailable

public boolean isContentNameAvailable(String name)
Specified by:
isContentNameAvailable in interface NodeContainer<Iteration>

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

moveTestPlanItems

public void moveTestPlanItems(int targetIndex,
                              List<Long> itemIds)

getBoundEntityId

public Long getBoundEntityId()
Specified by:
getBoundEntityId in interface BoundEntity

getBoundEntityType

public BindableEntity getBoundEntityType()
Specified by:
getBoundEntityType in interface BoundEntity

accept

public void accept(NodeVisitor visitor)
Specified by:
accept in interface TreeNode

getContent

public Set<Iteration> getContent()
Specified by:
getContent in interface NodeContainer<Iteration>

hasContent

public boolean hasContent()
Specified by:
hasContent in interface NodeContainer<Iteration>

addContent

public void addContent(Iteration iteration)
                throws DuplicateNameException,
                       org.apache.commons.lang.NullArgumentException
Description copied from interface: NodeContainer
Adds new content to this container. Should refuse to add null content, should refuse to add content with duplicate name.

Specified by:
addContent in interface NodeContainer<Iteration>
Throws:
DuplicateNameException
org.apache.commons.lang.NullArgumentException

removeContent

public void removeContent(Iteration contentToRemove)
                   throws org.apache.commons.lang.NullArgumentException
Specified by:
removeContent in interface NodeContainer<Iteration>
Throws:
org.apache.commons.lang.NullArgumentException

getContentNames

public List<String> getContentNames()
Specified by:
getContentNames in interface NodeContainer<Iteration>


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