Class Rule.Builder

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

public static final class Rule.Builder extends Object implements Serializable, org.kuali.rice.core.api.mo.ModelBuilder, RuleContract
A builder which can be used to construct Rule instances. Enforces the constraints of the RuleContract.
See Also:
  • Method Details

    • create

      public static Rule.Builder create()
    • create

      public static Rule.Builder create(RuleContract contract)
    • build

      public Rule build()
      Specified by:
      build in interface org.kuali.rice.core.api.mo.ModelBuilder
    • getId

      public String getId()
      Specified by:
      getId in interface org.kuali.rice.core.api.mo.common.Identifiable
    • 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)