Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
ComponentModifierBase |
|
| 1.0;1 |
1 | /* | |
2 | * Copyright 2011 The Kuali Foundation | |
3 | * | |
4 | * Licensed under the Educational Community License, Version 1.0 (the "License"); | |
5 | * you may not use this file except in compliance with the License. | |
6 | * You may obtain a copy of the License at | |
7 | * | |
8 | * http://www.opensource.org/licenses/ecl1.php | |
9 | * | |
10 | * Unless required by applicable law or agreed to in writing, software | |
11 | * distributed under the License is distributed on an "AS IS" BASIS, | |
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
13 | * See the License for the specific language governing permissions and | |
14 | * limitations under the License. | |
15 | */ | |
16 | package org.kuali.rice.kns.uif.modifier; | |
17 | ||
18 | import org.kuali.rice.kns.uif.UifConstants; | |
19 | ||
20 | /** | |
21 | * Base class for <code>ComponentModifier</code> implementations | |
22 | * | |
23 | * <p> | |
24 | * Holds run phase property and defaults to the INITIALIZE phase, and the order | |
25 | * property for setting the order in which the component modifier will be | |
26 | * invoked | |
27 | * </p> | |
28 | * | |
29 | * @author Kuali Rice Team (rice.collab@kuali.org) | |
30 | */ | |
31 | public abstract class ComponentModifierBase implements ComponentModifier { | |
32 | private static final long serialVersionUID = -8284332412469942130L; | |
33 | ||
34 | private String runPhase; | |
35 | private String runCondition; | |
36 | private int order; | |
37 | ||
38 | 0 | public ComponentModifierBase() { |
39 | 0 | runPhase = UifConstants.ViewPhases.INITIALIZE; |
40 | 0 | order = 0; |
41 | 0 | } |
42 | ||
43 | /** | |
44 | * @see org.kuali.rice.kns.uif.modifier.ComponentModifier#getRunPhase() | |
45 | */ | |
46 | public String getRunPhase() { | |
47 | 0 | return this.runPhase; |
48 | } | |
49 | ||
50 | /** | |
51 | * Setter for the component initializer run phase | |
52 | * | |
53 | * @param runPhase | |
54 | */ | |
55 | public void setRunPhase(String runPhase) { | |
56 | 0 | this.runPhase = runPhase; |
57 | 0 | } |
58 | ||
59 | /** | |
60 | * @see org.kuali.rice.kns.uif.modifier.ComponentModifier#getRunCondition() | |
61 | */ | |
62 | public String getRunCondition() { | |
63 | 0 | return this.runCondition; |
64 | } | |
65 | ||
66 | /** | |
67 | * Setter for the component modifiers run condition | |
68 | * | |
69 | * @param runCondition | |
70 | */ | |
71 | public void setRunCondition(String runCondition) { | |
72 | 0 | this.runCondition = runCondition; |
73 | 0 | } |
74 | ||
75 | /** | |
76 | * @see org.springframework.core.Ordered#getOrder() | |
77 | */ | |
78 | public int getOrder() { | |
79 | 0 | return this.order; |
80 | } | |
81 | ||
82 | /** | |
83 | * @see org.kuali.rice.kns.uif.core.Ordered#setOrder(int) | |
84 | */ | |
85 | public void setOrder(int order) { | |
86 | 0 | this.order = order; |
87 | 0 | } |
88 | ||
89 | } |