org.bdgp.io
Interface DataAdapterUI

All Known Subinterfaces:
InteractiveDataAdapterUI

public interface DataAdapterUI

An abstract representation of a DataAdapter user interface. These interfaces are meant to be used in conjunction with a some sort of data adapter selection widget, like {link org.bdgp.swing.widget.DataAdapterChooser}


Method Summary
 java.lang.Object doOperation(java.lang.Object values)
          The method that actually performs the data adapter operation (presumably by delegating to a data adapter).
 java.util.Properties getProperties()
          Returns the UI properties for this DataAdapterUI.
 void setDataAdapter(DataAdapter in)
          Sets the data adapter for this UI.
 void setProperties(java.util.Properties in)
          Sets UI properties for this DataAdapterUI.
 

Method Detail

setDataAdapter

public void setDataAdapter(DataAdapter in)
Sets the data adapter for this UI. Since the UI provides it's own implementation of the IOOperation via the {link #doOperation(Object)}, the DataAdapterUI can decide whether or not to actually use the DataAdapter to perform the operation. However, a correct implementation of this interface will use the DataAdapter given in setDataAdapter.

setProperties

public void setProperties(java.util.Properties in)
Sets UI properties for this DataAdapterUI. The source of these properties is up to the widget that displays the DataAdapterUI. Most of the time these properties will contain some sort of history information and will be loaded from a file. The Properties object may be null if there are no properties to set.

getProperties

public java.util.Properties getProperties()
Returns the UI properties for this DataAdapterUI. These properties may be recorded by the widget that displays the DataAdapterUI and provided to the setDataAdapter method of later instances of the DataAdapterUI. This method may return null if there are no properties to record.

doOperation

public java.lang.Object doOperation(java.lang.Object values)
                             throws DataAdapterException
The method that actually performs the data adapter operation (presumably by delegating to a data adapter). The input and outputs to this method are entirely dependant on the operation the data adapter is supposed to perform. The input or output of this method may be null.