oracle.adf.view.faces.bean
Interface FacesBean

All Known Subinterfaces:
UIXFacesBean
All Known Implementing Classes:
FacesBeanImpl

public interface FacesBean

Base interface for FacesBean storage.


Nested Class Summary
static class FacesBean.Type
           
 
Method Summary
 void addAll(FacesBean from)
          Copies all properties, bindings, and list entries from one bean to another.
 void addEntry(PropertyKey listKey, java.lang.Object value)
          Add an entry to a list.
 java.util.Set bindingKeySet()
          Returns a Set of all PropertyKeys that have ValueBindings attached.
 java.util.Iterator entries(PropertyKey listKey)
          Returns an iterator over all entries at this key.
 java.lang.Object[] getEntries(PropertyKey listKey, java.lang.Class clazz)
          Return as an array all elements of this key that are instances of the specified class.
 java.lang.Object getLocalProperty(PropertyKey key)
          Return a property, ignoring any value bindings.
 java.lang.Object getProperty(PropertyKey key)
          Returns a property.
 FacesBean.Type getType()
          Returns the Type of this bean.
 javax.faces.el.ValueBinding getValueBinding(PropertyKey key)
          Return the value binding for a key.
 java.util.Set keySet()
          Returns a Set of all PropertyKeys that have either lists or values attached.
 void removeEntry(PropertyKey listKey, java.lang.Object value)
          Remove an entry from a list.
 void restoreState(javax.faces.context.FacesContext context, java.lang.Object state)
          Restores the state of a FacesBean.
 java.lang.Object saveState(javax.faces.context.FacesContext context)
          Saves the state of a FacesBean.
 void setProperty(PropertyKey key, java.lang.Object value)
          Set a property.
 void setValueBinding(PropertyKey key, javax.faces.el.ValueBinding binding)
          Set the value binding for a key.
 

Method Detail

getType

public FacesBean.Type getType()
Returns the Type of this bean.


getProperty

public java.lang.Object getProperty(PropertyKey key)
Returns a property. If the property has not been explicitly set, and the key supports bindings, and a ValueBinding has been set for this key, that ValueBinding will be evaluated.

Parameters:
key - the property key
Throws:
java.lang.IllegalArgumentException - if key is a list key

setProperty

public void setProperty(PropertyKey key,
                        java.lang.Object value)
Set a property.

Throws:
java.lang.IllegalArgumentException - if key is a list key

getLocalProperty

public java.lang.Object getLocalProperty(PropertyKey key)
Return a property, ignoring any value bindings.

Throws:
java.lang.IllegalArgumentException - if key is a list key

getValueBinding

public javax.faces.el.ValueBinding getValueBinding(PropertyKey key)
Return the value binding for a key.

Throws:
java.lang.IllegalArgumentException - if the property does not support value bindings.

setValueBinding

public void setValueBinding(PropertyKey key,
                            javax.faces.el.ValueBinding binding)
Set the value binding for a key.

Throws:
java.lang.IllegalArgumentException - if the property does not support value bindings.

addEntry

public void addEntry(PropertyKey listKey,
                     java.lang.Object value)
Add an entry to a list. The same value may be added repeatedly; null is also a legal value. (Consumers of this API can apply more stringent rules to specific keys in cover functions.)

Throws:
java.lang.IllegalArgumentException - if the key is not a list key.

removeEntry

public void removeEntry(PropertyKey listKey,
                        java.lang.Object value)
Remove an entry from a list.

Throws:
java.lang.IllegalArgumentException - if the key is not a list key.

getEntries

public java.lang.Object[] getEntries(PropertyKey listKey,
                                     java.lang.Class clazz)
Return as an array all elements of this key that are instances of the specified class.

Returns:
an array whose instance type is the class
Throws:
java.lang.IllegalArgumentException - if the key is not a list key.

entries

public java.util.Iterator entries(PropertyKey listKey)
Returns an iterator over all entries at this key.

Throws:
java.lang.IllegalArgumentException - if the key is not a list key.

addAll

public void addAll(FacesBean from)
Copies all properties, bindings, and list entries from one bean to another. If the beans are of different types, properties will be copied by name. Incompatible properties will be ignored; specifically, properties that are lists on only one of the beans or ValueBindings on the original bean that are not allowed on the target bean.


keySet

public java.util.Set keySet()
Returns a Set of all PropertyKeys that have either lists or values attached.


bindingKeySet

public java.util.Set bindingKeySet()
Returns a Set of all PropertyKeys that have ValueBindings attached.


saveState

public java.lang.Object saveState(javax.faces.context.FacesContext context)
Saves the state of a FacesBean.


restoreState

public void restoreState(javax.faces.context.FacesContext context,
                         java.lang.Object state)
Restores the state of a FacesBean.



Copyright © 2003-2004 Oracle Corporation. All Rights Reserved.