javax.faces.el
Class PropertyResolver

java.lang.Object
  extended by javax.faces.el.PropertyResolver

Deprecated.

public abstract class PropertyResolver
extends Object

Provides methods to read, write and inspect properties of javabeans, Maps, Arrays and Lists. This class is used by such things as the ValueBinding implementation and the ManagedBeanBuilder to access JSF beans. See the javadoc of the JSF Specification for more details.

Version:
$Revision: 1187701 $ $Date: 2011-10-22 07:21:54 -0500 (Sat, 22 Oct 2011) $
Author:
Thomas Spiegl (latest modification by $Author: bommel $)

Constructor Summary
PropertyResolver()
          Deprecated.  
 
Method Summary
abstract  Class getType(Object base, int index)
          Deprecated.  
abstract  Class getType(Object base, Object property)
          Deprecated.  
abstract  Object getValue(Object base, int index)
          Deprecated.  
abstract  Object getValue(Object base, Object property)
          Deprecated.  
abstract  boolean isReadOnly(Object base, int index)
          Deprecated.  
abstract  boolean isReadOnly(Object base, Object property)
          Deprecated.  
abstract  void setValue(Object base, int index, Object value)
          Deprecated.  
abstract  void setValue(Object base, Object property, Object value)
          Deprecated.  
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyResolver

public PropertyResolver()
Deprecated. 

Method Detail

getType

public abstract Class getType(Object base,
                              int index)
                       throws EvaluationException,
                              PropertyNotFoundException
Deprecated. 

Returns the datatype of the specified element within a list or array.

Param base must be of type Array or List.

Throws:
EvaluationException
PropertyNotFoundException

getType

public abstract Class getType(Object base,
                              Object property)
                       throws EvaluationException,
                              PropertyNotFoundException
Deprecated. 

Returns the datatype of the specified javabean property on the specified object.

Param base may be a map, in which case param property is used as a key into the map, and the type of the object with that key is returned. If there is no such key in the map, then Object.class is returned.

Otherwise java.beans.Introspector is used to determine the actual property type. If the base bean has no such property then a PropertyNotFoundException is thrown.

Parameters:
base - must not be null.
property - must be of type String, must not be null and must not be an empty string.
Throws:
EvaluationException
PropertyNotFoundException

getValue

public abstract Object getValue(Object base,
                                int index)
                         throws EvaluationException,
                                PropertyNotFoundException
Deprecated. 

Return the specified element from a list or array.

Param base must be of type Array or List. When the array is of a primitive type, the appropriate wrapper is returned.

Null is returned when param index is "out of bounds" for the provided base object.

Throws:
ReferenceSyntaxException - if the base object is not an Array or List.
EvaluationException
PropertyNotFoundException

getValue

public abstract Object getValue(Object base,
                                Object property)
                         throws EvaluationException,
                                PropertyNotFoundException
Deprecated. 

Return the current value of the specified property on the base object.

If base is a Map, then Map.get(property) is returned. Null is returned if there is no entry with that key.

Otherwise, java.beans.Introspector is applied to the base object to find the associated PropertyDescriptor and the specified read method is invoked.

Throws:
PropertyNotFoundException - if the provided object does not have the specified property.
EvaluationException

isReadOnly

public abstract boolean isReadOnly(Object base,
                                   int index)
                            throws EvaluationException,
                                   PropertyNotFoundException
Deprecated. 

Throws:
EvaluationException
PropertyNotFoundException

isReadOnly

public abstract boolean isReadOnly(Object base,
                                   Object property)
                            throws EvaluationException,
                                   PropertyNotFoundException
Deprecated. 

Throws:
EvaluationException
PropertyNotFoundException

setValue

public abstract void setValue(Object base,
                              int index,
                              Object value)
                       throws EvaluationException,
                              PropertyNotFoundException
Deprecated. 

Replace the object at the specified index within the base collection with the provided value.

Param base is expected to be an Array or List object.

Throws:
EvaluationException - if the base object is not an Array or List.
PropertyNotFoundException - if the index is "out of bounds".

setValue

public abstract void setValue(Object base,
                              Object property,
                              Object value)
                       throws EvaluationException,
                              PropertyNotFoundException
Deprecated. 

Set the named property on the base object to the provided value.

Throws:
EvaluationException
PropertyNotFoundException


Copyright © 2014 The Apache Software Foundation. All Rights Reserved.