Class SyncWizard

java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Dialog
javax.swing.JDialog
com.lf.commons.wizard.WizardDialog
com.lf.digester.wizard.sync.SyncWizard
All Implemented Interfaces:
com.lf.commons.model.ConfigurableUnit, ActionListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, RootPaneContainer, WindowConstants

public class SyncWizard extends com.lf.commons.wizard.WizardDialog
Wizard dialog to specify a source/target mapping to synchronize files/directories.

The wizard is a simple user interface with few pages to setup a standard sync process with a few steps. With the first pages the user specifies the source and target files and/or directories to be synchronized (data flow). On the next page the generate template may be chosen, the few options are extracted from the template. Some required options are presented here as well (e.g. if sub-directories should be processed). On the final page, the user specified the digest algorithms and/or the PGP signature keys to use. Remember, that signatures are compared byte for byte which could be problematic, since signatures are never created identically even for the same PGP key! Message digests are the best mechanism to synchronize files/folders. The Digester XML format should be preferred to benefit from the available extra data portions included here like the file size, timestamp etc.

Since:
1.6
Author:
Axel Schwolow
See Also:
  • Constructor Details

    • SyncWizard

      public SyncWizard() throws InstantiationException
      Constructor method for i18n purposes only.

      Can only be used if beans design time is set (e.g. by external tools like the I18NExtractor).

      Throws:
      InstantiationException - Error indication
      Since:
      1.6
    • SyncWizard

      public SyncWizard(Frame owner)
      Constructor for the GUI component.

      Parameters:
      owner - The owner frame
      Throws:
      IllegalArgumentException - If a parameter is missing
      Since:
      1.6
  • Method Details

    • getConfiguration

      public com.lf.commons.config.Configuration getConfiguration()
      Assembles the page configurations so that the generation can be started based on settings.

      Returns:
      The configuration, null if wizard has not been finished or error case
      Since:
      1.6
    • configureUnit

      public void configureUnit(String id, com.lf.commons.config.Configuration config)
      Restores values from persistent data stores.

      Specified by:
      configureUnit in interface com.lf.commons.model.ConfigurableUnit
      Overrides:
      configureUnit in class com.lf.commons.wizard.WizardDialog
      Parameters:
      id - The unique identifier for the instance
      config - The configuration
      Since:
      1.6
    • storeUnit

      public void storeUnit(String id, com.lf.commons.config.Configuration config)
      Stores the current configuration values persistently.

      Specified by:
      storeUnit in interface com.lf.commons.model.ConfigurableUnit
      Overrides:
      storeUnit in class com.lf.commons.wizard.WizardDialog
      Parameters:
      id - The unique identifier for the instance
      config - The configuration
      Since:
      1.6
    • unitRegistered

      public void unitRegistered(com.lf.commons.model.ApplicationModel model, String id)
      Informs the configurable unit that it was registered with a model.

      Specified by:
      unitRegistered in interface com.lf.commons.model.ConfigurableUnit
      Overrides:
      unitRegistered in class com.lf.commons.wizard.WizardDialog
      Parameters:
      model - The application model
      id - The unique identifier for the instance
      Since:
      1.6
    • unitUnregistered

      public void unitUnregistered(com.lf.commons.model.ApplicationModel model, String id)
      Informs the configurable unit that it was unregistered with a model.

      Specified by:
      unitUnregistered in interface com.lf.commons.model.ConfigurableUnit
      Overrides:
      unitUnregistered in class com.lf.commons.wizard.WizardDialog
      Parameters:
      model - The application model
      id - The unique identifier for the instance
      Since:
      1.6
    • reset

      public void reset()
      Resets the wizard pages for the next time this dialog is used.

      Since:
      1.6