Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.struts.faces.application
Class PropertyResolverImpl  view PropertyResolverImpl download PropertyResolverImpl.java

java.lang.Object
  extended byjavax.faces.el.PropertyResolver
      extended byorg.apache.struts.faces.application.PropertyResolverImpl

public class PropertyResolverImpl
extends javax.faces.el.PropertyResolver

Custom PropertyResolver implementation that adds support for DynaBean property access to the facilities of the default PropertyResolver provided by JavaServer Faces.

This class implements the following specific rules:

Version:
$Rev: 54934 $ $Date: 2004-10-16 18:07:50 +0100 (Sat, 16 Oct 2004) $

Field Summary
private static org.apache.commons.logging.Log log
          The Log instance for this class.
private  javax.faces.el.PropertyResolver resolver
          The PropertyResolver instance that we are wrapping, which will be used to perform operations on beans that are not recognized by this class.
 
Constructor Summary
PropertyResolverImpl(javax.faces.el.PropertyResolver resolver)
          Construct a new PropertyResolver instance, wrapping the specified instance using the Decorator pattern such that this class need implement only the new functionality it supports, and not need to re-implement the basic facilities.
 
Method Summary
private  org.apache.commons.beanutils.DynaProperty getDynaProperty(org.apache.commons.beanutils.DynaBean bean, java.lang.String name)
          Return the DynaProperty describing the specified property of the specified DynaBean, or null if there is no such property defined on the underlying DynaClass.
 java.lang.Class getType(java.lang.Object base, int index)
          Return the java.lang.Class representing the type of value at the specified index of the specified base object, or null if this value is null.
 java.lang.Class getType(java.lang.Object base, java.lang.Object name)
          Return the java.lang.Class representing the type of the specified property of the specified base object, if it can be determined; otherwise return null.
 java.lang.Object getValue(java.lang.Object base, int index)
          Return the value at the specified index of the specified base object.
 java.lang.Object getValue(java.lang.Object base, java.lang.Object name)
          Return the value of the property with the specified name from the specified base object.
 boolean isReadOnly(java.lang.Object base, int index)
          Return true if the value at the specified index of the specified base object is known to be immutable; otherwise, return false.
 boolean isReadOnly(java.lang.Object base, java.lang.Object name)
          Return true if the specified property of the specified base object is known to be immutable; otherwise, return false.
 void setValue(java.lang.Object base, int index, java.lang.Object value)
          Set the value at the specified index of the specified base object.
 void setValue(java.lang.Object base, java.lang.Object name, java.lang.Object value)
          Set the specified value of the property with the specified name on the specified base object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static final org.apache.commons.logging.Log log

The Log instance for this class.


resolver

private javax.faces.el.PropertyResolver resolver

The PropertyResolver instance that we are wrapping, which will be used to perform operations on beans that are not recognized by this class.

Constructor Detail

PropertyResolverImpl

public PropertyResolverImpl(javax.faces.el.PropertyResolver resolver)

Construct a new PropertyResolver instance, wrapping the specified instance using the Decorator pattern such that this class need implement only the new functionality it supports, and not need to re-implement the basic facilities.

Method Detail

getValue

public java.lang.Object getValue(java.lang.Object base,
                                 java.lang.Object name)
                          throws javax.faces.el.PropertyNotFoundException

Return the value of the property with the specified name from the specified base object.


getValue

public java.lang.Object getValue(java.lang.Object base,
                                 int index)
                          throws javax.faces.el.PropertyNotFoundException

Return the value at the specified index of the specified base object.


setValue

public void setValue(java.lang.Object base,
                     java.lang.Object name,
                     java.lang.Object value)
              throws javax.faces.el.PropertyNotFoundException

Set the specified value of the property with the specified name on the specified base object.


setValue

public void setValue(java.lang.Object base,
                     int index,
                     java.lang.Object value)
              throws javax.faces.el.PropertyNotFoundException

Set the value at the specified index of the specified base object.


isReadOnly

public boolean isReadOnly(java.lang.Object base,
                          java.lang.Object name)
                   throws javax.faces.el.PropertyNotFoundException

Return true if the specified property of the specified base object is known to be immutable; otherwise, return false.


isReadOnly

public boolean isReadOnly(java.lang.Object base,
                          int index)
                   throws javax.faces.el.PropertyNotFoundException

Return true if the value at the specified index of the specified base object is known to be immutable; otherwise, return false.


getType

public java.lang.Class getType(java.lang.Object base,
                               java.lang.Object name)
                        throws javax.faces.el.PropertyNotFoundException

Return the java.lang.Class representing the type of the specified property of the specified base object, if it can be determined; otherwise return null.


getType

public java.lang.Class getType(java.lang.Object base,
                               int index)
                        throws javax.faces.el.PropertyNotFoundException

Return the java.lang.Class representing the type of value at the specified index of the specified base object, or null if this value is null.


getDynaProperty

private org.apache.commons.beanutils.DynaProperty getDynaProperty(org.apache.commons.beanutils.DynaBean bean,
                                                                  java.lang.String name)
                                                           throws javax.faces.el.PropertyNotFoundException

Return the DynaProperty describing the specified property of the specified DynaBean, or null if there is no such property defined on the underlying DynaClass.