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

java.lang.Object
  extended by org.kuali.rice.kns.bo.BusinessObjectBase
      extended by org.kuali.rice.kns.bo.PersistableBusinessObjectBase
          extended by org.kuali.rice.kew.bo.KewPersistableBusinessObjectBase
              extended by org.kuali.rice.kew.rule.bo.RuleTemplate
All Implemented Interfaces:
Serializable, org.apache.ojb.broker.PersistenceBrokerAware, WorkflowPersistable, BusinessObject, PersistableBusinessObject

@Sequence(name="KREW_RTE_TMPL_S",
          property="ruleTemplateId")
public class RuleTemplate
extends KewPersistableBusinessObjectBase
implements WorkflowPersistable

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  Long delegationTemplateId
           
private  String description
           
private  String name
           
private  String returnUrl
           
private  List<RuleTemplateAttribute> ruleTemplateAttributes
           
private  Long ruleTemplateId
           
private  List<RuleTemplateOption> ruleTemplateOptions
           
private static long serialVersionUID
           
 
Fields inherited from class org.kuali.rice.kns.bo.PersistableBusinessObjectBase
extension, versionNumber
 
Constructor Summary
RuleTemplate()
           
 
Method Summary
 boolean containsActiveRuleTemplateAttribute(RuleTemplateAttribute templateAttribute)
           
 boolean containsRuleTemplateAttribute(RuleTemplateAttribute templateAttribute)
           
 Object copy(boolean preserveKeys)
          Returns a copy of this object and its dependents
 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()
           
 Long 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()
           
 Long 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(Long delegationTemplateId)
           
 void setDescription(String description)
           
 void setFyi(RuleTemplateOption fyi)
           
 void setName(String name)
           
 void setReturnUrl(String returnUrl)
           
 void setRuleTemplateAttributes(List<RuleTemplateAttribute> ruleTemplateAttributes)
           
 void setRuleTemplateId(Long ruleTemplateId)
           
 void setRuleTemplateOptions(List<RuleTemplateOption> ruleTemplateOptions)
           
 String toString()
           
protected  LinkedHashMap<String,Object> toStringMapper()
          This overridden method ...
 
Methods inherited from class org.kuali.rice.kew.bo.KewPersistableBusinessObjectBase
beforeInsert
 
Methods inherited from class org.kuali.rice.kns.bo.PersistableBusinessObjectBase
addNote, afterDelete, afterInsert, afterLookup, afterUpdate, beforeDelete, beforeInsert, beforeUpdate, beforeUpdate, buildListOfDeletionAwareLists, deleteNote, getAttachmentService, getBoNote, getBoNotes, getExtension, getNoteService, getObjectId, getPersistenceService, getPersistenceStructureService, getVersionNumber, isAutoIncrementSet, isBoNotesSupport, isNewCollectionRecord, linkEditableUserFields, refresh, refreshNonUpdateableReferences, refreshReferenceObject, setAutoIncrementSet, setBoNotes, setExtension, setNewCollectionRecord, setObjectId, setVersionNumber, supportsBoNotes
 
Methods inherited from class org.kuali.rice.kns.bo.BusinessObjectBase
prepareForWorkflow, toStringBuilder
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.kuali.rice.kns.bo.BusinessObject
prepareForWorkflow
 

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 Long ruleTemplateId

name

private String name

description

private String description

delegationTemplateId

private Long 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 Long getRuleTemplateId()

setRuleTemplateId

public void setRuleTemplateId(Long ruleTemplateId)

getDelegationTemplateId

public Long getDelegationTemplateId()

setDelegationTemplateId

public void setDelegationTemplateId(Long delegationTemplateId)

getDelegationTemplate

public RuleTemplate getDelegationTemplate()

setDelegationTemplate

public void setDelegationTemplate(RuleTemplate delegationTemplate)

copy

public Object copy(boolean preserveKeys)
Returns a copy of this object and its dependents

Specified by:
copy in interface WorkflowPersistable
See Also:
WorkflowPersistable.copy(boolean)

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

toString

public String toString()
Overrides:
toString in class BusinessObjectBase
See Also:
Object.toString()

toStringMapper

protected LinkedHashMap<String,Object> toStringMapper()
This overridden method ...

Specified by:
toStringMapper in class BusinessObjectBase
Returns:
Map containing the fieldValues of the key fields for this class, indexed by fieldName
See Also:
BusinessObjectBase.toStringMapper()


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