org.kuali.rice.kew.rule.bo
Class RuleTemplate

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.bo.RuleTemplate
All Implemented Interfaces:
Serializable, org.apache.ojb.broker.PersistenceBrokerAware, GloballyUnique, Versioned, ModelObjectBasic, BusinessObject, PersistableBusinessObject

@Entity
public class RuleTemplate
extends PersistableBusinessObjectBase

A model bean which represents a template upon which a rule is created. The RuleTemplate is essentially a collection of RuleAttributes (associated vai the RuleTemplateAttribute bean).

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

Field Summary
static String[] DEFAULT_OPTION_KEYS
          A list of default rule template option keys.
private  RuleTemplate delegationTemplate
           
private  String delegationTemplateId
           
private  String description
           
private  String name
           
private  String returnUrl
           
private  List<RuleTemplateAttribute> ruleTemplateAttributes
           
private  String ruleTemplateId
           
private  List<RuleTemplateOption> ruleTemplateOptions
           
private static long serialVersionUID
           
 
Fields inherited from class org.kuali.rice.krad.bo.PersistableBusinessObjectBase
extension, versionNumber
 
Constructor Summary
RuleTemplate()
           
 
Method Summary
 boolean containsActiveRuleTemplateAttribute(RuleTemplateAttribute templateAttribute)
           
 boolean containsRuleTemplateAttribute(RuleTemplateAttribute templateAttribute)
           
 RuleTemplateOption getAcknowledge()
           
 List<RuleTemplateAttribute> getActiveRuleTemplateAttributes()
          Returns a List of only the active RuleTemplateAttributes on the RuleTemplate sorted according to display order (ascending).
 RuleTemplateOption getApprove()
           
 RuleTemplateOption getComplete()
           
 RuleTemplateOption getDefaultActionRequestValue()
           
 String getDelegateTemplateName()
           
 RuleTemplate getDelegationTemplate()
           
 String getDelegationTemplateId()
           
 String getDescription()
           
 String getEncodedName()
          Used from the rule quicklinks when doing the focus channel.
 RuleTemplateOption getFyi()
           
 String getName()
           
 String getReturnUrl()
           
 List<Role> getRoles()
          Returns a List of Roles from all RoleAttributes attached to this template.
 String getRuleTemplateActionsUrl()
           
 RuleTemplateAttribute getRuleTemplateAttribute(int index)
           
 RuleTemplateAttribute getRuleTemplateAttribute(RuleTemplateAttribute ruleTemplateAttribute)
           
private  RuleTemplateAttribute getRuleTemplateAttribute(RuleTemplateAttribute ruleTemplateAttribute, Boolean active)
          Returns the rule template attribute on this instance whose name matches the name of the rule template attribute passed as a parameter, qualified by it's active state, or null if a match was not found.
 List<RuleTemplateAttribute> getRuleTemplateAttributes()
           
 String getRuleTemplateId()
           
 RuleTemplateOption getRuleTemplateOption(String key)
           
 List<RuleTemplateOption> getRuleTemplateOptions()
           
 void removeNonDefaultOptions()
          Removes any non-default rule template options on the template
 void setAcknowledge(RuleTemplateOption acknowledge)
           
 void setActiveRuleTemplateAttributes(List<RuleTemplateAttribute> ruleTemplateAttributes)
          This is implemented to allow us to use this collection on the inquiry for RuleTemplate.
 void setApprove(RuleTemplateOption approve)
           
 void setComplete(RuleTemplateOption complete)
           
 void setDefaultActionRequestValue(RuleTemplateOption defaultActionRequestValue)
           
 void setDelegationTemplate(RuleTemplate delegationTemplate)
           
 void setDelegationTemplateId(String delegationTemplateId)
           
 void setDescription(String description)
           
 void setFyi(RuleTemplateOption fyi)
           
 void setName(String name)
           
 void setReturnUrl(String returnUrl)
           
 void setRuleTemplateAttributes(List<RuleTemplateAttribute> ruleTemplateAttributes)
           
 void setRuleTemplateId(String ruleTemplateId)
           
 void setRuleTemplateOptions(List<RuleTemplateOption> ruleTemplateOptions)
           
 
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
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

DEFAULT_OPTION_KEYS

public static final String[] DEFAULT_OPTION_KEYS
A list of default rule template option keys.


