org.kuali.rice.krms.impl.repository
Class RuleBo

java.lang.Object
  extended by org.kuali.rice.krms.impl.repository.RuleBo
All Implemented Interfaces:
Serializable, Inactivatable, Identifiable, Versioned, RuleDefinitionContract

@Entity
public class RuleBo
extends Object
implements RuleDefinitionContract, Versioned, Serializable

See Also:
Serialized Form

Field Summary
static String RULE_SEQ_NAME
           
 
Constructor Summary
RuleBo()
           
 
Method Summary
static List<ActionAttributeBo> copyActionAttributes(ActionBo existing)
           
static RuleBo copyRule(RuleBo existing)
           
 RuleBo copyRule(String newRuleName)
          Returns a new copy of this rule with new ids.
static List<ActionBo> copyRuleActions(RuleBo existing, String ruleId)
           
static List<RuleAttributeBo> copyRuleAttributes(RuleBo existing)
           
static RuleBo from(RuleDefinition im)
          Converts a immutable object to it's mutable bo counterpart
 List<ActionBo> getActions()
          This method returns a list of Actions associated with the Rule.
 boolean getActive()
           
 List<RuleAttributeBo> getAttributeBos()
           
 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.
 PropositionBo getProposition()
          This method returns the Proposition associated with the rule.
 String getPropositionSummary()
           
 Tree getPropositionTree()
          This method is used by the RuleEditor to display the proposition in tree form.
 String getSelectedPropositionId()
           
 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.
 Tree refreshPropositionTree(Boolean editMode)
           
 void setActions(List<ActionBo> actions)
           
 void setActive(boolean active)
           
 void setAttributeBos(List<RuleAttributeBo> attributeBos)
           
 void setAttributes(Map<String,String> attributes)
           
 void setDescription(String description)
           
 void setId(String id)
           
 void setName(String name)
           
 void setNamespace(String namespace)
           
 void setProposition(PropositionBo proposition)
           
 void setPropositionSummary(String propositionSummary)
           
 void setPropositionTree(Tree<RuleTreeNode,String> tree)
           
 void setSelectedPropositionId(String selectedPropositionId)
           
 void setTypeId(String typeId)
          set the typeId.
 void setVersionNumber(Long versionNumber)
           
static RuleDefinition to(RuleBo bo)
          Converts a mutable bo to it's immutable counterpart
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RULE_SEQ_NAME

public static final String RULE_SEQ_NAME
See Also:
Constant Field Values
Constructor Detail

RuleBo

public RuleBo()
Method Detail

getProposition

public PropositionBo getProposition()
Description copied from interface: RuleDefinitionContract
This method returns the Proposition associated with the rule.

Each Rule has exactly one Proposition associated with it.

Specified by:
getProposition in interface RuleDefinitionContract
Returns:
an immutable representation of the Proposition associated with the Rule

setProposition

public void setProposition(PropositionBo proposition)

setTypeId

public void setTypeId(String typeId)
set the typeId. If the parameter is blank, then this RuleBo's typeId will be set to null

Parameters:
typeId -

getAttributes

public Map<String,String> getAttributes()
Description copied from interface: RuleDefinitionContract
This method returns a Map of attributes associated with the Rule. The attributes are represented as name/value pairs.

Specified by:
getAttributes in interface RuleDefinitionContract
Returns:
a Map of RuleAttribute objects.

setAttributes

public void setAttributes(Map<String,String> attributes)

getPropositionSummary

public String getPropositionSummary()

getPropositionTree

public Tree getPropositionTree()
This method is used by the RuleEditor to display the proposition in tree form.

Returns:
Tree representing a rule proposition.

setPropositionTree

public void setPropositionTree(Tree<RuleTreeNode,String> tree)

refreshPropositionTree

public Tree refreshPropositionTree(Boolean editMode)

to

public static RuleDefinition to(RuleBo bo)
Converts a mutable bo to it's immutable counterpart

