@Entity @Indexed public class Requirement extends RequirementLibraryNode<RequirementVersion> implements NodeContainer<Requirement>
| Modifier | Constructor and Description |
|---|---|
protected |
Requirement() |
|
Requirement(RequirementVersion version)
Creates a new requirement which "latest version" is the given
RequirementVersion |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(NodeContainerVisitor visitor) |
void |
accept(NodeVisitor visitor) |
void |
accept(RequirementLibraryNodeVisitor visitor)
Implementors should ask the visitor to visit this object.
|
void |
addContent(Requirement child)
Adds new content to this container.
|
void |
addContent(Requirement child,
int position)
Adds new content to this container at the given position.
|
void |
addExistingRequirementVersion(RequirementVersion requirementVersion)
Add a requirement version which is not a copy of current version.
|
SortedMap<RequirementVersion,RequirementVersion> |
addPreviousVersionsCopiesToCopy(Requirement copy)
Will create copies for all non obsolete versions older than the current version, and add it to the copy.
|
Requirement |
createCopy()
Creates a copy usable in a copy / paste operation.
|
RequirementVersion |
findByMilestone(Milestone milestone)
finds which version of this requirement is bound to the given milestone, or null
if there is none
|
RequirementVersion |
findLastNonObsoleteVersion() |
RequirementVersion |
findLastNonObsoleteVersionAfterImport() |
RequirementVersion |
findRequirementVersion(int versionNumber)
Modified for [Feat 5085] as we can now have non successive RequirementVersion number
|
InfoListItem |
getCategory() |
List<Requirement> |
getContent() |
List<String> |
getContentNames() |
RequirementCriticality |
getCriticality() |
RequirementVersion |
getCurrentVersion() |
RequirementVersion |
getDefaultVerifiableVersion()
returns this requirement's version which should be linked to a test case by default.
|
String |
getDescription() |
String |
getName() |
Collection<Requirement> |
getOrderedContent()
Will return the ordered (if order there is) content nodes.
|
String |
getReference() |
List<RequirementVersion> |
getRequirementVersions()
Get the all the requirement versions numbers and status by the version Id
|
RequirementVersion |
getResource() |
RequirementStatus |
getStatus() |
RequirementSyncExtender |
getSyncExtender() |
List<RequirementVersion> |
getUnmodifiableVersions() |
boolean |
hasContent() |
boolean |
hasNonObsoleteVersion() |
void |
increaseVersion() |
void |
increaseVersion(RequirementVersion newVersion) |
boolean |
isContentNameAvailable(String name) |
boolean |
isLinkable() |
boolean |
isModifiable()
Tells if this requirement's "intrinsic" properties can be modified.
|
boolean |
isSynchronized() |
boolean |
meOrMyChildHaveAVersionBoundToMilestone(Milestone milestone) |
void |
removeContent(Requirement exChild) |
void |
setCategory(InfoListItem category)
Set the requirement category
|
void |
setCriticality(RequirementCriticality criticality)
Set the requirement criticality
|
void |
setCurrentVersion(RequirementVersion version) |
void |
setDescription(String description) |
void |
setName(String name) |
void |
setReference(String reference)
Set the requirement reference
|
void |
setStatus(RequirementStatus status) |
void |
setSyncExtender(RequirementSyncExtender syncExtender) |
getAttachmentList, getId, getLibrary, getMainResource, getProject, notifyAssociatedWithProjectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetProjectgetIdprotected Requirement()
public Requirement(@NotNull
RequirementVersion version)
RequirementVersionpublic void setName(String name)
setName in interface CopiablesetName in interface LibraryNodename - The name of this node. Should not be blank or null.public void setDescription(String description)
setDescription in interface LibraryNodedescription - the new node descriptionpublic void accept(RequirementLibraryNodeVisitor visitor)
RequirementLibraryNodeaccept in class RequirementLibraryNode<RequirementVersion>public void accept(NodeVisitor visitor)
public String getReference()
public void setReference(String reference)
public List<RequirementVersion> getRequirementVersions()
public Requirement createCopy()
createCopy in interface Copiablepublic SortedMap<RequirementVersion,RequirementVersion> addPreviousVersionsCopiesToCopy(Requirement copy)
copy - : The requirement copypublic RequirementCriticality getCriticality()
public void setCriticality(RequirementCriticality criticality)
public InfoListItem getCategory()
public void setCategory(InfoListItem category)
public void setStatus(RequirementStatus status)
public RequirementStatus getStatus()
public boolean isLinkable()
true if this requirement can be (un)linked by new verifying testcasespublic boolean isModifiable()
#verifyingTestCases are governed by the isLinkable() state,
#status is governed by itself.true if this requirement's properties can be modified.public String getName()
getName in interface CopiablegetName in interface LibraryNodepublic String getDescription()
getDescription in interface LibraryNodepublic RequirementVersion getCurrentVersion()
public RequirementVersion getResource()
getResource in class RequirementLibraryNode<RequirementVersion>public void setCurrentVersion(RequirementVersion version)
public void increaseVersion()
public void increaseVersion(RequirementVersion newVersion)
public RequirementVersion getDefaultVerifiableVersion()
public List<RequirementVersion> getUnmodifiableVersions()
public boolean hasNonObsoleteVersion()
public RequirementVersion findLastNonObsoleteVersion()
public RequirementVersion findRequirementVersion(int versionNumber)
public void addContent(@NotNull
Requirement child)
throws DuplicateNameException,
org.squashtest.tm.core.foundation.exception.NullArgumentException
NodeContaineraddContent in interface NodeContainer<Requirement>DuplicateNameExceptionorg.squashtest.tm.core.foundation.exception.NullArgumentExceptionpublic void addContent(@NotNull
Requirement child,
int position)
throws DuplicateNameException,
org.squashtest.tm.core.foundation.exception.NullArgumentException
NodeContaineraddContent in interface NodeContainer<Requirement>DuplicateNameExceptionorg.squashtest.tm.core.foundation.exception.NullArgumentExceptionpublic boolean isContentNameAvailable(String name)
isContentNameAvailable in interface NodeContainer<Requirement>public List<Requirement> getContent()
getContent in interface NodeContainer<Requirement>public Collection<Requirement> getOrderedContent()
NodeContainergetOrderedContent in interface NodeContainer<Requirement>public boolean hasContent()
hasContent in interface NodeContainer<Requirement>public void removeContent(Requirement exChild) throws org.squashtest.tm.core.foundation.exception.NullArgumentException
removeContent in interface NodeContainer<Requirement>org.squashtest.tm.core.foundation.exception.NullArgumentExceptionpublic List<String> getContentNames()
getContentNames in interface NodeContainer<Requirement>public void accept(NodeContainerVisitor visitor)
accept in interface NodeContainer<Requirement>public RequirementVersion findByMilestone(Milestone milestone)
public boolean meOrMyChildHaveAVersionBoundToMilestone(Milestone milestone)
public void addExistingRequirementVersion(RequirementVersion requirementVersion)
public RequirementVersion findLastNonObsoleteVersionAfterImport()
public RequirementSyncExtender getSyncExtender()
public void setSyncExtender(RequirementSyncExtender syncExtender)
public boolean isSynchronized()
Copyright © 2010–2016 Henix, henix.fr. All rights reserved.