org.kuali.rice.kew.rule.web
Class WebRuleBaseValues

java.lang.Object
  extended by org.kuali.rice.krad.bo.BusinessObjectBase
      extended by org.kuali.rice.krad.bo.PersistableBusinessObjectBase
          extended by org.kuali.rice.kew.rule.RuleBaseValues
              extended by org.kuali.rice.kew.rule.web.WebRuleBaseValues
All Implemented Interfaces:
Serializable, org.apache.ojb.broker.PersistenceBrokerAware, GloballyUnique, Identifiable, Versioned, ModelObjectBasic, RuleContract, BusinessObject, PersistableBusinessObject

public class WebRuleBaseValues
extends RuleBaseValues

A decorator around a RuleBaseValues object which provides some convienance functions for interacting with the bean from the web-tier. This helps to alleviate some of the weaknesses of JSTL.

Author:
Kuali Rice Team (rice.collab@kuali.org)
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.kuali.rice.krad.bo.PersistableBusinessObjectBase
extension, versionNumber
 
Constructor Summary
WebRuleBaseValues()
           
WebRuleBaseValues(RuleBaseValues rule)
           
 
Method Summary
 WebRuleResponsibility createNewRuleResponsibility()
           
 void edit(RuleBaseValues rule)
          Populates this WebRuleBaseValues object for editing the given rule.
 void establishRequiredState()
          Establishes any missing and required state in the WebRuleBaseValues.
 Map getActionRequestCodes()
           
 KeyValueId getField(int index)
           
 Map getFieldMap(String ruleTemplateAttributeId)
           
 List getFields()
           
 String getFromDateString()
           
 String getParentRuleId()
           
 int getResponsibilitiesSize()
           
 RuleResponsibilityBo getResponsibility(int index)
           
 List<RoleName> getRoles()
           
 List<RoleName> getRows()
           
 RuleDelegationBo getRuleDelegation()
           
 String getRuleTemplateName()
          Template Name of the Rule.
 String getToDateString()
           
 void initialize()
           
 boolean isHasExtensionValueErrors()
           
 void load(RuleBaseValues rule)
          Loads the given rule into this WebRuleBaseValues.
 void loadFieldsWithDefaultValues()
           
 void materialize()
          This method is used to "materialize" the web rule before it gets saved, if we don't do this then certain fields will be saved as NULL.
 void populatePreviousRuleIds()
           
 void setFields(List fields)
           
 void setFromDateString(String fromDateString)
           
 void setHasExtensionValueErrors(boolean hasRuleExtensionValueErrors)
           
 void setRoles(List<RoleName> roles)
           
 void setRows(List ruleTemplateAttributes)
           
 void setRuleTemplateName(String ruleTemplateName)
           
 void setToDateString(String toDateString)
           
 void validateRule(String keyPrefix, org.apache.struts.action.ActionErrors errors)
           
 
Methods inherited from class org.kuali.rice.kew.rule.RuleBaseValues
addRuleResponsibility, addRuleResponsibility, findResponsibility, getActivationDate, getActiveIndDisplay, getCurrentInd, getDeactivationDate, getDelegateRule, getDescription, getDestinationUrl, getDocTypeName, getDocumentId, getDocumentType, getFieldValues, getFromDate, getFromDateValue, getGroupResponsibilities, getGroupReviewerName, getGroupReviewerNamespace, getId, getMyColumns, getName, getPersonImpl, getPersonResponsibilities, getPersonReviewer, getPersonReviewerType, getPreviousRuleId, getPreviousVersion, getResponsibility, getReturnUrl, getRoleResponsibilities, getRuleExpressionDef, getRuleExtension, getRuleExtensionMap, getRuleExtensions, getRuleExtensionValue, getRuleExtensionValue, getRuleExtensionValueLabels, getRuleResponsibilities, getRuleTemplate, getRuleTemplateId, getTemplateRuleInd, getToDate, getToDateValue, getVersionNbr, isActive, isActive, isForceAction, isMatch, removeResponsibility, setActivationDate, setActive, setCurrentInd, setDeactivationDate, setDelegateRule, setDescription, setDestinationUrl, setDocTypeName, setDocumentId, setFieldValues, setForceAction, setFromDateValue, setGroupResponsibilities, setGroupReviewerName, setGroupReviewerNamespace, setId, setMyColumns, setName, setPersonResponsibilities, setPersonReviewer, setPersonReviewerType, setPreviousRuleId, setPreviousVersion, setReturnUrl, setRoleResponsibilities, setRuleExpressionDef, setRuleExtensions, setRuleResponsibilities, setRuleTemplate, setRuleTemplateId, setTemplateRuleInd, setToDateValue, setVersionNbr, to
 
