org.apache.shale.test.el
Class FacesVariableResolverChainWrapper

java.lang.Object
  extended by javax.el.ELResolver
      extended by org.apache.shale.test.el.FacesVariableResolverChainWrapper

public class FacesVariableResolverChainWrapper
extends javax.el.ELResolver

ELResolver implementation that wraps the legacy (JSF 1.1) VariableResolver chain. See the JSF 1.2 Specification, section 5.6.1.5, for requirements implemented by this class.

Since:
1.0.4

Field Summary
 
Fields inherited from class javax.el.ELResolver
RESOLVABLE_AT_DESIGN_TIME, TYPE
 
Constructor Summary
FacesVariableResolverChainWrapper()
           
 
Method Summary
protected  FeatureDescriptor descriptor(String name, String displayName, String description, boolean expert, boolean hidden, boolean preferred, Object type, boolean designTime)
          Create and return a FeatureDescriptor configured with the specified arguments.
 Class getCommonPropertyType(javax.el.ELContext context, Object base)
          Return the most general type this resolver accepts for the property argument.
 Iterator getFeatureDescriptors(javax.el.ELContext context, Object base)
          Return an Iterator over the attributes that this resolver knows how to deal with.
 Class getType(javax.el.ELContext context, Object base, Object property)
          Return the Java type of the specified property.
 Object getValue(javax.el.ELContext context, Object base, Object property)
          Evaluate with the legacy variable resolver chain and return the value.
 boolean isReadOnly(javax.el.ELContext context, Object base, Object property)
          Return true if the specified property is read only.
 void setValue(javax.el.ELContext context, Object base, Object property, Object value)
          Set the value of a scoped object for the specified name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FacesVariableResolverChainWrapper

public FacesVariableResolverChainWrapper()
Method Detail

getCommonPropertyType

public Class getCommonPropertyType(javax.el.ELContext context,
                                   Object base)

Return the most general type this resolver accepts for the property argument.

Specified by:
getCommonPropertyType in class javax.el.ELResolver

getFeatureDescriptors

public Iterator getFeatureDescriptors(javax.el.ELContext context,
                                      Object base)

Return an Iterator over the attributes that this resolver knows how to deal with.

Specified by:
getFeatureDescriptors in class javax.el.ELResolver
Parameters:
context - ELContext for evaluating this value
base - Base object against which this evaluation occurs

getType

public Class getType(javax.el.ELContext context,
                     Object base,
                     Object property)

Return the Java type of the specified property.

Specified by:
getType in class javax.el.ELResolver
Parameters:
context - ELContext for evaluating this value
base - Base object against which this evaluation occurs (must be null because we are evaluating a top level variable)
property - Property name to be accessed

getValue

public Object getValue(javax.el.ELContext context,
                       Object base,
                       Object property)

Evaluate with the legacy variable resolver chain and return the value.

Specified by:
getValue in class javax.el.ELResolver
Parameters:
context - ELContext for evaluating this value
base - Base object against which this evaluation occurs (must be null because we are evaluating a top level variable)
property - Property name to be accessed

isReadOnly

public boolean isReadOnly(javax.el.ELContext context,
                          Object base,
                          Object property)

Return true if the specified property is read only.

Specified by:
isReadOnly in class javax.el.ELResolver
Parameters:
context - ELContext for evaluating this value
base - Base object against which this evaluation occurs (must be null because we are evaluating a top level variable)
property - Property name to be accessed

setValue

public void setValue(javax.el.ELContext context,
                     Object base,
                     Object property,
                     Object value)

Set the value of a scoped object for the specified name.

Specified by:
setValue in class javax.el.ELResolver
Parameters:
context - ELContext for evaluating this value
base - Base object against which this evaluation occurs (must be null because we are evaluating a top level variable)
property - Property name to be accessed
value - New value to be set

descriptor

protected FeatureDescriptor descriptor(String name,
                                       String displayName,
                                       String description,
                                       boolean expert,
                                       boolean hidden,
                                       boolean preferred,
                                       Object type,
                                       boolean designTime)

Create and return a FeatureDescriptor configured with the specified arguments.

Parameters:
name - Feature name
displayName - Display name
description - Short description
expert - Flag indicating this feature is for experts
hidden - Flag indicating this feature should be hidden
preferred - Flag indicating this feature is the preferred one among features of the same type
type - Runtime type of this feature
designTime - Flag indicating feature is resolvable at design time


Copyright © 2004-2007 Apache Software Foundation. All Rights Reserved.