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

E17503-02

oracle.adfnmc.bindings.dbf
Class OperationBindingBase

java.lang.Object
  extended by oracle.adfnmc.bindings.dbf.ControlBindingImpl
      extended by oracle.adfnmc.bindings.dbf.OperationBindingBase
All Implemented Interfaces:
DCTransactionStateListener, ControlBinding, IteratorCollectionListener, IteratorPositionListener, OperationBinding, ELResolver, PropertyValueChangeSource, MethodDispatch
Direct Known Subclasses:
AdapterOperationBinding, CustomOperationBinding

public abstract class OperationBindingBase
extends ControlBindingImpl
implements OperationBinding, PropertyValueChangeSource, MethodDispatch, IteratorPositionListener, IteratorCollectionListener, DCTransactionStateListener


Field Summary
protected  int actionID
           
protected  Set enabledStateChangeListeners
           
protected  boolean lastEnabledCheckValue
          used to determine whether to notify 'enabled' property listeners - we only want to sent notifications when the state changes, otherwise we're doing a whole bunch of unneccesary EL re-evaluations in response to various events that affect the position or state or our iterator or DC.
protected  List params
           
protected  java.lang.Object result
           
protected  Set resultChangeListeners
           
 
Fields inherited from class oracle.adfnmc.bindings.dbf.ControlBindingImpl
CLASS_INSTANCE, currentError, dataControl, errors, iterBinding, metadataDef, name, parentBindingContainer
 
Fields inherited from interface oracle.adfnmc.el.ELResolver
RESOLVABLE_AT_DESIGN_TIME, TYPE
 
Constructor Summary
OperationBindingBase(ActionDefinition mdDef, DataControl dataControl, IteratorExecutableBindingImpl iterBinding)
           
OperationBindingBase(XmlAnyDefinition mdDef, java.lang.String name, DataControl dataControl, IteratorExecutableBindingImpl iterBinding, int actionId)
           
 
Method Summary
 void addEnabledStateChangeListener(ValueChangeListener listener)
           
 void addParam(java.lang.Object param)
           
 void addResultChangeListener(ValueChangeListener listener)
           
 void addValueChangeListener(java.lang.String property, ValueChangeListener listener)
           
 void containerInitialized(BindingContainer container)
          Overriding implementations should always call this base implementation before returning to set the parent container
 java.lang.Object execute()
          Executes this OperationBinding, for example, as a result of a UI button being pressed.
protected abstract  java.lang.Object executeImpl()
           
 OperationInfo getOperationInfo()
          Returns a description of the operation to invoke.
protected  Parameter getParam(int index, java.lang.String actionName)
           
 Map getParamsMap()
          Retuns a map of name-value pairs of arguments and argument values to be passed to the bound operation.
