Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
ConfigurableBase |
|
| 1.5;1.5 |
1 | /** | |
2 | * Copyright 2005-2011 The Kuali Foundation | |
3 | * | |
4 | * Licensed under the Educational Community License, Version 2.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/ecl2.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.krad.uif.component; | |
17 | ||
18 | import java.util.HashMap; | |
19 | import java.util.Map; | |
20 | ||
21 | /** | |
22 | * Implementation of <code>Configurable</code> that contains a Map<String, String> for holding | |
23 | * property expressions | |
24 | * | |
25 | * <p> | |
26 | * Should be extended by other UIF classes (such as <code>Component</code> or <code>LayoutManager</code>) to | |
27 | * provide property expression support | |
28 | * </p> | |
29 | * | |
30 | * @author Kuali Rice Team (rice.collab@kuali.org) | |
31 | */ | |
32 | public abstract class ConfigurableBase implements Configurable { | |
33 | private Map<String, String> propertyExpressions; | |
34 | ||
35 | 0 | public ConfigurableBase() { |
36 | 0 | propertyExpressions = new HashMap<String, String>(); |
37 | 0 | } |
38 | ||
39 | /** | |
40 | * @see org.kuali.rice.krad.uif.component.ConfigurableBase#getPropertyExpressions | |
41 | */ | |
42 | public Map<String, String> getPropertyExpressions() { | |
43 | 0 | return propertyExpressions; |
44 | } | |
45 | ||
46 | /** | |
47 | * @see org.kuali.rice.krad.uif.component.ConfigurableBase#setPropertyExpressions | |
48 | */ | |
49 | public void setPropertyExpressions(Map<String, String> propertyExpressions) { | |
50 | 0 | this.propertyExpressions = propertyExpressions; |
51 | 0 | } |
52 | ||
53 | /** | |
54 | * @see org.kuali.rice.krad.uif.component.ConfigurableBase#getPropertyExpression | |
55 | */ | |
56 | public String getPropertyExpression(String propertyName) { | |
57 | 0 | if (this.propertyExpressions.containsKey(propertyName)) { |
58 | 0 | return this.propertyExpressions.get(propertyName); |
59 | } | |
60 | ||
61 | 0 | return null; |
62 | } | |
63 | } |