Class Requirement
java.lang.Object
cruise.umple.compiler.Requirement
Represents a requirement, such as those found around
classes, methods, attributes, associations, stateMachines, states, etc.
If multiple occurrences of a requirement are found, their statements are concatenated
and a single instance is created.
If the language of two occurrences differs (and neither is blank) the the latter occurrences
is ignored with warning 401
All instances of this class are tracked in the instance of Model
with the map allRequirements, whose key is the identifier
-
Constructor Summary
ConstructorsConstructorDescriptionRequirement(Requirement aReq) deep copy constructorRequirement(String aIdentifier, String aStatement, String aWho, String aWhen, String aWhat, String aWhy, String aLanguage) -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddIncludedUseCase(String aIncludedUseCase) booleanaddOrMoveQualityClassAt(QualityClass aQualityClass, int index) booleanaddOrMoveReqImplementationAt(ReqImplementation aReqImplementation, int index) booleanaddOrMoveReqTokenAt(Token aReqToken, int index) booleanaddOrMoveUseCaseStepAt(UseCaseStep aUseCaseStep, int index) booleanaddParentUseCase(String aParentUseCase) booleanaddQualityClass(QualityClass aQualityClass) addQualityClass(String aName, String aContent) booleanaddQualityClassAt(QualityClass aQualityClass, int index) booleanaddReqImplementation(ReqImplementation aReqImplementation) booleanaddReqImplementationAt(ReqImplementation aReqImplementation, int index) booleanaddReqToken(Token aReqToken) booleanaddReqTokenAt(Token aReqToken, int index) booleanaddUseCaseStep(UseCaseStep aUseCaseStep) addUseCaseStep(String aId, UseCaseStep.UseCaseStepType aStepType, String aContent) booleanaddUseCaseStepAt(UseCaseStep aUseCaseStep, int index) convertToComment(List<ReqImplementation> reqSelected, UmpleModel aModel) voiddelete()static Stringformat(String type, List<ReqImplementation> reqSelected, UmpleModel aModel) getBodyDisplayText(String separator) Returns the requirement body text so renderers can output body and quality separately.A unique identifier for this requirement Alphanumeric, with -, .getIncludedUseCase(int index) String[]The requirements language used to express this requirement can be blank, then 'text' is assumed Other languages can be added e.g.getParentUseCase(int index) String[]getQualityClass(int index) Quality classes defined within this requirement format: `req[quality|Quality] {( {...})*}` getReqImplementation(int index) List of tokens where the requirement was found Used when reporting errors regarding missing implementations and when reporting where a requirement is located in the codegetReqToken(int index) The content of the requirement, expressed in the languagegetUseCaseStep(int index) Ordered structured use case steps such as userStep/systemResponsegetUserStoryDisplayText(String separator) format logic moved from cruise.umple/src/generators/Generator_CodePlainRequirementsDoc.ump:generator()getWhat()getWhen()getWho()Structured user story elementsgetWhy()booleanbooleanbooleanbooleanbooleanbooleanbooleanintindexOfIncludedUseCase(String aIncludedUseCase) intindexOfParentUseCase(String aParentUseCase) intindexOfQualityClass(QualityClass aQualityClass) intindexOfReqImplementation(ReqImplementation aReqImplementation) intindexOfReqToken(Token aReqToken) intindexOfUseCaseStep(UseCaseStep aUseCaseStep) static intstatic intstatic intstatic intintintintintintintbooleanremoveIncludedUseCase(String aIncludedUseCase) booleanremoveParentUseCase(String aParentUseCase) booleanremoveQualityClass(QualityClass aQualityClass) booleanremoveReqImplementation(ReqImplementation aReqImplementation) booleanremoveReqToken(Token aReqToken) booleanremoveUseCaseStep(UseCaseStep aUseCaseStep) booleansetIdentifier(String aIdentifier) booleansetLanguage(String aLanguage) booleansetStatement(String aStatement) booleanbooleanbooleanbooleantoString()static StringtranslateToHTML(String content, String lang)
-
Constructor Details
-
Requirement
-
Requirement
deep copy constructor
-
-
Method Details
-
setIdentifier
-
setStatement
-
setWho
-
setWhen
-
setWhat
-
setWhy
-
setLanguage
-
addIncludedUseCase
-
removeIncludedUseCase
-
addParentUseCase
-
removeParentUseCase
-
getIdentifier
A unique identifier for this requirement Alphanumeric, with -, . and _ allowed TODO: add an Umple 'key' statement for this. -
getStatement
The content of the requirement, expressed in the language -
getWho
Structured user story elements -
getWhen
-
getWhat
-
getWhy
-
getLanguage
The requirements language used to express this requirement can be blank, then 'text' is assumed Other languages can be added e.g. GRL = Goal Requirement Language -
getIncludedUseCase
-
getIncludedUseCases
-
numberOfIncludedUseCases
public int numberOfIncludedUseCases() -
hasIncludedUseCases
public boolean hasIncludedUseCases() -
indexOfIncludedUseCase
-
getParentUseCase
-
getParentUseCases
-
numberOfParentUseCases
public int numberOfParentUseCases() -
hasParentUseCases
public boolean hasParentUseCases() -
indexOfParentUseCase
-
getReqToken
-
getReqToken
-
numberOfReqToken
public int numberOfReqToken() -
hasReqToken
public boolean hasReqToken() -
indexOfReqToken
-
getUseCaseStep
-
getUseCaseSteps
Ordered structured use case steps such as userStep/systemResponse -
numberOfUseCaseSteps
public int numberOfUseCaseSteps() -
hasUseCaseSteps
public boolean hasUseCaseSteps() -
indexOfUseCaseStep
-
getQualityClass
-
getQualityClasses
Quality classes defined within this requirement format: `req[quality|Quality] {( {...})*}` -
numberOfQualityClasses
public int numberOfQualityClasses() -
hasQualityClasses
public boolean hasQualityClasses() -
indexOfQualityClass
-
getReqImplementation
-
getReqImplementations
-
numberOfReqImplementations
public int numberOfReqImplementations() -
hasReqImplementations
public boolean hasReqImplementations() -
indexOfReqImplementation
-
minimumNumberOfReqToken
public static int minimumNumberOfReqToken() -
addReqToken
-
removeReqToken
-
addReqTokenAt
-
addOrMoveReqTokenAt
-
minimumNumberOfUseCaseSteps
public static int minimumNumberOfUseCaseSteps() -
addUseCaseStep
public UseCaseStep addUseCaseStep(String aId, UseCaseStep.UseCaseStepType aStepType, String aContent) -
addUseCaseStep
-
removeUseCaseStep
-
addUseCaseStepAt
-
addOrMoveUseCaseStepAt
-
minimumNumberOfQualityClasses
public static int minimumNumberOfQualityClasses() -
addQualityClass
-
addQualityClass
-
removeQualityClass
-
addQualityClassAt
-
addOrMoveQualityClassAt
-
minimumNumberOfReqImplementations
public static int minimumNumberOfReqImplementations() -
addReqImplementation
-
removeReqImplementation
-
addReqImplementationAt
-
addOrMoveReqImplementationAt
-
delete
public void delete() -
hasStructuredUserStoryFields
public boolean hasStructuredUserStoryFields() -
getUserStoryDisplayText
-
getBodyDisplayText
-
getQualityClassNamesSummary
-
getDisplayStatement
-
convertToComment
public static List<Comment> convertToComment(List<ReqImplementation> reqSelected, UmpleModel aModel) -
format
-
translateToHTML
-
toString
-