protected  ELResolver getResolver()
           
 java.lang.Object getResult()
          Returns the result of invoking the operation bound by this binding (if the method has been already invoked.
 java.lang.Object invokeMethod(java.lang.String methodName, java.lang.Object[] params)
           
 boolean isOperationEnabled()
          Whether the action binding is enabled or disabled.
protected  void notifyEnabledStateChangeListeners(boolean newValue)
           
protected  void notifyResultChangeListeners(java.lang.Object newValue)
           
 void positionChanged(int absoluteIndex)
          Fires when the iterator position is changed to point to a different row.
 void rangeRefreshed()
           
 void refresh()
           
protected  void refreshEnabledState(boolean forceNotify)
           
 void registerForIteratorEvents(IteratorExecutableBindingImpl evtSource)
           
 void removeEnabledStateChangeListener(ValueChangeListener listener)
           
 void removeResultChangeListener(ValueChangeListener listener)
           
 void removeValueChangeListener(java.lang.String property, ValueChangeListener listener)
           
 void rowInserted(java.lang.Object newRow)
           
 void rowRemoved(java.lang.Object removedRow)
           
 void setResult(java.lang.Object newValue)
           
 void transactionStateChanged(boolean state)
          Invoked when the transaction is either marked dirty or clean.
 void unregisterForIteratorEvents(IteratorExecutableBindingImpl evtSource)
           
 
Methods inherited from class oracle.adfnmc.bindings.dbf.ControlBindingImpl
getBindings, getDataControl, getError, getErrors, getIterator, getMetadataDefinition, getName, getPath, getType, getValue, isReadOnly, prepareDeferredIterator, release, reportException, resolvePath, setListener, setValue, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface oracle.adfnmc.bindings.OperationBinding
getErrors
 
Methods inherited from interface oracle.adfnmc.bindings.ControlBinding
getBindings, getMetadataDefinition, getName, getPath, release, resolvePath, setListener
 
Methods inherited from interface oracle.adf.model.binding.DCTransactionStateListener
release
 

Field Detail

actionID

protected int actionID

enabledStateChangeListeners

protected Set enabledStateChangeListeners

resultChangeListeners

protected Set resultChangeListeners

lastEnabledCheckValue

protected boolean lastEnabledCheckValue
used to determine whether to notify 'enabled' property listeners - we only want to sent notifications when the state changes, otherwise we're doing a whole bunch of unneccesary EL re-evaluations in response to various events that affect the position or state or our iterator or DC. Do -not- use this as the value to return for isOperationEnabled, that should always come from an active check of the iterator or dc's state depending on the type of operation. This value is driven from events and can get out of sync or not be in the right state on startup and not have events to drive it into the right state (see Bug 10248488 - NAVIGATION CONTROL FOR TRS DATA CONTROL IS BROKEN),


params

protected List params

result

protected java.lang.Object result
Constructor Detail

OperationBindingBase

public OperationBindingBase(XmlAnyDefinition mdDef,
                            java.lang.String name,
                            DataControl dataControl,
                            IteratorExecutableBindingImpl iterBinding,
                            int actionId)

OperationBindingBase

public OperationBindingBase(ActionDefinition mdDef,
                            DataControl dataControl,
                            IteratorExecutableBindingImpl iterBinding)
Method Detail

containerInitialized

public void containerInitialized(BindingContainer container)
Description copied from class: ControlBindingImpl
Overriding implementations should always call this base implementation before returning to set the parent container

Specified by:
containerInitialized in interface ControlBinding
Overrides:
containerInitialized in class ControlBindingImpl

getResolver

protected ELResolver getResolver()
Specified by:
getResolver in class ControlBindingImpl

registerForIteratorEvents

public void registerForIteratorEvents(IteratorExecutableBindingImpl evtSource)
Specified by:
registerForIteratorEvents in class ControlBindingImpl

unregisterForIteratorEvents

public void unregisterForIteratorEvents(IteratorExecutableBindingImpl evtSource)
Specified by:
unregisterForIteratorEvents in class ControlBindingImpl

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

addEnabledStateChangeListener

public void addEnabledStateChangeListener(ValueChangeListener listener)

removeEnabledStateChangeListener

public void removeEnabledStateChangeListener(ValueChangeListener listener)

addResultChangeListener

public void addResultChangeListener(ValueChangeListener listener)

removeResultChangeListener

public void removeResultChangeListener(ValueChangeListener listener)

notifyEnabledStateChangeListeners

protected void notifyEnabledStateChangeListeners(boolean newValue)

notifyResultChangeListeners

protected void notifyResultChangeListeners(java.lang.Object newValue)

refreshEnabledState

protected void refreshEnabledState(boolean forceNotify)

refresh

public void refresh()
Specified by:
refresh in class ControlBindingImpl

positionChanged

public void positionChanged(int absoluteIndex)
Description copied from interface: IteratorPositionListener
Fires when the iterator position is changed to point to a different row.

Specified by:
positionChanged in interface IteratorPositionListener

rowInserted

public void rowInserted(java.lang.Object newRow)
Specified by:
rowInserted in interface IteratorCollectionListener

rowRemoved

public void rowRemoved(java.lang.Object removedRow)
Specified by:
rowRemoved in interface IteratorCollectionListener

rangeRefreshed

public void rangeRefreshed()
Specified by:
rangeRefreshed in interface IteratorCollectionListener

transactionStateChanged

public void transactionStateChanged(boolean state)
Description copied from interface: DCTransactionStateListener
Invoked when the transaction is either marked dirty or clean.

Specified by:
transactionStateChanged in interface DCTransactionStateListener
Parameters:
state - Indicates if the transaction was marked clean (true) or dirty (false). Controls like NavigationBar then disables/enables the Save button to indicate there are changes that need to be saved/committed to the database.

isOperationEnabled

public boolean isOperationEnabled()
Description copied from interface: OperationBinding
Whether the action binding is enabled or disabled.

Specified by:
isOperationEnabled in interface OperationBinding
Returns:
True if the action is currently enabled. False otherwise.

addParam

public void addParam(java.lang.Object param)

getParam

protected Parameter getParam(int index,
                             java.lang.String actionName)

invokeMethod

public java.lang.Object invokeMethod(java.lang.String methodName,
                                     java.lang.Object[] params)
Specified by:
invokeMethod in interface MethodDispatch

executeImpl

protected abstract java.lang.Object executeImpl()

execute

public java.lang.Object execute()
Description copied from interface: OperationBinding
Executes this OperationBinding, for example, as a result of a UI button being pressed. This should translate into invoking some operation on the underlying data control. If there are exceptions within the invoke operation, these exceptions should be accessible via getErrors().

Specified by:
execute in interface OperationBinding
Returns:
the result of the operation (null if the operation has no return type (void).

getOperationInfo

public OperationInfo getOperationInfo()
Description copied from interface: OperationBinding
Returns a description of the operation to invoke. If this operation is a built in operation, this method may return null or no MethodInfo.

Specified by:
getOperationInfo in interface OperationBinding

getParamsMap

public Map getParamsMap()
Description copied from interface: OperationBinding
Retuns a map of name-value pairs of arguments and argument values to be passed to the bound operation.

Specified by:
getParamsMap in interface OperationBinding

getResult

public java.lang.Object getResult()
Description copied from interface: OperationBinding
Returns the result of invoking the operation bound by this binding (if the method has been already invoked. This method may not force the method invocation.) This method may return null in case the method has not been invoked.

Specified by:
getResult in interface OperationBinding

setResult

public void setResult(java.lang.Object newValue)

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.