| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| Configurable |
|
| 1.0;1 |
| 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.Map; | |
| 19 | ||
| 20 | /** | |
| 21 | * Marks any class that can be configured through the UIF dictionary | |
| 22 | * | |
| 23 | * <p> | |
| 24 | * Indicates behavior that must be supported by an Class that can be configured through | |
| 25 | * the UIF dictionary, such as property expressions. | |
| 26 | * </p> | |
| 27 | * | |
| 28 | * @author Kuali Rice Team (rice.collab@kuali.org) | |
| 29 | */ | |
| 30 | public interface Configurable { | |
| 31 | ||
| 32 | /** | |
| 33 | * Map of expressions that should be evaluated to conditionally set a property on the component | |
| 34 | * | |
| 35 | * <p> | |
| 36 | * When configuring a component property through XML an expression can be given using the @{} placeholder. During | |
| 37 | * the loading of the XML any such expressions are captured and placed into this Map, with the property they apply | |
| 38 | * to set as the Map key. The expressions are then evaluated during the apply model phase and the result is set as | |
| 39 | * the property value. | |
| 40 | * </p> | |
| 41 | * | |
| 42 | * <p> | |
| 43 | * Note after the expression is picked up, the property configuration is removed. Thus the property in the | |
| 44 | * component will only have its default object value until the expression is evaluated | |
| 45 | * </p> | |
| 46 | * | |
| 47 | * @return Map<String, String> map of expressions where key is property name and value is expression to evaluate | |
| 48 | */ | |
| 49 | public Map<String, String> getPropertyExpressions(); | |
| 50 | ||
| 51 | /** | |
| 52 | * Setter for the Map of property expressions | |
| 53 | * | |
| 54 | * @param propertyExpressions | |
| 55 | */ | |
| 56 | public void setPropertyExpressions(Map<String, String> propertyExpressions); | |
| 57 | ||
| 58 | /** | |
| 59 | * Returns the expression configured for the property with the given name | |
| 60 | * | |
| 61 | * @return String expression for property or null if expression is not configured | |
| 62 | * @see Component#getPropertyExpressions() | |
| 63 | */ | |
| 64 | public String getPropertyExpression(String propertyName); | |
| 65 | } |