Parameters:
bo - the mutable business object
Returns:
the immutable object

from

public static RuleBo from(RuleDefinition im)
Converts a immutable object to it's mutable bo counterpart

Parameters:
im - immutable object
Returns:
the mutable bo

copyRule

public static RuleBo copyRule(RuleBo existing)

copyRule

public RuleBo copyRule(String newRuleName)
Returns a new copy of this rule with new ids.

Parameters:
newRuleName - name of the copied rule
Returns:
RuleBo a copy of the this rule, with new ids, and the given name

copyRuleAttributes

public static List<RuleAttributeBo> copyRuleAttributes(RuleBo existing)

copyActionAttributes

public static List<ActionAttributeBo> copyActionAttributes(ActionBo existing)

copyRuleActions

public static List<ActionBo> copyRuleActions(RuleBo existing,
                                             String ruleId)

getId

public String getId()
Description copied from interface: Identifiable
The unique identifier for an object. This can be null.

Specified by:
getId in interface Identifiable
Returns:
the id

setId

public void setId(String id)

getNamespace

public String getNamespace()
Description copied from interface: RuleDefinitionContract
This is the namespace of the Rule

The namespace of the Rule

Specified by:
getNamespace in interface RuleDefinitionContract
Returns:
the namespace of the Rule

setNamespace

public void setNamespace(String namespace)

getDescription

public String getDescription()
Description copied from interface: RuleDefinitionContract
This is the description of the Rule

description - the description of the Rule

Specified by:
getDescription in interface RuleDefinitionContract
Returns:
the description of the Rule

setDescription

public void setDescription(String description)

getName

public String getName()
Description copied from interface: RuleDefinitionContract
This is the name of the Rule

name - the name of the Rule

Specified by:
getName in interface RuleDefinitionContract
Returns:
the name of the Rule

setName

public void setName(String name)

getTypeId

public String getTypeId()
Description copied from interface: RuleDefinitionContract
This is the KrmsType of the Rule

Specified by:
getTypeId in interface RuleDefinitionContract
Returns:
id for KRMS type related of the Rule

getPropId

public String getPropId()
Description copied from interface: RuleDefinitionContract
This method returns the ID of the Proposition associated with the rule.

Each Rule has exactly one Proposition associated with it.

Specified by:
getPropId in interface RuleDefinitionContract
Returns:
the id of the Proposition associated with the Rule

getActive

public boolean getActive()

isActive

public boolean isActive()
Description copied from interface: Inactivatable
The active indicator for an object.

Specified by:
isActive in interface Inactivatable
Returns:
true if active false if not.

setActive

public void setActive(boolean active)

getVersionNumber

public Long getVersionNumber()
Description copied from interface: Versioned
Returns the version number for this object. In general, this value should only be null if the object has not yet been stored to a persistent data store. This version number is generally used for the purposes of optimistic locking.

Specified by:
getVersionNumber in interface Versioned
Returns:
the version number, or null if one has not been assigned yet

setVersionNumber

public void setVersionNumber(Long versionNumber)

getActions

public List<ActionBo> getActions()
Description copied from interface: RuleDefinitionContract
This method returns a list of Actions associated with the Rule.

A Rule may have zero or more Actions associated with it.

Specified by:
getActions in interface RuleDefinitionContract
Returns:
An ordered list of Actions associated with a Rule.

setActions

public void setActions(List<ActionBo> actions)

getAttributeBos

public List<RuleAttributeBo> getAttributeBos()

setAttributeBos

public void setAttributeBos(List<RuleAttributeBo> attributeBos)

setPropositionSummary

public void setPropositionSummary(String propositionSummary)

getSelectedPropositionId

public String getSelectedPropositionId()

setSelectedPropositionId

public void setSelectedPropositionId(String selectedPropositionId)


Copyright © 2005–2014 The Kuali Foundation. All rights reserved.