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

E17503-02

oracle.adfnmc.bindings.dbf
Class ControlBindingImpl

java.lang.Object
  extended by oracle.adfnmc.bindings.dbf.ControlBindingImpl
All Implemented Interfaces:
ControlBinding, ELResolver
Direct Known Subclasses:
AttributeBindingImpl, IteratorExecutableBindingImpl, OperationBindingBase, RangeBindingImpl

public abstract class ControlBindingImpl
extends java.lang.Object
implements ControlBinding, ELResolver


Field Summary
static java.lang.Class CLASS_INSTANCE
           
protected  java.lang.Exception currentError
           
protected  DataControl dataControl
           
protected  List errors
           
protected  IteratorExecutableBindingImpl iterBinding
           
protected  XmlAnyDefinition metadataDef
           
protected  java.lang.String name
           
protected  BindingContainer parentBindingContainer
           
 
Fields inherited from interface oracle.adfnmc.el.ELResolver
RESOLVABLE_AT_DESIGN_TIME, TYPE
 
Constructor Summary
ControlBindingImpl(XmlAnyDefinition metadataDef, java.lang.String name, DataControl dataControl, IteratorExecutableBindingImpl iterBinding)
           
 
Method Summary
 void containerInitialized(BindingContainer container)
          Overriding implementations should always call this base implementation before returning to set the parent container
 Map getBindings()
          added for ADFNMC
 DataControl getDataControl()
           
 java.lang.Exception getError()
           
 List getErrors()
           
 BasicIterator getIterator()
           
 XmlAnyDefinition getMetadataDefinition()
          added for ADFNMC
 java.lang.String getName()
          Return name that identifies this binding uniquely in it's container.
 java.lang.String getPath()
          Get a unique path to this instance of the control binding inside it's 'outermost' container that is referred in the BindingContext.
protected abstract  ELResolver getResolver()
           
 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.Object getValue(ELContext context, java.lang.Object base, java.lang.Object property)
          Resolve a value given a base/property pair.
 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.
 boolean prepareDeferredIterator()
           
abstract  void refresh()
           
abstract  void registerForIteratorEvents(IteratorExecutableBindingImpl evtSource)
           
 void release()
          Releases this ControlBinding.
 void reportException(AdfNmcException ex, boolean rethrow)
           
 boolean resolvePath(Map postMap)
          Given a map of name/value pairs, use this binding's path to find an entry in this map.
 void setListener(UpdateListener listener)
          Adds a listener that should be notified when the associated attribute value changes.
 void setValue(ELContext context, java.lang.Object base, java.lang.Object property, java.lang.Object value)
          Set value on an object using an accessor resolved from a base/property pair.
 java.lang.String toString()
           
abstract  void unregisterForIteratorEvents(IteratorExecutableBindingImpl evtSource)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CLASS_INSTANCE

public static final java.lang.Class CLASS_INSTANCE

metadataDef

protected final XmlAnyDefinition metadataDef

dataControl

protected final DataControl dataControl

iterBinding

protected final IteratorExecutableBindingImpl iterBinding

name

protected final java.lang.String name

parentBindingContainer

protected BindingContainer parentBindingContainer

currentError

protected java.lang.Exception currentError

errors

protected List errors
Constructor Detail

ControlBindingImpl

public ControlBindingImpl(XmlAnyDefinition metadataDef,
                          java.lang.String name,
                          DataControl dataControl,
                          IteratorExecutableBindingImpl iterBinding)
Method Detail

toString

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

getResolver

protected abstract ELResolver getResolver()

refresh

public abstract void refresh()

getError

public java.lang.Exception getError()

getErrors

public List getErrors()

reportException

public void reportException(AdfNmcException ex,
                            boolean rethrow)

getDataControl

public DataControl getDataControl()

getIterator

public BasicIterator getIterator()

prepareDeferredIterator

public boolean prepareDeferredIterator()

containerInitialized

public void containerInitialized(BindingContainer container)
Overriding implementations should always call this base implementation before returning to set the parent container

Specified by:
containerInitialized in interface ControlBinding
Parameters:
container -

getName

public java.lang.String getName()
Description copied from interface: ControlBinding
Return name that identifies this binding uniquely in it's container.

Specified by:
getName in interface ControlBinding

getPath

public java.lang.String getPath()
Description copied from interface: ControlBinding
Get a unique path to this instance of the control binding inside it's 'outermost' container that is referred in the BindingContext. This string allows the control binding to extract it's data or action out of the postMap provided in resolvePath(). Both these apis are useful in web style clients and may not have much role to play in interactive clients like Swing.

Specified by:
getPath in interface ControlBinding

release

public void release()
Description copied from interface: ControlBinding
Releases this ControlBinding. This method is called when the view component has finished using this ControlBinding.

Specified by:
release in interface ControlBinding

resolvePath

public boolean resolvePath(Map postMap)
Description copied from interface: ControlBinding
Given a map of name/value pairs, use this binding's path to find an entry in this map. If found, return true so that controller logic may use that information to update binding's data if changed or otherwise.

Specified by:
resolvePath in interface ControlBinding

setListener

public void setListener(UpdateListener listener)
Description copied from interface: ControlBinding
Adds a listener that should be notified when the associated attribute value changes.

Specified by:
setListener in interface ControlBinding
Parameters:
listener - The listener object that needs be notified.

registerForIteratorEvents

public abstract void registerForIteratorEvents(IteratorExecutableBindingImpl evtSource)

unregisterForIteratorEvents

public abstract void unregisterForIteratorEvents(IteratorExecutableBindingImpl evtSource)

getBindings

public Map getBindings()
Description copied from interface: ControlBinding
added for ADFNMC

Specified by:
getBindings in interface ControlBinding
Returns:
Collection of bindings that are contained within or associated with this binding.

getMetadataDefinition

public XmlAnyDefinition getMetadataDefinition()
Description copied from interface: ControlBinding
added for ADFNMC

Specified by:
getMetadataDefinition in interface ControlBinding
Returns:
The metadata definition object for this binding object

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.

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.

getValue

public java.lang.Object getValue(ELContext context,
                                 java.lang.Object base,
                                 java.lang.Object property)
Resolve a value given a base/property pair.

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.

setValue

public void setValue(ELContext context,
                     java.lang.Object base,
                     java.lang.Object property,
                     java.lang.Object value)
Set value on an object using an accessor resolved from a base/property pair.

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.

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.