org.jSyncManager.Conduit

Class DefaultConduit

Implemented Interfaces:
Serializable

public class DefaultConduit
extends AbstractConduit

The default jConduit. This jConduit is always used during synchronization. It provides backup and restore capabilities for database flagged as requiring backup.

Field Summary

static int
CANCEL_OPTION
A value to represent the selection of the 'Cancel' option.
static int
NO_OPTION
A value to represent the selection of the 'No' option.
static int
NO_TO_ALL_OPTION
A value to represent the 'No to All' option.
static int
YES_OPTION
A value to represent the selection of the 'Yes' option.
static int
YES_TO_ALL_OPTION
A value to represent the selection of the 'Yes to All' option.

Fields inherited from class org.jSyncManager.API.Conduit.AbstractConduit

CANCEL_BUTTON_PRESSED, HELP_BUTTON_PRESSED, HIGH_PRIORITY, LOW_PRIORITY, NORMAL_PRIORITY, OK_BUTTON_PRESSED, configurationPanel, resources

Constructor Summary

DefaultConduit()
Constructs a new Default jConduit instance.

Method Summary

protected JPanel
constructConfigPanel()
Constructs a configuration panel for this jConduit.
protected String
getResourceBundleName()
Retrieves the name of the class to use as the Conduits Resource Bundle.
protected int
showRestoreVerifyDialog(String dbName)
Displays the database restore dialog.
void
startSync(ConduitHandler conduithandler, DLPUserInfo user)
This method is called when this jConduit is given the opportunity to synchronize.

Methods inherited from class org.jSyncManager.API.Conduit.AbstractConduit

constructConfigPanel, doInitialization, getConduitDescription, getConduitName, getConduitResourceBundle, getConfigurationPanel, getPriority, getResourceBundleName, initialize, jConduitDialogActionPerformed, startSync, toString

Field Details

CANCEL_OPTION

public static final int CANCEL_OPTION
A value to represent the selection of the 'Cancel' option.

NO_OPTION

public static final int NO_OPTION
A value to represent the selection of the 'No' option.

NO_TO_ALL_OPTION

public static final int NO_TO_ALL_OPTION
A value to represent the 'No to All' option.

YES_OPTION

public static final int YES_OPTION
A value to represent the selection of the 'Yes' option.

YES_TO_ALL_OPTION

public static final int YES_TO_ALL_OPTION
A value to represent the selection of the 'Yes to All' option.
Field Value:
10

Constructor Details

DefaultConduit

public DefaultConduit()
Constructs a new Default jConduit instance.

Method Details

constructConfigPanel

protected JPanel constructConfigPanel()
Constructs a configuration panel for this jConduit. This jConduit doesn't require a configuration panel.
Overrides:
constructConfigPanel in interface AbstractConduit
Returns:
null.

getResourceBundleName

protected String getResourceBundleName()
Retrieves the name of the class to use as the Conduits Resource Bundle. This method should return a String containing the fully-qualified classname of the class to use for this jConduits textual resources. You may return null from this method, however if you do so you're expected to override the getConduitName and getConduitDescription methods to return suitable data. We suggest using Resource Bundles to ensure that your jConduits can be translated to other languages.
Overrides:
getResourceBundleName in interface AbstractConduit
Returns:
the fully-qualified classname of the class to use as this jConduits resource bundle.

showRestoreVerifyDialog

protected int showRestoreVerifyDialog(String dbName)
Displays the database restore dialog. This method displays a dialog to the user to allow them to selectively restore missing databases. This method supports the property jsyncman.defaultconduit.restoreall. When set to "true", this method will automatically return YES_TO_ALL_OPTION. If set to any other value, it will return NO_TO_ALL_OPTION. If not set, it will display the dialog to the user as expected.
Parameters:
dbName - the name of the database to be restored.
Returns:
an integer representing the return code.

startSync

public void startSync(ConduitHandler conduithandler,
                      DLPUserInfo user)
            throws NotConnectedException
This method is called when this jConduit is given the opportunity to synchronize.
Overrides:
startSync in interface AbstractConduit
Parameters:
conduithandler - he handle to the active ConduitHandler to use for synchronization.
Throws:
NotConnectedException - thrown if the connection to the Palm is lost.