Skip navigation links

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

E10653-03


oracle.adf.model.adapter
Class AbstractAdapter

java.lang.Object
  extended by oracle.adf.model.adapter.AbstractAdapter

Direct Known Subclasses:
BeanAbstractAdapter

public abstract class AbstractAdapter
extends java.lang.Object

Abstract base class to adapt a data source into ADF design time.

Data control implementations should implement this class in order to provide metadata information that the design time generates.

Application design time (e.g. JDeveloper or WorkPlace editor) supports creation of data controls by dragging and dropping a data source connection to a drop location. The design time picks up the adapter that declares itself capable of handling the data source dropped.

The design time will instantiate the concrete implementation of this class and call the initialize method by passing the source object that can be used to get the information about the data source. Depending on the design time context, the source object can be of different form. Adapter implementations must know the type of data that they are expecting from the design time context.

Once the adapter instance is created, the design time calls (@link #invokeUI()} to ask the adapter to show any UI if required to gather information to define a data control. Method getDefinition() returns the data control definition. Created: Tue Jul 13 12:16:40 2004


Constructor Summary
AbstractAdapter()
           

 

Method Summary
 boolean canCreateDataControl(java.lang.Object source)
          Decides if the adapter can create a data control from the given source.
 void configureClientProject(java.lang.Object sourceObj, DTContext ctx)
          Hook to allow specific adapter implementations to configure a client project.
abstract  AbstractDefinition getDefinition()
          Returns the definition of the created data control.
 java.beans.PropertyChangeListener getPageDefinitionListener()
          Returns the lsitener for page definition changes if any.
abstract  void initialize(java.lang.Object sourceObj, DTContext ctx)
          Initializes the adapter from a source object.
 boolean invokeUI()
          Invlokes the UI at the design time.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

AbstractAdapter

public AbstractAdapter()

Method Detail

initialize

public abstract void initialize(java.lang.Object sourceObj,
                                DTContext ctx)
Initializes the adapter from a source object.

The source object can be different thing depending on the context of the design time that the adapter is used in. For JDeveloper, the object will be a JDeveloper node, for workplace aplication it can be a connection object.

Adapter implementations will check the "ctx" parameter to get the current design time context. The source object will be used to extract the information for the data source.

Parameters:
sourceObj - Object that contains information about the data source that will be used to define the data control.
ctx - Current design time context.

invokeUI

public boolean invokeUI()
Invlokes the UI at the design time.

This method is a call back from the JDeveloper design time environment to the adapters to bring up any UI if required to gather information about the data source they represent.

Returns:
false if the user cancels the operation. The default retrun value is true.

getDefinition

public abstract AbstractDefinition getDefinition()
Returns the definition of the created data control.

The implementation of this method will extract the structure information from the data source.


canCreateDataControl

public boolean canCreateDataControl(java.lang.Object source)
Decides if the adapter can create a data control from the given source.

Adapter definition defines the object type that it can create a data control from. This method is called after an adapter is picked up for a source type for more precise decision. This method can decide if the adapter can create a data control for a perticular instance of the source type that it can handle.

The default implementation always returns true.

Returns:
true if it can create a data control from the source.

configureClientProject

public void configureClientProject(java.lang.Object sourceObj,
                                   DTContext ctx)
Hook to allow specific adapter implementations to configure a client project.
Parameters:
sourceObj - Object that contains information about the data source that will be used to define the data control.
ctx - Current design time context.

getPageDefinitionListener

public java.beans.PropertyChangeListener getPageDefinitionListener()
Returns the lsitener for page definition changes if any. If a listener is defined for this data contrl adapter, any change in the page definition that uses an instance of data control of this type will be notified.
Returns:
the page definition listener. The default implementation returns null.

Skip navigation links

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

E10653-03


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