ruleTemplateId

private String ruleTemplateId

name

private String name

description

private String description

delegationTemplateId

private String delegationTemplateId

delegationTemplate

private RuleTemplate delegationTemplate

ruleTemplateAttributes

private List<RuleTemplateAttribute> ruleTemplateAttributes

ruleTemplateOptions

private List<RuleTemplateOption> ruleTemplateOptions

returnUrl

private String returnUrl
Constructor Detail

RuleTemplate

public RuleTemplate()
Method Detail

removeNonDefaultOptions

public void removeNonDefaultOptions()
Removes any non-default rule template options on the template


getDelegateTemplateName

public String getDelegateTemplateName()

getRuleTemplateActionsUrl

public String getRuleTemplateActionsUrl()

getRuleTemplateAttribute

private RuleTemplateAttribute getRuleTemplateAttribute(RuleTemplateAttribute ruleTemplateAttribute,
                                                       Boolean active)
Returns the rule template attribute on this instance whose name matches the name of the rule template attribute passed as a parameter, qualified by it's active state, or null if a match was not found.


getRuleTemplateAttribute

public RuleTemplateAttribute getRuleTemplateAttribute(RuleTemplateAttribute ruleTemplateAttribute)

containsActiveRuleTemplateAttribute

public boolean containsActiveRuleTemplateAttribute(RuleTemplateAttribute templateAttribute)

containsRuleTemplateAttribute

public boolean containsRuleTemplateAttribute(RuleTemplateAttribute templateAttribute)

getRuleTemplateAttribute

public RuleTemplateAttribute getRuleTemplateAttribute(int index)

getRuleTemplateAttributes

public List<RuleTemplateAttribute> getRuleTemplateAttributes()

getActiveRuleTemplateAttributes

public List<RuleTemplateAttribute> getActiveRuleTemplateAttributes()
Returns a List of only the active RuleTemplateAttributes on the RuleTemplate sorted according to display order (ascending).

Returns:

setActiveRuleTemplateAttributes

public void setActiveRuleTemplateAttributes(List<RuleTemplateAttribute> ruleTemplateAttributes)
This is implemented to allow us to use this collection on the inquiry for RuleTemplate. In the KNS code it does an explicit check that the property is writable.


setRuleTemplateAttributes

public void setRuleTemplateAttributes(List<RuleTemplateAttribute> ruleTemplateAttributes)

getDescription

public String getDescription()

setDescription

public void setDescription(String description)

getName

public String getName()

setName

public void setName(String name)

getRuleTemplateId

public String getRuleTemplateId()

setRuleTemplateId

public void setRuleTemplateId(String ruleTemplateId)

getDelegationTemplateId

public String getDelegationTemplateId()

setDelegationTemplateId

public void setDelegationTemplateId(String delegationTemplateId)

getDelegationTemplate

public RuleTemplate getDelegationTemplate()

setDelegationTemplate

public void setDelegationTemplate(RuleTemplate delegationTemplate)

getReturnUrl

public String getReturnUrl()

setReturnUrl

public void setReturnUrl(String returnUrl)

getEncodedName

public String getEncodedName()
Used from the rule quicklinks when doing the focus channel.


getRuleTemplateOptions

public List<RuleTemplateOption> getRuleTemplateOptions()

setRuleTemplateOptions

public void setRuleTemplateOptions(List<RuleTemplateOption> ruleTemplateOptions)

getRuleTemplateOption

public RuleTemplateOption getRuleTemplateOption(String key)

setAcknowledge

public void setAcknowledge(RuleTemplateOption acknowledge)

setComplete

public void setComplete(RuleTemplateOption complete)

setApprove

public void setApprove(RuleTemplateOption approve)

setFyi

public void setFyi(RuleTemplateOption fyi)

setDefaultActionRequestValue

public void setDefaultActionRequestValue(RuleTemplateOption defaultActionRequestValue)

getAcknowledge

public RuleTemplateOption getAcknowledge()

getComplete

public RuleTemplateOption getComplete()

getApprove

public RuleTemplateOption getApprove()

getFyi

public RuleTemplateOption getFyi()

getDefaultActionRequestValue

public RuleTemplateOption getDefaultActionRequestValue()

getRoles

public List<Role> getRoles()
Returns a List of Roles from all RoleAttributes attached to this template.

Returns:
list of roles


Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.