org.apache.tiles.el
Class TilesContextBeanELResolver

java.lang.Object
  extended by ELResolver
      extended by org.apache.tiles.el.TilesContextBeanELResolver
Direct Known Subclasses:
TilesContextBeanELResolver

public class TilesContextBeanELResolver
extends ELResolver

Resolves beans in request, session and application scope.

Since:
2.2.1
Version:
$Rev: 816924 $ $Date: 2009-09-19 15:45:40 +0200 (sab, 19 set 2009) $

Constructor Summary
TilesContextBeanELResolver()
           
 
Method Summary
protected  void collectBeanInfo(java.util.Map<java.lang.String,? extends java.lang.Object> map, java.util.List<java.beans.FeatureDescriptor> list)
          Collects bean infos from a map's values and filling a list.
protected  java.lang.Object findObjectByProperty(ELContext context, java.lang.Object property)
          Finds an object in request, session or application scope, in this order.
 java.lang.Class<?> getCommonPropertyType(ELContext context, java.lang.Object base)
          
 java.util.Iterator<java.beans.FeatureDescriptor> getFeatureDescriptors(ELContext context, java.lang.Object base)
          
protected  java.lang.Object getObject(java.util.Map<java.lang.String,? extends java.lang.Object> map, java.lang.String property)
          Returns an object from a map in a null-safe manner.
 java.lang.Class<?> getType(ELContext context, java.lang.Object base, java.lang.Object property)
          
 java.lang.Object getValue(ELContext context, java.lang.Object base, java.lang.Object property)
          
 boolean isReadOnly(ELContext context, java.lang.Object base, java.lang.Object property)
          
 void setValue(ELContext context, java.lang.Object base, java.lang.Object property, java.lang.Object value)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TilesContextBeanELResolver

public TilesContextBeanELResolver()
Method Detail

getCommonPropertyType

public java.lang.Class<?> getCommonPropertyType(ELContext context,
                                                java.lang.Object base)


getFeatureDescriptors

public java.util.Iterator<java.beans.FeatureDescriptor> getFeatureDescriptors(ELContext context,
                                                                              java.lang.Object base)


getType

public java.lang.Class<?> getType(ELContext context,
                                  java.lang.Object base,
                                  java.lang.Object property)


getValue

public java.lang.Object getValue(ELContext context,
                                 java.lang.Object base,
                                 java.lang.Object property)


isReadOnly

public boolean isReadOnly(ELContext context,
                          java.lang.Object base,
                          java.lang.Object property)


setValue

public void setValue(ELContext context,
                     java.lang.Object base,
                     java.lang.Object property,
                     java.lang.Object value)


collectBeanInfo

protected void collectBeanInfo(java.util.Map<java.lang.String,? extends java.lang.Object> map,
                               java.util.List<java.beans.FeatureDescriptor> list)
Collects bean infos from a map's values and filling a list.

Parameters:
map - The map containing the bean to be inspected.
list - The list to fill.
Since:
2.2.1

findObjectByProperty

protected java.lang.Object findObjectByProperty(ELContext context,
                                                java.lang.Object property)
Finds an object in request, session or application scope, in this order.

Parameters:
context - The context to use.
property - The property used as an attribute name.
Returns:
The found bean, if it exists, or null otherwise.
Since:
2.2.1

getObject

protected java.lang.Object getObject(java.util.Map<java.lang.String,? extends java.lang.Object> map,
                                     java.lang.String property)
Returns an object from a map in a null-safe manner.

Parameters:
map - The map to use.
property - The property to use as a key.
Returns:
The object, if present, or null otherwise.
Since:
2.2.1