|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.kuali.rice.krms.api.repository.rule.RuleDefinition.Builder
public static class RuleDefinition.Builder
This builder is used to construct instances of KRMS Repository Rule. It enforces the constraints of the RuleDefinitionContract.
| Method Summary | |
|---|---|
RuleDefinition |
build()
Builds an instance of a Rule based on the current state of the builder. |
static RuleDefinition.Builder |
create(RuleDefinitionContract contract)
Creates a builder by populating it with data from the given RuleDefinitionContract. |
static RuleDefinition.Builder |
create(String ruleId,
String name,
String namespace,
String typeId,
String propId)
Create a builder with the given parameters. |
List<ActionDefinition.Builder> |
getActions()
This method returns a list of Actions associated with the Rule. |
Map<String,String> |
getAttributes()
This method returns a Map of attributes associated with the Rule. |
String |
getDescription()
This is the description of the Rule |
String |
getId()
The unique identifier for an object. |
String |
getName()
This is the name of the Rule |
String |
getNamespace()
This is the namespace of the Rule |
String |
getPropId()
This method returns the ID of the Proposition associated with the rule. |
PropositionDefinition.Builder |
getProposition()
This method returns the Proposition associated with the rule. |
String |
getTypeId()
This is the KrmsType of the Rule |
Long |
getVersionNumber()
Returns the version number for this object. |
boolean |
isActive()
The active indicator for an object. |
void |
setActions(List<ActionDefinition.Builder> actions)
Sets the value of the actions on this builder to the given value |
void |
setActive(boolean active)
Sets the value of the active on this builder to the given value |
void |
setAttributes(Map<String,String> attributes)
Sets the value of the attributes 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 ruleId)
Sets the value of the id on this builder to the given value. |
void |
setName(String name)
Sets the value of the name on this builder to the given value |
void |
setNamespace(String namespace)
Sets the value of the namespace on this builder to the given value |
void |
setPropId(String propId)
Sets the value of the propId on this builder to the given value |
void |
setProposition(PropositionDefinition.Builder prop)
Sets the value of the proposition 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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static RuleDefinition.Builder create(String ruleId,
String name,
String namespace,
String typeId,
String propId)
ruleId - the id value to set, must not be null or blankname - the name value to set, must not be null or blanknamespace - the namespace value to set, must not be null or blanktypeId - the typeId value to setpropId - the propId value to set, must not be null or blank
public static RuleDefinition.Builder create(RuleDefinitionContract contract)
RuleDefinitionContract.
contract - the contract from which to populate this builder
public void setId(String ruleId)
ruleId - the id value to set, must not be null or blank
IllegalArgumentException - if the id is null or blankpublic void setName(String name)
name - the name value to set, must not be null or blank
IllegalArgumentException - if the name is null or blankpublic void setDescription(String description)
description - public void setNamespace(String namespace)
namespace - the namespace value to set, must not be null or blank
IllegalArgumentException - if the namespace is null or blankpublic void setTypeId(String typeId)
typeId - the typeId value to setpublic void setActive(boolean active)
active - the active value to setpublic void setPropId(String propId)
propId - the propId value to set, must not be null or blank
IllegalArgumentException - if the propId is null or blankpublic void setProposition(PropositionDefinition.Builder prop)
prop - the proposition value to set, must not be nullpublic void setActions(List<ActionDefinition.Builder> actions)
actions - the actions value to set, can be nullpublic void setAttributes(Map<String,String> attributes)
attributes - the attributes values to set, can be nullpublic void setVersionNumber(Long versionNumber)
versionNumber - the versionNumber value to setpublic String getId()
Identifiable
getId in interface Identifiablepublic String getName()
RuleDefinitionContractname - the name of the Rule
getName in interface RuleDefinitionContractpublic String getDescription()
RuleDefinitionContractdescription - the description of the Rule
getDescription in interface RuleDefinitionContractpublic String getNamespace()
RuleDefinitionContractThe namespace of the Rule
getNamespace in interface RuleDefinitionContractpublic String getTypeId()
RuleDefinitionContract
getTypeId in interface RuleDefinitionContractpublic String getPropId()
RuleDefinitionContractEach Rule has exactly one Proposition associated with it.
getPropId in interface RuleDefinitionContractpublic boolean isActive()
Inactivatable
isActive in interface Inactivatablepublic PropositionDefinition.Builder getProposition()
RuleDefinitionContractEach Rule has exactly one Proposition associated with it.
getProposition in interface RuleDefinitionContractpublic List<ActionDefinition.Builder> getActions()
RuleDefinitionContractA Rule may have zero or more Actions associated with it.
getActions in interface RuleDefinitionContractpublic Map<String,String> getAttributes()
RuleDefinitionContract
getAttributes in interface RuleDefinitionContractpublic Long getVersionNumber()
Versioned
getVersionNumber in interface Versionedpublic RuleDefinition build()
build in interface ModelBuilder
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||