jSyncManager

org.jSyncManager.Conduit.Email
Class Email

java.lang.Object
  extended byorg.jSyncManager.API.Conduit.AbstractConduit
      extended byorg.jSyncManager.Conduit.Email.Email
All Implemented Interfaces:
java.io.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.

Version:
$Revision: 3.2 $
Author:
David Bartmess <dingodave@edingo.net>
Last modified by: $Author: yaztromo $.
See Also:
Serialized Form

Field Summary
static java.lang.String DBNAME
          Database name.
static java.lang.String DUMP_DIRNAME
          Name of directory to place output into.
static java.lang.String PROP_FILENAME
          Properties file name.
 
Fields inherited from class org.jSyncManager.API.Conduit.AbstractConduit
CANCEL_BUTTON_PRESSED, configurationPanel, HELP_BUTTON_PRESSED, HIGH_PRIORITY, LOW_PRIORITY, NORMAL_PRIORITY, OK_BUTTON_PRESSED, resources
 
Constructor Summary
Email()
          Creates a new instance of Email.
 
Method Summary
 void addEmail_connection(Email_Base email)
          Setter for property email_connections.
protected  javax.swing.JPanel constructConfigPanel()
          Create and return the Configuration Panel for this class.
 boolean exists(java.lang.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  java.lang.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 setEmail_connections(java.util.Vector email_connections)
          Setter for property email_connections.
 void setEmailConns(java.util.Vector emailConns)
          Setter for property emailConns.
 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
doInitialization, getConduitDescription, getConduitName, getConduitResourceBundle, getConfigurationPanel, getPriority, initialize, jConduitDialogActionPerformed, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PROP_FILENAME

public static final java.lang.String PROP_FILENAME
Properties file name.

See Also:
Constant Field Values

DBNAME

public static final java.lang.String DBNAME
Database name.

See Also:
Constant Field Values

DUMP_DIRNAME

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

See Also:
Constant Field Values
Constructor Detail

Email

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

Throws:
javax.mail.MessagingException - Messaging Exception.
javax.mail.NoSuchProviderException - Invalid or missing Provider.
java.io.IOException - I/O Exception in stream output.
Method Detail

constructConfigPanel

protected javax.swing.JPanel constructConfigPanel()
Create and return the Configuration Panel for this class.

Specified by:
constructConfigPanel in class AbstractConduit
Returns:
Returns the Configuration Panel object.

getResourceBundleName

protected java.lang.String getResourceBundleName()
Retrieve resource bundle file name.

Specified by:
getResourceBundleName in class AbstractConduit
Returns:
Returns the name of the resource bundle file.

startSync

public void startSync(ConduitHandler conduitHandler,
                      DLPUserInfo user)
               throws NotConnectedException
This method is called when this jConduit is given the opportunity to synchronize.

Specified by:
startSync in class AbstractConduit
Parameters:
user - DLP User Info block.
conduitHandler - he handle to the active ConduitHandler to use for synchronization.
Throws:
NotConnectedException - thrown if the connection to the Palm is lost.

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.

addEmail_connection

public void addEmail_connection(Email_Base email)
Setter for property email_connections.

Parameters:
email - New value of property email_connections.

getInbox

public byte getInbox()
Getter for property inbox.

Returns:
Value of property inbox.

setInbox

public void setInbox(byte inbox)
Setter for property inbox.

Parameters:
inbox - New value of property inbox.

getOutbox

public byte getOutbox()
Getter for property outbox.

Returns:
Value of property outbox.

setOutbox

public void setOutbox(byte outbox)
Setter for property outbox.

Parameters:
outbox - New value of property outbox.

getSent

public byte getSent()
Getter for property sent.

Returns:
Value of property sent.

setSent

public void setSent(byte sent)
Setter for property sent.

Parameters:
sent - New value of property sent.

getConfigPanel

public ConnectionsPanel getConfigPanel()
Getter for property configPanel.

Returns:
Value of property configPanel.

setConfigPanel

public void setConfigPanel(ConnectionsPanel configPanel)
Setter for property configPanel.

Parameters:
configPanel - New value of property configPanel.

getEmailConns

public java.util.Vector getEmailConns()
Getter for property emailConns.

Returns:
Value of property emailConns.

setEmailConns

public void setEmailConns(java.util.Vector emailConns)
Setter for property emailConns.

Parameters:
emailConns - New value of property emailConns.

getConfig

public java.util.Properties getConfig()
Getter for property config.

Returns:
Value of property config.

setConfig

public void setConfig(java.util.Properties config)
Setter for property config.

Parameters:
config - New value of property config.

getVEmails

public java.util.Vector getVEmails()
Getter for property vEmails.

Returns:
Value of property vEmails.

setVEmails

public void setVEmails(java.util.Vector vEmails)
Setter for property vEmails.

Parameters:
vEmails - New value of property vEmails.

readMap

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

Throws:
java.io.IOException - I/O Exception in stream handling.

writeMap

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

Throws:
java.io.IOException - I/O Exception in stream handling.

exists

public boolean exists(java.lang.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.

getMap

public java.util.HashMap getMap()
Getter for property map.

Returns:
Value of property map.

setMap

public void setMap(java.util.HashMap map)
Setter for property map.

Parameters:
map - New value of property map.

getHandler

public ConduitHandler getHandler()
Getter for property handler.

Returns:
Value of property handler.

setHandler

public void setHandler(ConduitHandler handler)
Setter for property handler.

Parameters:
handler - New value of property handler.

jSyncManager

Copyright (c) 1999 - 2004 Brad BARCLAY and others. All Rights Reserved.