Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client
11g Release 1 (11.1.1)

E17503-02

oracle.adfnmc.el.util
Class BeanResolver

java.lang.Object
  extended by oracle.adfnmc.el.util.BeanResolver
All Implemented Interfaces:
ELResolver, PropertyValueChangeSource, MethodDispatch, PropertyDispatch
Direct Known Subclasses:
CredentialsBean, MobileSyncBean

public abstract class BeanResolver
extends java.lang.Object
implements ELResolver, PropertyDispatch, PropertyValueChangeSource

Convenience class for managed beans to extend that adds management of listener registration and forwards down calls to MethodDispatch.invokeMethod(). Not to be confused with oracle.adfnmc.el.BeanELResolver, which resolves calls on classes that implement MethodDispatch, but is not the instance of the bean itself.


Field Summary
 
Fields inherited from interface oracle.adfnmc.el.ELResolver
RESOLVABLE_AT_DESIGN_TIME, TYPE
 
Constructor Summary
BeanResolver()
           
 
Method Summary
 void addValueChangeListener(java.lang.String property, ValueChangeListener listener)
           
 java.lang.Class getType(ELContext context, java.lang.Object base, java.lang.Object property)
          For a given base and property, attempts to identify the most general type that is acceptable for an object to be passed as the value parameter in a future call to the ELResolver.setValue(oracle.adfnmc.el.ELContext, java.lang.Object, java.lang.Object, java.lang.Object) method.
 java.lang.Class getType(java.lang.String property)
           
 java.lang.Object getValue(ELContext context, java.lang.Object base, java.lang.Object property)
          Attempts to resolve the given property object on the given base object.
 boolean isReadOnly(ELContext context, java.lang.Object base, java.lang.Object property)
          For a given base and property, attempts to determine whether a call to ELResolver.setValue(oracle.adfnmc.el.ELContext, java.lang.Object, java.lang.Object, java.lang.Object) will always fail.
protected  boolean notifyAfterSetValue(java.lang.String propertyName)
          Beans can override this method if they wish to disable the default behavior of firing notifications after setValue is called, per property
protected  void notifyValueChangeListeners(java.lang.String propertyName)
           
 void removeValueChangeListener(java.lang.String property, ValueChangeListener listener)
           
 void setValue(ELContext context, java.lang.Object base, java.lang.Object property, java.lang.Object value)
          Attempts to set the value of the given property object on the given base object.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface oracle.adfnmc.util.MethodDispatch
invokeMethod
 

Constructor Detail

BeanResolver

public BeanResolver()
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getType

public java.lang.Class getType(java.lang.String property)
Specified by:
getType in interface PropertyDispatch

getType

public java.lang.Class getType(ELContext context,
                               java.lang.Object base,
                               java.lang.Object property)
Description copied from interface: ELResolver
For a given base and property, attempts to identify the most general type that is acceptable for an object to be passed as the value parameter in a future call to the ELResolver.setValue(oracle.adfnmc.el.ELContext, java.lang.Object, java.lang.Object, java.lang.Object) method.

If this resolver handles the given (base, property) pair, the propertyResolved property of the ELContext object must be set to true by the resolver, before returning. If this property is not true after this method is called, the caller should ignore the return value.

This is not always the same as getValue().getClass(). For example, in the case of an ArrayELResolver, the getType method will return the element type of the array, which might be a superclass of the type of the actual element that is currently in the specified array element.

Specified by:
getType in interface ELResolver
Parameters:
context - The context of this evaluation.
base - The base object whose property value is to be analyzed, or null to analyze a top-level variable.
property - The property or variable to return the acceptable type for.
Returns:
If the propertyResolved property of ELContext was set to true, then the most general acceptable type; otherwise undefined.

getValue

public java.lang.Object getValue(ELContext context,
                                 java.lang.Object base,
                                 java.lang.Object property)
Description copied from interface: ELResolver
Attempts to resolve the given property object on the given base object.

If this resolver handles the given (base, property) pair, the propertyResolved property of the ELContext object must be set to true by the resolver, before returning. If this property is not true after this method is called, the caller should ignore the return value.

Specified by:
getValue in interface ELResolver
Parameters:
context - The context of this evaluation.
base - The base object whose property value is to be returned, or null to resolve a top-level variable.
property - The property or variable to be resolved.
Returns:
If the propertyResolved property of ELContext was set to true, then the result of the variable or property resolution; otherwise undefined.

isReadOnly

public boolean isReadOnly(ELContext context,
                          java.lang.Object base,
                          java.lang.Object property)
Description copied from interface: ELResolver
For a given base and property, attempts to determine whether a call to ELResolver.setValue(oracle.adfnmc.el.ELContext, java.lang.Object, java.lang.Object, java.lang.Object) will always fail.

If this resolver handles the given (base, property) pair, the propertyResolved property of the ELContext object must be set to true by the resolver, before returning. If this property is not true after this method is called, the caller should ignore the return value.

Specified by:
isReadOnly in interface ELResolver
Parameters:
context - The context of this evaluation.
base - The base object whose property value is to be analyzed, or null to analyze a top-level variable.
property - The property or variable to return the read-only status for.
Returns:
If the propertyResolved property of ELContext was set to true, then true if the property is read-only or false if not; otherwise undefined.

setValue

public void setValue(ELContext context,
                     java.lang.Object base,
                     java.lang.Object property,
                     java.lang.Object value)
Description copied from interface: ELResolver
Attempts to set the value of the given property object on the given base object.

If this resolver handles the given (base, property) pair, the propertyResolved property of the ELContext object must be set to true by the resolver, before returning. If this property is not true after this method is called, the caller can safely assume no value has been set.

Specified by:
setValue in interface ELResolver
Parameters:
context - The context of this evaluation.
base - The base object whose property value is to be set, or null to set a top-level variable.
property - The property or variable to be set.
value - The value to set the property or variable to.

addValueChangeListener

public void addValueChangeListener(java.lang.String property,
                                   ValueChangeListener listener)
Specified by:
addValueChangeListener in interface PropertyValueChangeSource
Parameters:
property - Interned property string

removeValueChangeListener

public void removeValueChangeListener(java.lang.String property,
                                      ValueChangeListener listener)
Specified by:
removeValueChangeListener in interface PropertyValueChangeSource
Parameters:
property - Interned property string

notifyAfterSetValue

protected boolean notifyAfterSetValue(java.lang.String propertyName)
Beans can override this method if they wish to disable the default behavior of firing notifications after setValue is called, per property


notifyValueChangeListeners

protected void notifyValueChangeListeners(java.lang.String propertyName)

Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client
11g Release 1 (11.1.1)

E17503-02

Copyright © 2011, Oracle and/or its affiliates. All rights reserved.