|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.rice.kew.rule.AbstractWorkflowAttribute org.kuali.rice.kew.rule.GenericWorkflowAttribute edu.sampleu.travel.workflow.DestinationRuleAttribute
public class DestinationRuleAttribute
Field Summary | |
---|---|
private static String |
DEST_FIELD_KEY
|
private static String |
DEST_LABEL
|
private String |
destination
|
private List<Row> |
rows
|
Fields inherited from class org.kuali.rice.kew.rule.GenericWorkflowAttribute |
---|
attributeName, content, log |
Fields inherited from class org.kuali.rice.kew.rule.AbstractWorkflowAttribute |
---|
required |
Constructor Summary | |
---|---|
DestinationRuleAttribute()
|
|
DestinationRuleAttribute(String destination)
|
Method Summary | |
---|---|
Map<String,String> |
getProperties()
Template method for subclasses to override to expose attribute state |
List<Row> |
getRoutingDataRows()
RoutingDataRows contain Rows describing the UI-level presentation of the ruleData fields used to determine where a given document would be routed according to the associated rule. |
private List<Row> |
getRows()
|
List<Row> |
getRuleRows()
Each Row contains Fields describing the UI-level presentation of a single RuleExtensionValue. |
void |
setDestination(String destination)
|
private List |
validateInputMap(Map paramMap)
|
List |
validateRoutingData(Map paramMap)
These guys should probably be implemented to set the parameters on an internal member property map this attribute should use to contain all properties set on it, like StandardGenericXmlAttribute. |
List |
validateRuleData(Map paramMap)
Validates ruleExtension values in the incoming map. |
Methods inherited from class org.kuali.rice.kew.rule.GenericWorkflowAttribute |
---|
getDocContent, getRuleExtensionValues, isMatch, isMatch, isMatch |
Methods inherited from class org.kuali.rice.kew.rule.AbstractWorkflowAttribute |
---|
getIdFieldName, getLockFieldName, isRequired, setRequired |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final String DEST_LABEL
private static final String DEST_FIELD_KEY
private final List<Row> rows
private String destination
Constructor Detail |
---|
public DestinationRuleAttribute()
public DestinationRuleAttribute(String destination)
Method Detail |
---|
public List<Row> getRuleRows()
WorkflowAttribute
A single Row may contain more than one actual Field instance, but Fields beyond the first one are there to provide context for the display and evaluation of the first one.
The getRuleRows method returns a list of rows that contain Fields describing the UI-level presentation of a single RuleExtensionValue for the creation of a rule. A single row may contain more than one actual Field object, but Fields beyond the first one are there to provide context for the display and evaluation of the first one. For example, a secondary field may be a lookupable or a searchable valid values object. An individual field consists of a field label, a field help url, a field type, whether a lookupable is associated with this field, a property name, a property value, valid values, the name of the lookupable, and the default lookupable name for this field. The field label is a short title that will display on the jsp describing what data to enter for this field. The field help url is optional, but will pop open in a new window the url entered. The field type is the type of field to display (e.g. hidden, text, drop down, radio, quickfinder (lookupable), lookup result only (this type is needed for the lookupable, but does not actually render on the jsp), and finally drop down refresh (this type is a drop down box that when it's value changes another drop down box's valid values will be changed as well)). The lookupable indicator determines whether this field will have a lookupable (valid value search) associated with it. The property name is the name of the field when rendered on the jsp. This needs to be unique when compared to other field names on the jsp. The property value is the value entered into the text box or other field type on the jsp. This value will be empty when creating the field and populated during form submission. A List of valid values is optional and needed to populate drop down boxes or radio buttons. This list consists of KeyLabelPair objects which the key will be the value passed in on submission and the label will be what is display on the jsp. The lookupable is the name of the lookable service to be called for this field. The default lookupable name is the name of the field on the lookupable itself. This may be the same of the property name of the field. This is needed when field conversions are needed. If the lookupable returns a key that doesn't match a property name on the jsp it needs to be converted to one that does. So if the property name is different than the default lookupable name, the lookupable will convert the return key to the property name of the field. Example: say by default a lookupable returns "color=red" on the url. The default lookupable name would be "color" and if you needed a different name for this property on the jsp such as "wallcolor", the lookupable will now return "wallcolor=red" instead of the default "color=red". The default lookupable name also is the key for rule extension values. When an extension value is saved the value comes from the UI and the key from this field. If this field is left null, then the property name of the field will become the key stored in the database for the extension value. A row can also consist of a group label and number of rows for this label to span for this attribute. If a group label is present, it will display on the rule creation jsp and group together the individual rows for this attribute. The total rows number will rowspan the group label across the rows of this attribute. NOTE: the group label and number of rows to span must be specified on each row object for the display to work correctly.
Additionally, it is very important that the List of Row objects is reconstructed every time getRuleRows is called. This is because the code which processes these Rows will set the propertyValue directly on the Field objects contained within. Essentially, this means the Rows and Fields should not be constructed once inside of the attribute and cached statically, but instead be recreated each time this method is called.
getRuleRows
in interface WorkflowAttribute
getRuleRows
in class AbstractWorkflowAttribute
public List<Row> getRoutingDataRows()
WorkflowAttribute
The getRoutingDataRows method returns a list of rows that contain Fields describing the UI-level presentation of a single RuleExtensionValue for the routing report feature. These rows are used to determine where an eDoc would route if these values were entered. They are constructed the same way rule rows are described above and a lot of times are identical.
Additionally, it is very important that the List of Row objects is reconstructed every time getRoutingDataRows is called. This is because the code which processes these Rows will set the propertyValue directly on the Field objects contained within. Essentially, this means the Rows and Fields should not be constructed once inside of the attribute and cached statically, but instead be recreated each time this method is called.
getRoutingDataRows
in interface WorkflowAttribute
getRoutingDataRows
in class AbstractWorkflowAttribute
private List<Row> getRows()
public void setDestination(String destination)
public Map<String,String> getProperties()
GenericWorkflowAttribute
getProperties
in class GenericWorkflowAttribute
public List validateRoutingData(Map paramMap)
GenericWorkflowAttribute
validateRoutingData
in interface WorkflowAttribute
validateRoutingData
in class GenericWorkflowAttribute
TODO: implement me!
public List validateRuleData(Map paramMap)
WorkflowAttribute
validateRuleData
in interface WorkflowAttribute
validateRuleData
in class GenericWorkflowAttribute
paramMap
- Map containing the names and values of the rule extensions for this Attributeprivate List validateInputMap(Map paramMap)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |