|
SL-GMS Enterprise RTView Customization | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.sl.gmsjrtviewds.GmsRtViewDsAdapter
public class GmsRtViewDsAdapter
The GmsRtViewDsAdapter class is the base class for an external data adapter in an Enterprise RTView datasource, with methods that allow the orderly initialization and shutdown of the datasource as well as the registration and updating of data objects, the management of connections and datasource-specific options, the execution of commands, and the validation of information entered into dialogs during the execution of an Enterprise RTView application.
In a datasource, the GmsRtViewDsAdapter works in conjunction with the
GmsRtViewDs
class to implement the functions required to make external
data available to an Enterprise RTView application.
Typically, the GmsRtViewDs class is used to provide metadata
used to configure the datasource, while the GmsRtViewDsAdapter is
used to access the external data and make it available for use in
Enterprise RTView displays.
The methods in the GmsRtViewDsAdapter class may be overridden by a subclass to provide datasource-specific support in the following areas:
initializeData(),
startData(), and
terminateData()
methods are called during program startup and shutdown, and
allow the application to perform any necessary initialization or
termination of the external data source.
Data Objects.
When a data object is created, the
registerData()
method is called to allow the application to register interest
in the data with the external data source.
Likewise, when a data object is freed, the
unregisterData()
method is called to allow the application to unregister interest
in the data with the external data source.
While a data object is active, the
updateDataObject()
method is called
periodically from the Enterprise RTView update timer, to allow
the application to change the data for a data object. A
polled datasource would override this method to periodically check
and update data values when new data is available. The storeData
methods in the GmsRtViewDs class are used to store the data in the
datasource.
ConnInfo Object.
At startup the datasource will invoke the
attemptConnection()
method to allow the application to establish a connection with
the external data source. Similarly, at shutdown the
datasource will invoke the
closeConnection()
method to allow the application to terminate a connection.
applyDsOption() method
allows the application to apply
Datasource Options.
Options are applied during application initialization.
executeCommand() method
allows the application to execute a command.
Dialog Validation:
The GmsRtViewDsAdapter provides methods to
allow the application to validate the information entered
into dialogs in the Enterprise RTView Builder. The
validate(GmsRtViewDataObject)
method validates data for the Attach To Data Dialog, the
validate(GmsRtViewDsConnInfo)
method validates the data in the Connections Tab of the Options
Dialog, and the
validate(GmsRtViewDsOptions)
method validates the data entered in the Options Tab of the Options
Dialog.
| Field Summary | |
|---|---|
protected GmsRtViewDs |
ds
The datasource. |
| Constructor Summary | |
|---|---|
GmsRtViewDsAdapter()
|
|
| Method Summary | |
|---|---|
protected boolean |
applyDsOption(java.lang.String name,
java.lang.String value)
Apply an option to the datasource. |
protected ConnectStatus |
attemptConnection(GmsRtViewDsConnInfo connInfo)
Attempt to open this connection. |
protected void |
beginUpdateData()
|
protected void |
closeConnection(GmsRtViewDsConnInfo connInfo)
Close this connection. |
protected GmsRtViewDsCommandStatus |
executeCommand(GmsRtViewDsCommand command)
Execute the command and set status of executed command. |
protected void |
initializeData()
Initialize this datasource. |
protected void |
registerData(GmsRtViewDataObject dataObj)
Register interest in a data object. |
protected void |
startData()
Start this datasource. |
protected void |
terminateData()
Terminate this datasource. |
protected void |
unregisterData(GmsRtViewDataObject dataObj)
Unregister interest in a data object. |
protected void |
updateDataObject(GmsRtViewDataObject dataObj)
Update a single data object. |
protected void |
updateDataObject(GmsRtViewDataObject dataObj,
boolean newSourcesOnlyFlag)
Update a single data object. |
protected void |
validate(GmsRtViewDataObject dataObject)
Validate a data object. |
protected void |
validate(GmsRtViewDsConnInfo connInfo)
Validate a connection info object. |
protected void |
validate(GmsRtViewDsOptions dsOptions)
Validate the datasource options. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected GmsRtViewDs ds
| Constructor Detail |
|---|
public GmsRtViewDsAdapter()
| Method Detail |
|---|
protected boolean applyDsOption(java.lang.String name,
java.lang.String value)
name - The name of the DS optionvalue - The value of the DS optionprotected ConnectStatus attemptConnection(GmsRtViewDsConnInfo connInfo)
connInfo - Information on the connection to be opened
protected void beginUpdateData()
protected void closeConnection(GmsRtViewDsConnInfo connInfo)
connInfo - protected GmsRtViewDsCommandStatus executeCommand(GmsRtViewDsCommand command)
command -
protected void initializeData()
protected void registerData(GmsRtViewDataObject dataObj)
dataObj - the data object to registerprotected void startData()
protected void terminateData()
protected void unregisterData(GmsRtViewDataObject dataObj)
dataObj - the data object to unregisterprotected void updateDataObject(GmsRtViewDataObject dataObj)
Subclasses should override this method to implement a "polled" data update strategy. Typically, the fields of the data object would be queried to identify it, data would be retrieved from the external data source, and GmsRtViewDs.storeData would be called to update the data.
protected void updateDataObject(GmsRtViewDataObject dataObj,
boolean newSourcesOnlyFlag)
Subclasses should override this method to implement a "polled" data update strategy. Typically, the fields of the data object would be queried to identify it, data would be retrieved from the external data source, and GmsRtViewDs.storeData would be called to update the data. If the newSourcesOnly Flag is true, then the custom adapater should only update data attchments recently defined.
protected void validate(GmsRtViewDataObject dataObject)
dataObject - the data object to validateprotected void validate(GmsRtViewDsConnInfo connInfo)
connInfo - the connection info object to validateprotected void validate(GmsRtViewDsOptions dsOptions)
dsOptions - the datasource options object to validate.
|
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||