1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.kew.rule;
17
18 import org.kuali.rice.core.api.uif.RemotableAttributeError;
19 import org.kuali.rice.core.api.uif.RemotableAttributeField;
20 import org.kuali.rice.kew.framework.rule.attribute.WorkflowRuleAttributeFields;
21 import org.kuali.rice.kns.util.FieldUtils;
22 import org.kuali.rice.kns.web.ui.Row;
23
24 import java.util.List;
25 import java.util.Map;
26
27
28
29
30
31
32
33 public class WorkflowRuleAttributeRows {
34
35 private final WorkflowRuleAttributeFields fields;
36 private final List<Row> rows;
37
38 public WorkflowRuleAttributeRows(WorkflowRuleAttributeFields fields) {
39 this.fields = fields;
40 this.rows = convertToRows(fields.getAttributeFields());
41 }
42
43 private static List<Row> convertToRows(List<RemotableAttributeField> attributeFields) {
44 return FieldUtils.convertRemotableAttributeFields(attributeFields);
45 }
46
47 public List<Row> getRows() {
48 return rows;
49 }
50
51 public List<RemotableAttributeError> getValidationErrors() {
52 return fields.getValidationErrors();
53 }
54
55 public Map<String, String> getRuleExtensionValues() {
56 return fields.getRuleExtensionValues();
57 }
58
59 }