public static class RuleDefinition.Builder extends Object implements RuleDefinitionContract, ModelBuilder, Serializable
RuleDefinitionContract
.Modifier and Type | Method and Description |
---|---|
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
|
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 blankpublic static RuleDefinition.Builder create(RuleDefinitionContract contract)
RuleDefinitionContract
.contract
- the contract from which to populate this builderpublic void setId(String ruleId)
ruleId
- the id value to set, must not be null or blankIllegalArgumentException
- if the id is null or blankpublic void setName(String name)
name
- the name value to set, must not be null or blankIllegalArgumentException
- 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 blankIllegalArgumentException
- 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 blankIllegalArgumentException
- 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 Identifiable
public String getName()
RuleDefinitionContract
name - the name of the Rule
getName
in interface RuleDefinitionContract
public String getDescription()
RuleDefinitionContract
description - the description of the Rule
getDescription
in interface RuleDefinitionContract
public String getNamespace()
RuleDefinitionContract
The namespace of the Rule
getNamespace
in interface RuleDefinitionContract
public String getTypeId()
RuleDefinitionContract
getTypeId
in interface RuleDefinitionContract
public String getPropId()
RuleDefinitionContract
Each Rule has exactly one Proposition associated with it.
getPropId
in interface RuleDefinitionContract
public boolean isActive()
Inactivatable
isActive
in interface Inactivatable
public PropositionDefinition.Builder getProposition()
RuleDefinitionContract
Each Rule has exactly one Proposition associated with it.
getProposition
in interface RuleDefinitionContract
public List<ActionDefinition.Builder> getActions()
RuleDefinitionContract
A Rule may have zero or more Actions associated with it.
getActions
in interface RuleDefinitionContract
public Map<String,String> getAttributes()
RuleDefinitionContract
getAttributes
in interface RuleDefinitionContract
public Long getVersionNumber()
Versioned
getVersionNumber
in interface Versioned
public RuleDefinition build()
build
in interface ModelBuilder
Copyright © 2005–2014 The Kuali Foundation. All rights reserved.