1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krad.datadictionary;
17
18 import java.util.ArrayList;
19 import java.util.HashMap;
20 import java.util.List;
21 import java.util.Map;
22
23 import org.kuali.rice.kew.api.document.attribute.WorkflowAttributeDefinition;
24 import org.kuali.rice.krad.datadictionary.parse.BeanTag;
25 import org.kuali.rice.krad.datadictionary.parse.BeanTagAttribute;
26 import org.kuali.rice.krad.datadictionary.uif.UifDictionaryBeanBase;
27 import org.kuali.rice.krad.datadictionary.validator.ValidationTrace;
28
29
30
31
32
33
34
35 @BeanTag(name = "workflowAttributes")
36 public class WorkflowAttributes extends UifDictionaryBeanBase {
37 private static final long serialVersionUID = 6435015497886060280L;
38
39 private List<SearchingTypeDefinition> searchingTypeDefinitions;
40 private Map<String, RoutingTypeDefinition> routingTypeDefinitions;
41
42 public WorkflowAttributes() {
43 searchingTypeDefinitions = new ArrayList<SearchingTypeDefinition>();
44 routingTypeDefinitions = new HashMap<String, RoutingTypeDefinition>();
45 }
46
47
48
49
50 @BeanTagAttribute(name = "searchingTypeDefinitions", type = BeanTagAttribute.AttributeType.LISTBEAN)
51 public List<SearchingTypeDefinition> getSearchingTypeDefinitions() {
52 return this.searchingTypeDefinitions;
53 }
54
55
56
57
58 public void setSearchingTypeDefinitions(List<SearchingTypeDefinition> searchingTypeDefinitions) {
59 this.searchingTypeDefinitions = searchingTypeDefinitions;
60 }
61
62 @BeanTagAttribute(name = "routingTypeDefinitions", type = BeanTagAttribute.AttributeType.MAPBEAN)
63 public Map<String, RoutingTypeDefinition> getRoutingTypeDefinitions() {
64 return this.routingTypeDefinitions;
65 }
66
67 public void setRoutingTypeDefinitions(Map<String, RoutingTypeDefinition> routingTypeDefinitions) {
68 this.routingTypeDefinitions = routingTypeDefinitions;
69 }
70
71
72
73
74
75
76 @Override
77 public void dataDictionaryPostProcessing() {
78 for (SearchingTypeDefinition definition : searchingTypeDefinitions) {
79 definition.dataDictionaryPostProcessing();
80 }
81 for (RoutingTypeDefinition definition : routingTypeDefinitions.values()) {
82 definition.dataDictionaryPostProcessing();
83 }
84 }
85
86 public void completeValidation(Class<?> rootBusinessObjectClass, Class<?> otherBusinessObjectClass, ValidationTrace tracer) {
87 for (SearchingTypeDefinition definition : searchingTypeDefinitions) {
88 definition.completeValidation(rootBusinessObjectClass, otherBusinessObjectClass,tracer);
89 }
90 for (RoutingTypeDefinition definition : routingTypeDefinitions.values()) {
91 definition.completeValidation(rootBusinessObjectClass, otherBusinessObjectClass,tracer);
92 }
93 }
94
95 }