pl.edu.agh.cast.importer.wizard.general
Class GeneralConversionRulesSelectionPage

java.lang.Object
  extended by org.eclipse.jface.dialogs.DialogPage
      extended by org.eclipse.jface.wizard.WizardPage
          extended by pl.edu.agh.cast.importer.wizard.page.AbstractImportWizardPage
              extended by pl.edu.agh.cast.importer.wizard.page.AbstractConversionRulesSelectionPage
                  extended by pl.edu.agh.cast.importer.wizard.general.GeneralConversionRulesSelectionPage
All Implemented Interfaces:
org.eclipse.jface.dialogs.IDialogPage, org.eclipse.jface.dialogs.IMessageProvider, org.eclipse.jface.wizard.IWizardPage

public class GeneralConversionRulesSelectionPage
extends AbstractConversionRulesSelectionPage

Page of the import wizard, which serves for selection of conversion rules for each domain field. This page is specific for general domain model.

Author:
AGH CAST Team

Field Summary
static String PAGE_ID
          Name of the conversion rules selection page for the general domain model.
 
Fields inherited from class pl.edu.agh.cast.importer.wizard.page.AbstractConversionRulesSelectionPage
converter, ruleCombosMap, ruleInfos
 
Fields inherited from interface org.eclipse.jface.dialogs.IMessageProvider
ERROR, INFORMATION, NONE, WARNING
 
Constructor Summary
GeneralConversionRulesSelectionPage()
          The default constructor.
 
Method Summary
 boolean canFinish()
          Checks whether the wizard can finish the import process (using the helper method AbstractConversionRulesSelectionPage.isComplete()), and when it is, creates an appropriate converter, sets its conversion rule values, and sets the converter for the parent wizard.
 org.eclipse.swt.widgets.Composite createConvRulesComposite(org.eclipse.swt.widgets.Composite parent)
          
 IDateConversionRule getDateRule()
           
 ISourceNodeConversionRule getSourceNodeRule()
           
 ITargetNodeConversionRule getTargetNodeRule()
           
protected  boolean isComplete()
          Returns whether the current conversion rule selection page is complete - whether all its obligatory conversion rules are complete (are entirely configured).
 void refreshCombosBlocking(List<org.eclipse.swt.widgets.Combo> combosToBlock, List<org.eclipse.swt.widgets.Combo> combosToUnblock, IConversionRule newRule)
          Refreshes the blocking of comboboxes on the current rules selection page.
 void refreshConversionPreview()
          Refreshes the conversion preview table.
 void refreshSelectedData()
          Method called by the previous page to refresh the selected data.
 void setDateRule(IDateConversionRule rule)
          Sets the date rule.
 void setDateRule(String ruleId)
          Retrieves the date rule, given its identifier, and sets the resulting rule.
 void setSourceNodeRule(ISourceNodeConversionRule rule)
          Sets the source node rule.
 void setSourceNodeRule(String ruleId)
          Retrieves the source node rule, given its identifier, and sets the resulting rule.
 void setTargetNodeRule(ITargetNodeConversionRule rule)
          Sets the target node rule.
 void setTargetNodeRule(String ruleId)
          Retrieves the target node rule, given its identifier, and sets the resulting rule.
 int showWarningMsgBox()
          Displays a warning box before wizard finish with an appropriate message, if necessary.
 
Methods inherited from class pl.edu.agh.cast.importer.wizard.page.AbstractConversionRulesSelectionPage
canFlipToNextPage, checkBlocking, createControl, getConversionPreview, getConversionRuleConfigDialog, getConversionRuleInstance, getSelectedRuleId, initPage, isCurrentWizardPage, isSaveTemplateSelected, setMustSaveTemplate, setRuleComboData, setRuleCombosMap, setRuleDescriptionLabel
 
Methods inherited from class pl.edu.agh.cast.importer.wizard.page.AbstractImportWizardPage
dispose, getImportProcess, getImportWizard, getNextPage, refreshImportData, widgetModified
 
Methods inherited from class org.eclipse.jface.wizard.WizardPage
getContainer, getDialogSettings, getImage, getName, getPreviousPage, getShell, getWizard, isCurrentPage, isPageComplete, setDescription, setErrorMessage, setImageDescriptor, setMessage, setPageComplete, setPreviousPage, setTitle, setWizard, toString
 