Methods inherited from class org.kuali.rice.krad.bo.PersistableBusinessObjectBase
afterDelete, afterInsert, afterLookup, afterUpdate, beforeDelete, beforeInsert, beforeUpdate, buildListOfDeletionAwareLists, getExtension, getObjectId, getPersistenceService, getPersistenceStructureService, getVersionNumber, isNewCollectionRecord, linkEditableUserFields, postLoad, postPersist, postRemove, postUpdate, prePersist, preRemove, preUpdate, refresh, refreshNonUpdateableReferences, refreshReferenceObject, setExtension, setNewCollectionRecord, setObjectId, setVersionNumber
 
Methods inherited from class org.kuali.rice.krad.bo.BusinessObjectBase
prepareForWorkflow, toString, toStringBuilder, toStringMapper
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.kuali.rice.core.api.mo.ModelObjectBasic
toString
 

Constructor Detail

WebRuleBaseValues

public WebRuleBaseValues()

WebRuleBaseValues

public WebRuleBaseValues(RuleBaseValues rule)
                  throws Exception
Throws:
Exception
Method Detail

loadFieldsWithDefaultValues

public void loadFieldsWithDefaultValues()

getFields

public List getFields()

setFields

public void setFields(List fields)

getField

public KeyValueId getField(int index)

getFromDateString

public String getFromDateString()
Overrides:
getFromDateString in class RuleBaseValues

setFromDateString

public void setFromDateString(String fromDateString)

getRoles

public List<RoleName> getRoles()

setRoles

public void setRoles(List<RoleName> roles)

getRows

public List<RoleName> getRows()

setRows

public void setRows(List ruleTemplateAttributes)

getToDateString

public String getToDateString()
Overrides:
getToDateString in class RuleBaseValues

setToDateString

public void setToDateString(String toDateString)

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
Overrides:
getRuleTemplateName in class RuleBaseValues
Returns:
ruleTemplateName

setRuleTemplateName

public void setRuleTemplateName(String ruleTemplateName)

isHasExtensionValueErrors

public boolean isHasExtensionValueErrors()

setHasExtensionValueErrors

public void setHasExtensionValueErrors(boolean hasRuleExtensionValueErrors)

edit

public void edit(RuleBaseValues rule)
          throws Exception
Populates this WebRuleBaseValues object for editing the given rule.

Throws:
Exception

load

public void load(RuleBaseValues rule)
          throws Exception
Loads the given rule into this WebRuleBaseValues.

Throws:
Exception

initialize

public void initialize()
                throws Exception
Throws:
Exception

establishRequiredState

public void establishRequiredState()
                            throws Exception
Establishes any missing and required state in the WebRuleBaseValues.

Throws:
Exception

getResponsibility

public RuleResponsibilityBo getResponsibility(int index)
Overrides:
getResponsibility in class RuleBaseValues

getResponsibilitiesSize

public int getResponsibilitiesSize()

createNewRuleResponsibility

public WebRuleResponsibility createNewRuleResponsibility()

getFieldMap

public Map getFieldMap(String ruleTemplateAttributeId)

populatePreviousRuleIds

public void populatePreviousRuleIds()

materialize

public void materialize()
This method is used to "materialize" the web rule before it gets saved, if we don't do this then certain fields will be saved as NULL. For example, ruleTemplate.


validateRule

public void validateRule(String keyPrefix,
                         org.apache.struts.action.ActionErrors errors)

getActionRequestCodes

public Map getActionRequestCodes()
Returns:
Returns the actionRequestCodes.

getRuleDelegation

public RuleDelegationBo getRuleDelegation()

getParentRuleId

public String getParentRuleId()


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