public static class PropositionDefinition.Builder extends Object implements PropositionDefinitionContract, ModelBuilder, Serializable
PropositionDefinitionContract
.Modifier and Type | Method and Description |
---|---|
PropositionDefinition |
build()
Builds an instance of a Proposition based on the current state of the builder.
|
PropositionDefinition.Builder |
compoundComponents(List<PropositionDefinition.Builder> components)
Set the value of the components to the given value.
|
PropositionDefinition.Builder |
compoundOpCode(String opCode)
Set the value of the opCode to the given value.
|
static PropositionDefinition.Builder |
create(PropositionDefinitionContract contract)
Creates a builder by populating it with data from the given
PropositionDefinitionContract . |
static PropositionDefinition.Builder |
create(String propId,
String propTypeCode,
String ruleId,
String typeId,
List<PropositionParameter.Builder> parameters)
Create a Builder with the given values
|
List<PropositionDefinition.Builder> |
getCompoundComponents()
Returns the propositions which are contained in a
compound proposition.
|
String |
getCompoundOpCode()
Returns the op code to be used when evaluating compound
propositions.
|
Integer |
getCompoundSequenceNumber()
Returns the sequence number used to order the
compound propositions
Note: this value is set by the service
|
String |
getDescription()
Returns the description text for the KRMS proposition
|
String |
getId()
The unique identifier for an object.
|
List<PropositionParameter.Builder> |
getParameters()
Returns the parameter list of the proposition.
|
String |
getPropositionTypeCode()
There are three main types of Propositions:
Compound Propositions - a proposition consisting of other propositions
and a boolean algebra operator (AND, OR) defining how to evaluate
those propositions.
|
String |
getRuleId()
TReturns the ID of the rule this proposition belongs to.
|
String |
getTypeId()
Returns the id of Proposition KrmsType of the proposition.
|
Long |
getVersionNumber()
Returns the version number for this object.
|
void |
setCompoundComponents(List<PropositionDefinition.Builder> components)
Sets the value of the components on this builder to the given value.
|
void |
setCompoundOpCode(String opCode)
Sets the value of the opCode on this builder to the given value.
|
void |
setCompoundSequenceNumber(Integer seqNo)
Sets the value of the compound sequence no on this builder to the
given value.
|
void |
setDescription(String description)
Sets the value of the description on this builder to the given value.
|
void |
setId(String propId)
Sets the value of the propId on this builder to the given value.
|
void |
setParameters(List<PropositionParameter.Builder> parameters)
Sets the value of the parameters on this builder to the given value.
|
void |
setPropositionTypeCode(String propTypeCode)
Sets the value of the propTypeCode on this builder to the given value.
|
void |
setRule(RuleDefinition.Builder rule)
Sets the value of the rule on this builder to the given value.
|
void |
setRuleId(String ruleId)
Sets the value of the ruleId on this builder to the given value.
|
void |
setTypeId(String typeId)
Sets the value of the typeId on this builder to the given value.
|
void |
setVersionNumber(Long versionNumber)
Sets the value of the versionNumber on this builder to the given value.
|
public PropositionDefinition.Builder compoundOpCode(String opCode)
opCode
- the opCode value to setpublic PropositionDefinition.Builder compoundComponents(List<PropositionDefinition.Builder> components)
components
- the components value to setpublic static PropositionDefinition.Builder create(String propId, String propTypeCode, String ruleId, String typeId, List<PropositionParameter.Builder> parameters)
propId
- the propId value to setpropTypeCode
- the propTypeCode value to setruleId
- the ruleId value to settypeId
- the typeId value to setparameters
- the parameters value to setpublic static PropositionDefinition.Builder create(PropositionDefinitionContract contract)
PropositionDefinitionContract
.contract
- the contract from which to populate this builderpublic void setId(String propId)
propId
- the propId value to setIllegalArgumentException
- if the propId is null or blankpublic void setDescription(String description)
description
- the description value to setpublic void setTypeId(String typeId)
typeId
- the typeId value to setpublic void setRuleId(String ruleId)
ruleId
- the ruleId value to setpublic void setRule(RuleDefinition.Builder rule)
rule
- the rule value to setpublic void setPropositionTypeCode(String propTypeCode)
propTypeCode
- the propTypeCode value to setIllegalArgumentException
- if the propTypeCode is null, blank or invalidpublic void setParameters(List<PropositionParameter.Builder> parameters)
parameters
- the parameters value to setpublic void setCompoundOpCode(String opCode)
opCode
- the opCode value to setIllegalArgumentException
- if the opCode invalidpublic void setCompoundSequenceNumber(Integer seqNo)
seqNo
- the sequence number for this compound propIllegalArgumentException
- if the seqNo invalidpublic void setCompoundComponents(List<PropositionDefinition.Builder> components)
components
- the components value to setpublic void setVersionNumber(Long versionNumber)
versionNumber
- the versionNumber value to setpublic String getId()
Identifiable
getId
in interface Identifiable
public String getDescription()
PropositionDefinitionContract
getDescription
in interface PropositionDefinitionContract
public String getRuleId()
PropositionDefinitionContract
getRuleId
in interface PropositionDefinitionContract
public String getTypeId()
PropositionDefinitionContract
getTypeId
in interface PropositionDefinitionContract
public String getPropositionTypeCode()
PropositionDefinitionContract
There are three main types of Propositions: Compound Propositions - a proposition consisting of other propositions and a boolean algebra operator (AND, OR) defining how to evaluate those propositions. Parameterized Propositions - a proposition which is parameterized by some set of values, evaluation logic is implemented by hand and returns true or false Simple Propositions - a proposition of the form lhs op rhs where lhs=left-hand side, rhs=right-hand side, and op=operator
getPropositionTypeCode
in interface PropositionDefinitionContract
Valid values are C = compound, P = parameterized, S = simple
public List<PropositionParameter.Builder> getParameters()
PropositionDefinitionContract
Compound Propositions will have an empty parameter list.
getParameters
in interface PropositionDefinitionContract
PropositionParameter
public String getCompoundOpCode()
PropositionDefinitionContract
getCompoundOpCode
in interface PropositionDefinitionContract
public Integer getCompoundSequenceNumber()
PropositionDefinitionContract
getCompoundSequenceNumber
in interface PropositionDefinitionContract
public List<PropositionDefinition.Builder> getCompoundComponents()
PropositionDefinitionContract
getCompoundComponents
in interface PropositionDefinitionContract
public Long getVersionNumber()
Versioned
getVersionNumber
in interface Versioned
public PropositionDefinition build()
build
in interface ModelBuilder
Copyright © 2005–2016 The Kuali Foundation. All rights reserved.