org.jSyncManager.Conduit.Installer

Class Installer

Implemented Interfaces:
ActionListener, Serializable

public final class Installer
extends AbstractInstaller
implements ActionListener

A jConduit used to install PRC and PDB files. This jConduit allows the user to install PRC and PDB files from either a local or network filesystem, or via a specified URL.

Field Summary

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

Installer()
Constructs a new instance of the Installer jConduit.

Method Summary

void
actionPerformed(ActionEvent e)
Implementation of ActionListener.actionPerformed(ActionEvent).
protected void
clearDatabaseList()
A method to clear the database list vector.
protected JPanel
constructConfigPanel()
Constructs a configuration panel for this jConduit.
protected void
exceptionInstallingDatabase(DLPDatabase db, ConduitHandler handler, ConduitHandlerException e)
A method to handle when an exception is encountered while trying to install a database.
protected DLPDatabase[]
getDatabaseList(ConduitHandler handler, DLPUserInfo userInfo)
Returns a list of databases to be installed to the handheld at sync time.
byte
getPriority()
protected String
getResourceBundleName()
Retrieves the name of the class to use as the Conduits Resource Bundle.
protected void
installingDatabase(DLPDatabase db, ConduitHandler handler)
A method to handle when a database is to be installed.
protected boolean
isDatabaseInstallAllowed(DLPDatabase db, ConduitHandler handler, DLPUserInfo user)
Determines wether or not this database should be installed.
void
removeDatabase(String s)
protected void
skippingDatabase(DLPDatabase db, ConduitHandler handler)
A method to handle when a database is to be skipped (ie: not installed).

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

clearDatabaseList, exceptionInstallingDatabase, getDatabaseList, installingDatabase, isDatabaseInstallAllowed, skippingDatabase, startSync

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

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

Constructor Details

Installer

public Installer()
Constructs a new instance of the Installer jConduit.

Method Details

actionPerformed

public void actionPerformed(ActionEvent e)
Implementation of ActionListener.actionPerformed(ActionEvent). Whenever one of the config buttons is pressed, this method will be called.
Parameters:
e - the incoming action event.

clearDatabaseList

protected void clearDatabaseList()
A method to clear the database list vector.
Overrides:
clearDatabaseList in interface AbstractInstaller

constructConfigPanel

protected JPanel constructConfigPanel()
Constructs a configuration panel for this jConduit.
Overrides:
constructConfigPanel in interface AbstractConduit
Returns:
a JPanel containing the configuration widgets for the Installer jConduit.

exceptionInstallingDatabase

protected void exceptionInstallingDatabase(DLPDatabase db,
                                           ConduitHandler handler,
                                           ConduitHandlerException e)
            throws NotConnectedException
A method to handle when an exception is encountered while trying to install a database. You may use this method to provide an alert to the user when the installation of a database is aborted due to a ConduitHandlerException. You may refer to the exception to determine why the exception occurred, and to then display a message to the user.
Overrides:
exceptionInstallingDatabase in interface AbstractInstaller
Parameters:
db - the database that was being installed when the exception occurred.

getDatabaseList

protected DLPDatabase[] getDatabaseList(ConduitHandler handler,
                                        DLPUserInfo userInfo)
Returns a list of databases to be installed to the handheld at sync time.
Overrides:
getDatabaseList in interface AbstractInstaller
Parameters:
handler - the ConduitHandler object for this sync (so you can check handheld data if necessary)
userInfo - the DLPUserInfo object for the currently synchronizing user.
Returns:
an array of DLPDatabas objects.
See Also:
DLPDatabase

getPriority

public byte getPriority()
Overrides:
getPriority in interface AbstractConduit
Returns:
byte

getResourceBundleName

protected String getResourceBundleName()
Retrieves the name of the class to use as the Conduits Resource Bundle.
Overrides:
getResourceBundleName in interface AbstractConduit
Returns:
the fully-qualified classname of the class to use as this jConduits resource bundle.

installingDatabase

protected void installingDatabase(DLPDatabase db,
                                  ConduitHandler handler)
            throws NotConnectedException
A method to handle when a database is to be installed. We'll just tell the user that we're installing the specified database.
Overrides:
installingDatabase in interface AbstractInstaller
Parameters:
db - the database that is about to be installed.

isDatabaseInstallAllowed

protected boolean isDatabaseInstallAllowed(DLPDatabase db,
                                           ConduitHandler handler,
                                           DLPUserInfo user)
            throws NotConnectedException
Determines wether or not this database should be installed. This implementation will attempt to install all the databases, and thus always returns true
Overrides:
isDatabaseInstallAllowed in interface AbstractInstaller
Parameters:
db - the database object to be installed.
handler - the ConduitHandler object for this sync (so you can check handheld data if necessary)
user - the DLPUserInfo object for the currently syncing user.
Returns:
true. Always :).

removeDatabase

public void removeDatabase(String s)

skippingDatabase

protected void skippingDatabase(DLPDatabase db,
                                ConduitHandler handler)
            throws NotConnectedException
A method to handle when a database is to be skipped (ie: not installed). This jConduit never skips installing a database, thus this jConduit has a null implementation for this method.
Overrides:
skippingDatabase in interface AbstractInstaller
Parameters:
db - the database that is about to be skipped.