net.refractions.udig.catalog.service.database
Class DataConnectionPage

java.lang.Object
  extended by WizardPage
      extended by net.refractions.udig.catalog.ui.workflow.WorkflowWizardPage
          extended by net.refractions.udig.catalog.ui.AbstractUDIGImportPage
              extended by net.refractions.udig.catalog.service.database.DataConnectionPage
All Implemented Interfaces:
UDIGConnectionPage

public class DataConnectionPage
extends AbstractUDIGImportPage

This page allows the user to select the database and rest of the information for creating a layer from the database. (Schema, table, SQL)

Since:
1.1.0
Author:
jesse

Constructor Summary
DataConnectionPage()
           
 
Method Summary
 void createControl(Composite parent)
           
 java.util.Map<java.lang.String,java.io.Serializable> getParams()
          Gather parameters from the user interface.
 java.util.Collection<java.net.URL> getResourceIDs()
          Returns the ids of the GeoResource to use as the "selected" resources.
 void handleEvent(Event event)
           
 boolean isPageComplete()
           
 boolean leavingPage()
          Called by framework as the page is about to be left.
 void shown()
          Called immediately after a page has been shown in the wizard.
 
Methods inherited from class net.refractions.udig.catalog.ui.AbstractUDIGImportPage
dispose, getNextPage, getServices, setErrorMessage, setMessage
 
Methods inherited from class net.refractions.udig.catalog.ui.workflow.WorkflowWizardPage
canFlipToNextPage, getState, getWizard, setState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataConnectionPage

public DataConnectionPage()
Method Detail

isPageComplete

public boolean isPageComplete()

getParams

public java.util.Map<java.lang.String,java.io.Serializable> getParams()
Gather parameters from the user interface.

Specified by:
getParams in interface UDIGConnectionPage
Overrides:
getParams in class AbstractUDIGImportPage
Returns:
connection parameters from the user interface

shown

public void shown()
Description copied from class: WorkflowWizardPage
Called immediately after a page has been shown in the wizard. At the time this method is called, the page can be sure that its ui has been created (via a call to #createContents()) and that it's state has been set (via #setState()). Default implementation does nothing, subclass should override.

Overrides:
shown in class WorkflowWizardPage

leavingPage

public boolean leavingPage()
Description copied from class: AbstractUDIGImportPage
Called by framework as the page is about to be left.

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.

Remember that this method is only called when moving forward.

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

 getContainer().run(false, cancelable, runnable);
 
Remember to pass in false as the fork parameter so that it blocks until the method has completed executing.

Overrides:
leavingPage in class AbstractUDIGImportPage
Returns:
true if it is acceptable to leave the page false if the page must not be left
See Also:
WorkflowWizardPage.leavingPage()

createControl

public void createControl(Composite parent)

getResourceIDs

public java.util.Collection<java.net.URL> getResourceIDs()
Description copied from class: AbstractUDIGImportPage
Returns the ids of the GeoResource to use as the "selected" resources. If a non-empty collection is returned then the next states in the wizard "should" use these as the items selected by the user.

Example: The postgis wizard pages permits the user to select the table of interest. When moving to a new state (for example the Resource Selection State in net.refractions.udig.project.ui) that state should use that as the selected IGeoResources if it needs a selection of IGeoResources
In the ResourceSelectionState example it would use this collection and not need to query the user with a wizard page for that input

Specified by:
getResourceIDs in interface UDIGConnectionPage
Overrides:
getResourceIDs in class AbstractUDIGImportPage
Returns:
the ids of the GeoResource to use as the "selected" resources.

handleEvent

public void handleEvent(Event event)