Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 1 (11.1.1.4.0)

E10653-05

oracle.adfinternal.model.adapter.webservice
Class WSDataControl

java.lang.Object
  extended by oracle.adf.model.adapter.AbstractImpl
      extended by oracle.adfinternal.model.adapter.webservice.WSDataControl
All Implemented Interfaces:
DataControl, DefinitionProviderDataControl, UpdateableDataControl

public class WSDataControl
extends AbstractImpl
implements UpdateableDataControl, DefinitionProviderDataControl

The WebService Data control allows the ADF data control to invoke any Webservice via an underlying provider framework of either SOAP runtime or WSIF. The Webservice can be invoked purely from the data described in the Adapter metadata file at design time.

Since:
10.1.3

Field Summary
 
Fields inherited from class oracle.adf.model.adapter.AbstractImpl
METHOD_CREATE, METHOD_EXECUTE, mName, SORT_CRITERIA
 
Constructor Summary
WSDataControl(java.lang.String name)
          Create an instance of the Webservice Data control.
 
Method Summary
 java.lang.Object createRowData(RowContext ctx)
          This method is called by the data binding framework when a new row is needed from the data control.
 java.lang.Object getDataProvider()
          Get the data provider.
 Definition getDefinition(java.lang.String name, int type)
          Get a definition by name of the specified type.
 java.lang.String getName()
          Get the Name of the data control
 WSProvider getProvider()
          Returns the underlying provider configured to invoke the WS operations.
 void initialize(java.lang.String provider, java.util.Map environment)
           
 boolean invokeOperation(java.util.Map bindingContext, OperationBinding operation)
          Invoke the action associated with this data control.
 java.lang.Object registerDataProvider(RowContext ctx)
          This method is called by the data binding facility before the row in the RowContext object is modified or marked as removed, so the row can be marked dirty by the data control.
 void release()
          Releases the DataControl.
 boolean removeRowData(RowContext ctx)
          This method is called by the data binding facility when a row should be removed from the underlying data source.
 boolean setAttributeValue(AttributeContext ctx, java.lang.Object value)
          This method is called by the data binding framework when a new value is to be set on an attribute in a bean.
 void validate()
          Validates transaction if dirty.
 
Methods inherited from class oracle.adf.model.adapter.AbstractImpl
addParameter, createAndAddNewRow, createEmptyDataSet, getAdapterContext, getDefinition, getParameterNames, getParameterValue, getSortCriteria, getStructureDef, getStructureDef, processResult, setDefinition, setName, setParameterValue, setStructureDef, shouldReexecuteOperation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WSDataControl

public WSDataControl(java.lang.String name)
Create an instance of the Webservice Data control.

Parameters:
name - The name of this data control.
Method Detail

getName

public java.lang.String getName()
Get the Name of the data control

Specified by:
getName in interface DataControl
Returns:
The name of the data control.

initialize

public void initialize(java.lang.String provider,
                       java.util.Map environment)

getDataProvider

public java.lang.Object getDataProvider()
Get the data provider. A Data provider provides data to the binding layer to be displayed on the view. For ADF this is usually an iterator of maps

Specified by:
getDataProvider in interface DataControl
Returns:
The Object that contains the data.

invokeOperation

public boolean invokeOperation(java.util.Map bindingContext,
                               OperationBinding operation)
Invoke the action associated with this data control. The WebService data control invokes the operation to return the data collection assoicated with the operation invocation.

Specified by:
invokeOperation in interface DataControl
Parameters:
bindingContext - A binding context that provide access to all binding related objects.
Returns:
true if this datacontrol has handled this action. false if the action should be interpreted in the bindings framework or in the caller.

release

public void release()
Releases the DataControl. The DataControl should be in a collectable state after release() has been invokd.

This should close all open DataControl resources.

Specified by:
release in interface DataControl

getDefinition

public Definition getDefinition(java.lang.String name,
                                int type)
Get a definition by name of the specified type. At present this implementation returns only the struture definitions

Specified by:
getDefinition in interface DefinitionProviderDataControl
Parameters:
name - The name of the definition.
type - the type of the definition.

setAttributeValue

public boolean setAttributeValue(AttributeContext ctx,
                                 java.lang.Object value)
Description copied from interface: UpdateableDataControl
This method is called by the data binding framework when a new value is to be set on an attribute in a bean. The attribute and bean are provided in the attribute context along with other framework context information.

Return true if the base framework should skip any further processing of this attribute set. Otherwise return false so that framework can perform a set or put of the attribute value based on introspection.

Specified by:
setAttributeValue in interface UpdateableDataControl

createRowData

public java.lang.Object createRowData(RowContext ctx)
Description copied from interface: UpdateableDataControl
This method is called by the data binding framework when a new row is needed from the data control.

Specified by:
createRowData in interface UpdateableDataControl
Parameters:
ctx - Context of the new row.
Returns:
A data object for the new row.

registerDataProvider

public java.lang.Object registerDataProvider(RowContext ctx)
Description copied from interface: UpdateableDataControl
This method is called by the data binding facility before the row in the RowContext object is modified or marked as removed, so the row can be marked dirty by the data control.

Specified by:
registerDataProvider in interface UpdateableDataControl
Parameters:
ctx - Context of the row to be modified or removed.
Returns:
The data object that the row represents.

removeRowData

public boolean removeRowData(RowContext ctx)
Description copied from interface: UpdateableDataControl
This method is called by the data binding facility when a row should be removed from the underlying data source.

Specified by:
removeRowData in interface UpdateableDataControl
Parameters:
ctx - Context of the row to be removed.
Returns:
true if the operation is sucessful, false otherwise.

validate

public void validate()
Description copied from interface: UpdateableDataControl
Validates transaction if dirty.

Specified by:
validate in interface UpdateableDataControl

getProvider

public WSProvider getProvider()
Returns the underlying provider configured to invoke the WS operations.

Returns:
The WSProvider instance for this data control instance

Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 1 (11.1.1.4.0)

E10653-05

Copyright © 1997, 2011, Oracle. All rights reserved.