Methods inherited from class org.eclipse.jface.dialogs.DialogPage
convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, getControl, getDescription, getDialogFontName, getErrorMessage, getFont, getMessage, getMessageType, getTitle, getToolTipText, initializeDialogUnits, isControlCreated, performHelp, setButtonLayoutData, setControl, setMessage, setVisible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.jface.dialogs.IDialogPage
getControl, getDescription, getErrorMessage, getMessage, getTitle, performHelp, setVisible
 

Field Detail

PAGE_ID

public static final String PAGE_ID
Name of the conversion rules selection page for the general domain model.

See Also:
Constant Field Values
Constructor Detail

GeneralConversionRulesSelectionPage

public GeneralConversionRulesSelectionPage()
The default constructor.

Method Detail

createConvRulesComposite

public org.eclipse.swt.widgets.Composite createConvRulesComposite(org.eclipse.swt.widgets.Composite parent)

Specified by:
createConvRulesComposite in class AbstractConversionRulesSelectionPage
See Also:
createConvRulesComposite(org.eclipse.swt.widgets.Composite)

canFinish

public boolean canFinish()
Checks whether the wizard can finish the import process (using the helper method AbstractConversionRulesSelectionPage.isComplete()), and when it is, creates an appropriate converter, sets its conversion rule values, and sets the converter for the parent wizard.

Specified by:
canFinish in class AbstractConversionRulesSelectionPage
Returns:
true if the wizard can finish the import process, false otherwise
See Also:
AbstractConversionRulesSelectionPage.canFinish()

isComplete

protected boolean isComplete()
Returns whether the current conversion rule selection page is complete - whether all its obligatory conversion rules are complete (are entirely configured).

Specified by:
isComplete in class AbstractConversionRulesSelectionPage
Returns:
true if the wizard can finish the import process, false otherwise
See Also:
AbstractConversionRulesSelectionPage.isComplete()

refreshSelectedData

public void refreshSelectedData()
Method called by the previous page to refresh the selected data.

Specified by:
refreshSelectedData in class AbstractConversionRulesSelectionPage
See Also:
AbstractConversionRulesSelectionPage.refreshSelectedData()

refreshConversionPreview

public void refreshConversionPreview()
Refreshes the conversion preview table.

Specified by:
refreshConversionPreview in class AbstractConversionRulesSelectionPage
See Also:
AbstractConversionRulesSelectionPage.refreshConversionPreview()

showWarningMsgBox

public int showWarningMsgBox()
Displays a warning box before wizard finish with an appropriate message, if necessary.

Specified by:
showWarningMsgBox in class AbstractConversionRulesSelectionPage
Returns:
the message box result
See Also:
AbstractConversionRulesSelectionPage.showWarningMsgBox()

refreshCombosBlocking

public void refreshCombosBlocking(List<org.eclipse.swt.widgets.Combo> combosToBlock,
                                  List<org.eclipse.swt.widgets.Combo> combosToUnblock,
                                  IConversionRule newRule)
Refreshes the blocking of comboboxes on the current rules selection page.

Specified by:
refreshCombosBlocking in class AbstractConversionRulesSelectionPage
Parameters:
combosToBlock - the comboboxes to block
combosToUnblock - the comboboxes to unblock
newRule - the newly selected conversion rule
See Also:
refreshCombosBlocking(java.util.List, java.util.List)

setSourceNodeRule

public void setSourceNodeRule(String ruleId)
Retrieves the source node rule, given its identifier, and sets the resulting rule.

Parameters:
ruleId - the rule identifier

setSourceNodeRule

public void setSourceNodeRule(ISourceNodeConversionRule rule)
Sets the source node rule.

Parameters:
rule - the rule to set

setTargetNodeRule

public void setTargetNodeRule(String ruleId)
Retrieves the target node rule, given its identifier, and sets the resulting rule.

Parameters:
ruleId - the rule identifier

setTargetNodeRule

public void setTargetNodeRule(ITargetNodeConversionRule rule)
Sets the target node rule.

Parameters:
rule - the rule to set

setDateRule

public void setDateRule(String ruleId)
Retrieves the date rule, given its identifier, and sets the resulting rule.

Parameters:
ruleId - the rule identifier

setDateRule

public void setDateRule(IDateConversionRule rule)
Sets the date rule.

Parameters:
rule - the rule to set

getSourceNodeRule

public ISourceNodeConversionRule getSourceNodeRule()

getTargetNodeRule

public ITargetNodeConversionRule getTargetNodeRule()

getDateRule

public IDateConversionRule getDateRule()


Copyright © 2007-2009 IISG AGH-UST Krakow, Poland. All Rights Reserved.