1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krad.uif.modifier;
17
18 import org.kuali.rice.krad.datadictionary.parse.BeanTagAttribute;
19 import org.kuali.rice.krad.datadictionary.uif.UifDictionaryBeanBase;
20 import org.kuali.rice.krad.uif.UifConstants;
21 import org.kuali.rice.krad.uif.view.View;
22 import org.kuali.rice.krad.uif.component.Component;
23
24 import java.util.ArrayList;
25 import java.util.List;
26
27
28
29
30
31
32
33
34
35
36
37
38 public abstract class ComponentModifierBase extends UifDictionaryBeanBase implements ComponentModifier {
39 private static final long serialVersionUID = -8284332412469942130L;
40
41 private String runPhase;
42 private String runCondition;
43 private int order;
44
45 public ComponentModifierBase() {
46 super();
47
48 runPhase = UifConstants.ViewPhases.INITIALIZE;
49 order = 0;
50 }
51
52
53
54
55
56
57 @Override
58 public void performInitialization(View view, Object model, Component component) {
59
60 }
61
62
63
64
65 public List<Component> getComponentPrototypes() {
66 List<Component> components = new ArrayList<Component>();
67
68 return components;
69 }
70
71
72
73
74 @BeanTagAttribute(name="runPhase")
75 public String getRunPhase() {
76 return this.runPhase;
77 }
78
79
80
81
82
83
84 public void setRunPhase(String runPhase) {
85 this.runPhase = runPhase;
86 }
87
88
89
90
91 @BeanTagAttribute(name="runCondition")
92 public String getRunCondition() {
93 return this.runCondition;
94 }
95
96
97
98
99
100
101 public void setRunCondition(String runCondition) {
102 this.runCondition = runCondition;
103 }
104
105
106
107
108 @BeanTagAttribute(name="order")
109 public int getOrder() {
110 return this.order;
111 }
112
113
114
115
116 public void setOrder(int order) {
117 this.order = order;
118 }
119
120
121
122
123
124 protected <T> void copyProperties(T componentModifier) {
125 ComponentModifierBase componentModifierBase = (ComponentModifierBase) componentModifier;
126 componentModifierBase.setOrder(this.order);
127 componentModifierBase.setRunCondition(this.runCondition);
128 componentModifierBase.setRunPhase(this.runPhase);
129 }
130 }