net.refractions.udig.catalog.service.database
Interface Tab

All Known Implementing Classes:
TableSelectionTab

public interface Tab

One of the tabs in the PostGis Connection wizard page

Since:
1.1.0
Author:
jesse

Method Summary
 void addListener(Listener modifyListener)
          Fires an SWT.Modify method when something has changed that may change the state of the tab as recognizable by calling getParams(Map) and getResourceIDs(Map).
  getParams(java.util.Map<java.lang.String,java.io.Serializable> params)
          Returns the connection parameters as known by the caller.
 java.util.Collection<java.net.URL> getResourceIDs(java.util.Map<java.lang.String,java.io.Serializable> params)
          Return the ids of the selected IGeoResource (if needed)
 void init()
          Called when the containing page has just been shown.
 boolean leavingPage()
          Called by the PostgisConnectionPage as the page is about to be left if the tab is active
 

Method Detail

leavingPage

boolean leavingPage()
Called by the PostgisConnectionPage as the page is about to be left if the tab is active

There are two main use cases for this method. The first is to save settings for the next time the wizard is visited. The other is to perform some checks or do some loading that is too expensive to do every time isPageComplete() is called. For example a database wizard page might try to connect to the database in this method rather than isPageComplete() because it is such an expensive method to call.

If an expensive method is called make sure to run it in the container:

getContainer().run(true, cancelable, runnable);

Returns:
true if it is acceptable to leave the page false if the page must not be left

getParams

 getParams(java.util.Map<java.lang.String,java.io.Serializable> params)
Returns the connection parameters as known by the caller.

Parameters:
params - the basic parameters for connecting to a database. The tab can augment the params.
Returns:
An error message or a map of connection parameters if all goes right.

getResourceIDs

java.util.Collection<java.net.URL> getResourceIDs(java.util.Map<java.lang.String,java.io.Serializable> params)
Return the ids of the selected IGeoResource (if needed)

Parameters:
params - the params used for connecting to the database. It must be a valid set of Postgis params.
Returns:
the ids of the selected IGeoResources

addListener

void addListener(Listener modifyListener)
Fires an SWT.Modify method when something has changed that may change the state of the tab as recognizable by calling getParams(Map) and getResourceIDs(Map). When an event is fired the owner of the tab should call getParams(Map) and getResourceIDs(Map) again.

Parameters:
modifyListener -

init

void init()
Called when the containing page has just been shown. The tab should clear cached information