org.kuali.rice.kew.api.rule
Class Rule.Builder

java.lang.Object
  extended by org.kuali.rice.kew.api.rule.Rule.Builder
All Implemented Interfaces:
Serializable, Identifiable, ModelBuilder, RuleContract
Enclosing class:
Rule

public static final class Rule.Builder
extends Object
implements Serializable, ModelBuilder, RuleContract

A builder which can be used to construct Rule instances. Enforces the constraints of the RuleContract.

See Also:
Serialized Form

Method Summary
 Rule build()
          Returns an instance of the object being built by this builder based on the current state of the builder.
static Rule.Builder create()
           
static Rule.Builder create(RuleContract contract)
           
 String getDescription()
          The description of the rule.
 String getDocTypeName()
          The documentTypeName of the rule.
 org.joda.time.DateTime getFromDate()
          The ending date of the rule.
 String getId()
          The unique identifier for an object.
 String getName()
          Unique Name for the Rule.
 String getPreviousRuleId()
          Unique id for the previous version of this Rule.
 RuleExpression.Builder getRuleExpressionDef()
          Expression for rule to evaluate.
 List<RuleExtension.Builder> getRuleExtensions()
          List of rule extensions associated with the Rule
 List<RuleResponsibility.Builder> getRuleResponsibilities()
          List of rule responsibilities associated with the Rule
 RuleTemplate.Builder getRuleTemplate()
          Unique Id for Template of Rule.
 String getRuleTemplateName()
          Template Name of the Rule.
 org.joda.time.DateTime getToDate()
          The ending date of the rule.
 boolean isActive()
          The active indicator for the rule.
 boolean isForceAction()
          Shows if rule will force its action.
 void setActive(boolean active)
           
 void setDescription(String description)
           
 void setDocTypeName(String docTypeName)
           
 void setForceAction(boolean forceAction)
           
 void setFromDate(org.joda.time.DateTime fromDate)
           
 void setId(String id)
           
 void setName(String name)
           
 void setPreviousRuleId(String previousRuleId)
           
 void setRuleExpressionDef(RuleExpression.Builder ruleExpressionDef)
           
 void setRuleExtensions(List<RuleExtension.Builder> ruleExtensions)
           
 void setRuleResponsibilities(List<RuleResponsibility.Builder> ruleResponsibilities)
           
 void setRuleTemplate(RuleTemplate.Builder ruleTemplate)
           
 void setRuleTemplateName(String ruleTemplateName)
           
 void setToDate(org.joda.time.DateTime toDate)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static Rule.Builder create()

create

public static Rule.Builder create(RuleContract contract)

build

public Rule build()
Description copied from interface: ModelBuilder
Returns an instance of the object being built by this builder based on the current state of the builder. It should be possible to invoke this method more than once on the same builder. It should never return null;

Specified by:
build in interface ModelBuilder
Returns:
an instance of the object being built by this builder, should never return null

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

getName

public String getName()
Description copied from interface: RuleContract
Unique Name for the Rule.

This is the unique name of the Rule

Specified by:
getName in interface RuleContract
Returns:
name

getRuleTemplate

public RuleTemplate.Builder getRuleTemplate()
Description copied from interface: RuleContract
Unique Id for Template of Rule.

This is the unique Id of the rule template of the rule

Specified by:
getRuleTemplate in interface RuleContract
Returns:
ruleTemplateId

isActive

public boolean isActive()
Description copied from interface: RuleContract
The active indicator for the rule.

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

getDescription

public String getDescription()
Description copied from interface: RuleContract
The description of the rule.

Specified by:
getDescription in interface RuleContract
Returns:
description

getDocTypeName

public String getDocTypeName()
Description copied from interface: RuleContract
The documentTypeName of the rule.

Specified by:
getDocTypeName in interface RuleContract
Returns:
documentTypeName

getFromDate

public org.joda.time.DateTime getFromDate()
Description copied from interface: RuleContract
The ending date of the rule.

This is the date from which the rule stops being be used

Specified by:
getFromDate in interface RuleContract
Returns:
fromDate

getToDate

public org.joda.time.DateTime getToDate()
Description copied from interface: RuleContract
The ending date of the rule.

This is the date from which the rule starts to be used

Specified by:
getToDate in interface RuleContract
Returns:
toDate

isForceAction

public boolean isForceAction()
Description copied from interface: RuleContract
Shows if rule will force its action.

Specified by:
isForceAction in interface RuleContract
Returns:
boolean value representing if action is forced

getPreviousRuleId

public String getPreviousRuleId()
Description copied from interface: RuleContract
Unique id for the previous version of this Rule.

This is the unique id value of the previous version of this Rule.

Specified by:
getPreviousRuleId in interface RuleContract
Returns:
previousVersionId

getRuleResponsibilities

public List<RuleResponsibility.Builder> getRuleResponsibilities()
Description copied from interface: RuleContract
List of rule responsibilities associated with the Rule

Specified by:
getRuleResponsibilities in interface RuleContract
Returns:
ruleResponsibilities

getRuleExtensions

public List<RuleExtension.Builder> getRuleExtensions()
Description copied from interface: RuleContract
List of rule extensions associated with the Rule

Specified by:
getRuleExtensions in interface RuleContract
Returns:
ruleExtensions

getRuleTemplateName

public String getRuleTemplateName()
Description copied from interface: RuleContract
Template Name of the Rule.

This is the name of the rule template for the rule

Specified by:
getRuleTemplateName in interface RuleContract
Returns:
ruleTemplateName

getRuleExpressionDef

public RuleExpression.Builder getRuleExpressionDef()
Description copied from interface: RuleContract
Expression for rule to evaluate.

This is expression definition of the rule

Specified by:
getRuleExpressionDef in interface RuleContract
Returns:
ruleExpressionDef

setId

public void setId(String id)

setName

public void setName(String name)

setRuleTemplate

public void setRuleTemplate(RuleTemplate.Builder ruleTemplate)

setActive

public void setActive(boolean active)

setDescription

public void setDescription(String description)

setDocTypeName

public void setDocTypeName(String docTypeName)

setFromDate

public void setFromDate(org.joda.time.DateTime fromDate)

setToDate

public void setToDate(org.joda.time.DateTime toDate)

setForceAction

public void setForceAction(boolean forceAction)

setPreviousRuleId

public void setPreviousRuleId(String previousRuleId)

setRuleResponsibilities

public void setRuleResponsibilities(List<RuleResponsibility.Builder> ruleResponsibilities)

setRuleExtensions

public void setRuleExtensions(List<RuleExtension.Builder> ruleExtensions)

setRuleTemplateName

public void setRuleTemplateName(String ruleTemplateName)

setRuleExpressionDef

public void setRuleExpressionDef(RuleExpression.Builder ruleExpressionDef)


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.