org.kuali.rice.krad.uif.component
Class ConfigurableBase

java.lang.Object
  extended by org.kuali.rice.krad.uif.component.ConfigurableBase
All Implemented Interfaces:
Configurable
Direct Known Subclasses:
BindingInfo, ComparableInfo, ComponentBase, ComponentModifierBase, ComponentSecurity, HistoryEntry, LayoutManagerBase, NodePrototype, PropertyReplacer, ViewTheme

public abstract class ConfigurableBase
extends Object
implements Configurable

Implementation of Configurable that contains a Map of initally configured expressions and a Map of expressions that need to be evaluated

Should be extended by other UIF classes (such as Component or LayoutManager) to provide property expression support

Author:
Kuali Rice Team (rice.collab@kuali.org)

Constructor Summary
ConfigurableBase()
           
 
Method Summary
 Map<String,String> getExpressionGraph()
          Map of expressions that were configured for the object's graph
 String getPropertyExpression(String propertyName)
          Returns the expression configured for the property with the given name
 Map<String,String> getPropertyExpressions()
          Map of expressions that should be evaluated to conditionally set a property on the component
 Map<String,String> getRefreshExpressionGraph()
          Map of expressions that should apply when the component is refresh
 void setExpressionGraph(Map<String,String> expressionGraph)
          Setter for the map of expressions contained on the configurable graph
 void setPropertyExpressions(Map<String,String> propertyExpressions)
          Setter for the Map of property expressions
 void setRefreshExpressionGraph(Map<String,String> refreshExpressionGraph)
          Setter for the component's refresh expression graph
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigurableBase

public ConfigurableBase()
Method Detail

getExpressionGraph

public Map<String,String> getExpressionGraph()
Description copied from interface: Configurable
Map of expressions that were configured for the object's graph

During processing of the UIF configuration, expressions are pulled out and placed into this map for the component graph. A component graph contains the component and all one to one nested components (but not those that are contained in collections, each of these begins another graph). The expressions are placed at the root component level instead of the actual nested component for handling of nested property configuration and overridding

The expression graph map key gives the property name (possibly nested) the expression was configured on, and the map value gives the expression. During the view lifecycle, see ViewHelperServiceImpl.performComponentApplyModel(org.kuali.rice.krad.uif.view.View, org.kuali.rice.krad.uif.component.Component, java.lang.Object), the expressions are moved to the Configurable.getPropertyExpressions() map for the configurable they should be evaluated on

Specified by:
getExpressionGraph in interface Configurable
Returns:
Map map of expressions contained on the configurable graph
See Also:
Configurable.getExpressionGraph()

setExpressionGraph

public void setExpressionGraph(Map<String,String> expressionGraph)
Description copied from interface: Configurable
Setter for the map of expressions contained on the configurable graph

Specified by:
setExpressionGraph in interface Configurable
See Also:
Configurable#setExpressionGraph(java.util.Map)

getRefreshExpressionGraph

public Map<String,String> getRefreshExpressionGraph()
Description copied from interface: Configurable
Map of expressions that should apply when the component is refresh

Expressions may exist on a parent component that impact the component state when it is being refreshed. These expressions are pulled out and placed into this map for evaluation during the refresh process

Specified by:
getRefreshExpressionGraph in interface Configurable
Returns:
Map key is property name to set and value is the expression to evaluate

setRefreshExpressionGraph

public void setRefreshExpressionGraph(Map<String,String> refreshExpressionGraph)
Description copied from interface: Configurable
Setter for the component's refresh expression graph

Specified by:
setRefreshExpressionGraph in interface Configurable

getPropertyExpressions

public Map<String,String> getPropertyExpressions()
Description copied from interface: Configurable
Map of expressions that should be evaluated to conditionally set a property on the component

When configuring a component property through XML an expression can be given using the @{} placeholder. During the loading of the XML any such expressions are captured and placed into this Map, with the property they apply to set as the Map key. The expressions are then evaluated during the apply model phase and the result is set as the property value.

Note after the expression is picked up, the property configuration is removed. Thus the property in the component will only have its default object value until the expression is evaluated

Specified by:
getPropertyExpressions in interface Configurable
Returns:
Map map of expressions where key is property name and value is expression to evaluate
See Also:
getPropertyExpressions()

setPropertyExpressions

public void setPropertyExpressions(Map<String,String> propertyExpressions)
Description copied from interface: Configurable
Setter for the Map of property expressions

Specified by:
setPropertyExpressions in interface Configurable
See Also:
setPropertyExpressions(java.util.Map)

getPropertyExpression

public String getPropertyExpression(String propertyName)
Description copied from interface: Configurable
Returns the expression configured for the property with the given name

Specified by:
getPropertyExpression in interface Configurable
Returns:
String expression for property or null if expression is not configured
See Also:
getPropertyExpression(java.lang.String)


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.