javax.faces.el
Class PropertyResolver

java.lang.Object
  extended byjavax.faces.el.PropertyResolver

public abstract class PropertyResolver
extends java.lang.Object

PropertyResolver represents a pluggable mechanism for accessing a "property" of an underlying Java object instance. Different PropertyResolver implementations can support property resolution on instances of different Java classes (such as introspection-based access to properties of a JavaBean, or get() and put() calls on a java.util.Map instance).


Constructor Summary
PropertyResolver()
           
 
Method Summary
abstract  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.
abstract  java.lang.Class getType(java.lang.Object base, java.lang.String 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.
abstract  java.lang.Object getValue(java.lang.Object base, int index)
          Return the value at the specified index of the specified base object.
abstract  java.lang.Object getValue(java.lang.Object base, java.lang.String name)
          Return the value of the property with the specified name from the specified base object.
abstract  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.
abstract  boolean isReadOnly(java.lang.Object base, java.lang.String name)
          Return true if the specified property of the specified base object is known to be immutable; otherwise, return false.
abstract  void setValue(java.lang.Object base, int index, java.lang.Object value)
          Set the value at the specified index of the specified base object.
abstract  void setValue(java.lang.Object base, java.lang.String 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
 

Constructor Detail

PropertyResolver

public PropertyResolver()
Method Detail

getValue

public abstract java.lang.Object getValue(java.lang.Object base,
                                          java.lang.String name)
                                   throws PropertyNotFoundException

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

Parameters:
base - The base object whose property value is to be returned
name - Name of the property to be returned
Throws:
java.lang.NullPointerException - if base or name is null
PropertyNotFoundException - if the specified property name does not exist, or is not readable

getValue

public abstract java.lang.Object getValue(java.lang.Object base,
                                          int index)
                                   throws PropertyNotFoundException

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

Parameters:
base - The base object whose property value is to be returned
index - Index of the value to return
Throws:
java.lang.IndexOutOfBoundsException - if thrown by the underlying access to the base object
java.lang.NullPointerException - if base is null
PropertyNotFoundException - if some other exception occurs

setValue

public abstract void setValue(java.lang.Object base,
                              java.lang.String name,
                              java.lang.Object value)
                       throws PropertyNotFoundException

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

Parameters:
base - The base object whose property value is to be set
name - Name of the property to be set
value - Value of the property to be set
Throws:
java.lang.NullPointerException - if base or name is null
PropertyNotFoundException - if the specified property name does not exist, or is not writeable

setValue

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

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

Parameters:
base - The base object whose property value is to be set
index - Index of the value to set
value - Value to be set
Throws:
java.lang.IndexOutOfBoundsException - if thrown by the underlying access to the base object
java.lang.NullPointerException - if base is null
PropertyNotFoundException - if some other exception occurs

isReadOnly

public abstract boolean isReadOnly(java.lang.Object base,
                                   java.lang.String name)
                            throws PropertyNotFoundException

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

Parameters:
base - The base object whose property is to analyzed
name - Name of the property to be analyzed
Throws:
java.lang.NullPointerException - if base or name is null
PropertyNotFoundException - if the specified property name does not exist

isReadOnly

public abstract boolean isReadOnly(java.lang.Object base,
                                   int index)
                            throws PropertyNotFoundException

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

Parameters:
base - The base object whose property is to analyzed
index - Index of the value whose type is to be returned
Throws:
java.lang.IndexOutOfBoundsException - if thrown by the underlying accessed to the indexed property
java.lang.NullPointerException - if base is null
PropertyNotFoundException - if some other exception occurs

getType

public abstract java.lang.Class getType(java.lang.Object base,
                                        java.lang.String name)
                                 throws 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.

Parameters:
base - The base object whose property is to analyzed
name - Name of the property to be analyzed
Throws:
java.lang.NullPointerException - if base or name is null
PropertyNotFoundException - if the specified property name does not exist

getType

public abstract java.lang.Class getType(java.lang.Object base,
                                        int index)
                                 throws 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.

Parameters:
base - The base object whose property is to analyzed
index - Index of the value whose type is to be returned
Throws:
java.lang.IndexOutOfBoundsException - if thrown by the underlying accessed to the indexed property
java.lang.NullPointerException - if base is null
PropertyNotFoundException - if some other exception occurs