org.jSyncManager.Conduit.Email

Class Email

Implemented Interfaces:
Serializable

public final class Email
extends AbstractConduit

The Email jConduit class. This jConduit simply dumps the contents of the standard Palm application databases to nicely formatted text files in the users home directory.

Field Summary

static String
DBNAME
Database name.
static String
DUMP_DIRNAME
Name of directory to place output into.
static String
PROP_FILENAME
Properties file name.

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

Email()
Creates a new instance of Email.

Method Summary

void
addEmail_connection(Email_Base email)
Setter for property email_connections.
protected JPanel
constructConfigPanel()
Create and return the Configuration Panel for this class.
boolean
exists(String msgid)
Check whether the given message ID already exists in the hashmap.
java.util.Properties
getConfig()
Getter for property config.
ConnectionsPanel
getConfigPanel()
Getter for property configPanel.
java.util.Vector
getEmailConns()
Getter for property emailConns.
ConduitHandler
getHandler()
Getter for property handler.
byte
getInbox()
Getter for property inbox.
java.util.HashMap
getMap()
Getter for property map.
byte
getOutbox()
Getter for property outbox.
protected String
getResourceBundleName()
Retrieve resource bundle file name.
byte
getSent()
Getter for property sent.
java.util.Vector
getVEmails()
Getter for property vEmails.
void
readMap()
Get Hashmap of email IDs from properties.
void
setConfig(java.util.Properties config)
Setter for property config.
void
setConfigPanel(ConnectionsPanel configPanel)
Setter for property configPanel.
void
setEmailConns(java.util.Vector emailConns)
Setter for property emailConns.
void
setEmail_connections(java.util.Vector email_connections)
Setter for property email_connections.
void
setHandler(ConduitHandler handler)
Setter for property handler.
void
setInbox(byte inbox)
Setter for property inbox.
void
setMap(java.util.HashMap map)
Setter for property map.
void
setOutbox(byte outbox)
Setter for property outbox.
void
setSent(byte sent)
Setter for property sent.
void
setVEmails(java.util.Vector vEmails)
Setter for property vEmails.
void
startSync(ConduitHandler conduitHandler, DLPUserInfo user)
This method is called when this jConduit is given the opportunity to synchronize.
void
writeMap()
Write hashmap of email IDs to properties file.

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

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

Field Details

DBNAME

public static final String DBNAME
Database name.

DUMP_DIRNAME

public static final String DUMP_DIRNAME
Name of directory to place output into.

PROP_FILENAME

public static final String PROP_FILENAME
Properties file name.

Constructor Details

Email

public Email()
            throws javax.mail.MessagingException,
                   javax.mail.NoSuchProviderException,
                   IOException
Creates a new instance of Email.

Method Details

addEmail_connection

public void addEmail_connection(Email_Base email)
Setter for property email_connections.
Parameters:
email - New value of property email_connections.

constructConfigPanel

protected JPanel constructConfigPanel()
Create and return the Configuration Panel for this class.
Overrides:
constructConfigPanel in interface AbstractConduit
Returns:
Returns the Configuration Panel object.

exists

public boolean exists(String msgid)
Check whether the given message ID already exists in the hashmap.
Parameters:
msgid - message id to check against hashmap for existence.
Returns:
Returns 1 if message id is found, 0 if not.

getConfig

public java.util.Properties getConfig()
Getter for property config.
Returns:
Value of property config.

getConfigPanel

public ConnectionsPanel getConfigPanel()
Getter for property configPanel.
Returns:
Value of property configPanel.

getEmailConns

public java.util.Vector getEmailConns()
Getter for property emailConns.
Returns:
Value of property emailConns.

getHandler

public ConduitHandler getHandler()
Getter for property handler.
Returns:
Value of property handler.

getInbox

public byte getInbox()
Getter for property inbox.
Returns:
Value of property inbox.

getMap

public java.util.HashMap getMap()
Getter for property map.
Returns:
Value of property map.

getOutbox

public byte getOutbox()
Getter for property outbox.
Returns:
Value of property outbox.

getResourceBundleName

protected String getResourceBundleName()
Retrieve resource bundle file name.
Overrides:
getResourceBundleName in interface AbstractConduit
Returns:
Returns the name of the resource bundle file.

getSent

public byte getSent()
Getter for property sent.
Returns:
Value of property sent.

getVEmails

public java.util.Vector getVEmails()
Getter for property vEmails.
Returns:
Value of property vEmails.

readMap

public void readMap()
            throws java.io.IOException
Get Hashmap of email IDs from properties.

setConfig

public void setConfig(java.util.Properties config)
Setter for property config.
Parameters:
config - New value of property config.

setConfigPanel

public void setConfigPanel(ConnectionsPanel configPanel)
Setter for property configPanel.
Parameters:
configPanel - New value of property configPanel.

setEmailConns

public void setEmailConns(java.util.Vector emailConns)
Setter for property emailConns.
Parameters:
emailConns - New value of property emailConns.

setEmail_connections

public void setEmail_connections(java.util.Vector email_connections)
Setter for property email_connections.
Parameters:
email_connections - New value of property email_connections.

setHandler

public void setHandler(ConduitHandler handler)
Setter for property handler.
Parameters:
handler - New value of property handler.

setInbox

public void setInbox(byte inbox)
Setter for property inbox.
Parameters:
inbox - New value of property inbox.

setMap

public void setMap(java.util.HashMap map)
Setter for property map.
Parameters:
map - New value of property map.

setOutbox

public void setOutbox(byte outbox)
Setter for property outbox.
Parameters:
outbox - New value of property outbox.

setSent

public void setSent(byte sent)
Setter for property sent.
Parameters:
sent - New value of property sent.

setVEmails

public void setVEmails(java.util.Vector vEmails)
Setter for property vEmails.
Parameters:
vEmails - New value of property vEmails.

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.
user - DLP User Info block.
Throws:
NotConnectedException - thrown if the connection to the Palm is lost.

writeMap

public void writeMap()
            throws java.io.IOException
Write hashmap of email IDs to properties file.