org.deidentifier.arx.gui.view.impl.wizard

## Class ImportWizard

- java.lang.Object
- - org.eclipse.jface.wizard.Wizard
  - - org.deidentifier.arx.gui.view.impl.wizard.ARXWizard<ImportConfiguration>
    - - org.deidentifier.arx.gui.view.impl.wizard.ImportWizard

All Implemented Interfaces:
  org.eclipse.jface.wizard.IWizard

    public class ImportWizard
    extends ARXWizard<ImportConfiguration>

Wizard guiding the user through the process of importing data The user is taken through the process of importing data into the GUI step by step. All necessary information is asked for (e.g. source type, appropriate details for each source, etc.), too. Refer to `ImportWizardPageSource` for details about which source types are supported and to the appropriate page(s) itself for more details about a specific source type.

Author:
  Karol Babioch, Fabian Prasser

### Field Summary

### Fields inherited from class org.eclipse.jface.wizard.Wizard

`DEFAULT_IMAGE`

### Constructor Summary

Constructors
Constructor and Description
`ImportWizard(Controller controller, Model model)` Creates a new data import wizard and sets the window title.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `addPages()` Adds all of the available pages to the wizard.
`boolean` `canFinish()` Determines when the wizard should be finishable The wizard can only be finished on the `preview page`.
`org.eclipse.jface.wizard.IWizardPage` `getNextPage(org.eclipse.jface.wizard.IWizardPage currentPage)` Handles the correct ordering of wizard pages This method makes sure that the correct page is shown once the user hits the "next" button.
`ImportConfiguration` `getResult()` Returns a reference to DataSourceConfiguration The wizard will built an appropriate `ImportConfiguration` object once it is about to finish `performFinish()`.
`boolean` `performCancel()` Cancel pressed.
`boolean` `performFinish()` Gets executed once the wizard is about to finish This will build an appropriate `ImportConfiguration` object, depending upon the `source type` and the choices the user made during the process of the wizard.

### Methods inherited from class org.deidentifier.arx.gui.view.impl.wizard.ARXWizard

`open`

### Methods inherited from class org.eclipse.jface.wizard.Wizard

`addPage, createPageControls, dispose, getContainer, getDefaultPageImage, getDialogSettings, getPage, getPageCount, getPages, getPreviousPage, getShell, getStartingPage, getTitleBarColor, getWindowTitle, isHelpAvailable, needsPreviousAndNextButtons, needsProgressMonitor, setContainer, setDefaultPageImageDescriptor, setDialogSettings, setForcePreviousAndNextButtons, setHelpAvailable, setNeedsProgressMonitor, setTitleBarColor, setWindowTitle`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface org.eclipse.jface.wizard.IWizard

`createPageControls, dispose, getContainer, getDefaultPageImage, getDialogSettings, getPage, getPageCount, getPages, getPreviousPage, getStartingPage, getTitleBarColor, getWindowTitle, isHelpAvailable, needsPreviousAndNextButtons, needsProgressMonitor, setContainer`

### Constructor Detail

#### ImportWizard

    public ImportWizard(Controller controller,
                        Model model)

Creates a new data import wizard and sets the window title.

Parameters:
  `controller` - Reference to controller
  `model` - Reference to model

### Method Detail

#### addPages

    public void addPages()

Adds all of the available pages to the wizard.

Specified by:
  `addPages` in interface `org.eclipse.jface.wizard.IWizard`
Overrides:
  `addPages` in class `org.eclipse.jface.wizard.Wizard`

#### canFinish

    public boolean canFinish()

Determines when the wizard should be finishable The wizard can only be finished on the `preview page`. This makes sure that the user is signs off on the settings previously made.

Specified by:
  `canFinish` in interface `org.eclipse.jface.wizard.IWizard`
Overrides:
  `canFinish` in class `org.eclipse.jface.wizard.Wizard`
Returns:
See Also:
  `#performFinish()}`

#### getNextPage

    public org.eclipse.jface.wizard.IWizardPage getNextPage(org.eclipse.jface.wizard.IWizardPage currentPage)

Handles the correct ordering of wizard pages This method makes sure that the correct page is shown once the user hits the "next" button. The page flow depends `currentPage` and the selected `sourceType`.

Specified by:
  `getNextPage` in interface `org.eclipse.jface.wizard.IWizard`
Overrides:
  `getNextPage` in class `org.eclipse.jface.wizard.Wizard`
Parameters:
  `currentPage` - The page that is currently being shown
Returns:
  The page that will be shown next

#### getResult

    public ImportConfiguration getResult()

Returns a reference to DataSourceConfiguration The wizard will built an appropriate `ImportConfiguration` object once it is about to finish `performFinish()`. This object can then be retrieved using this method.

Specified by:
  `getResult` in class `ARXWizard<ImportConfiguration>`
Returns:
  `configuration` The resulting data source configuration

#### performCancel

    public boolean performCancel()

Cancel pressed.

Specified by:
  `performCancel` in interface `org.eclipse.jface.wizard.IWizard`
Overrides:
  `performCancel` in class `org.eclipse.jface.wizard.Wizard`
Returns:

#### performFinish

    public boolean performFinish()

Gets executed once the wizard is about to finish This will build an appropriate `ImportConfiguration` object, depending upon the `source type` and the choices the user made during the process of the wizard. `configuration` will hold a reference of the object. This can be retrieved later on by `#getResultingConfiguration()`.

Specified by:
  `performFinish` in interface `org.eclipse.jface.wizard.IWizard`
Overrides:
  `performFinish` in class `ARXWizard<ImportConfiguration>`
Returns:
See Also:
  `#getResultingConfiguration()}`