jSyncManager

org.jSyncManager.API.Protocol.Util.StdApps
Class MailRecord

java.lang.Object
  |
  +--org.jSyncManager.API.Protocol.Util.DLPRecord
        |
        +--org.jSyncManager.API.Protocol.Util.StdApps.MailRecord
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
Email_Base

public class MailRecord
extends DLPRecord

Record parser/generater for the Mail Database record format.

Version:
$Revision: 1.19 $
Author:
Brad BARCLAY <bbarclay@jsyncmanager.org>
Last modified by: $Author: yaztromo $ on $Date: 2003/05/13 19:29:46 $.
See Also:
Serialized Form

Field Summary
static byte ADDRESSING_FLAG
          A mask for the message addressing flags.
static int ADDRESSING_FLAG_ROTATE
          A bit-rotation value for the addressing flags.
static int ADDRESSING_SENT_BCC
          An addressing flag denoting this message contains a Blind Carbon-Copy line.
static int ADDRESSING_SENT_CC
          An addressing flag denoting this message contains a Corbon-Copy line.
static int ADDRESSING_SENT_TO
          An addressing flag denoting this message contains a Sent-To line.
static byte CONFIRM_DELIVERY_FLAG
          A flag to denote that this record wnats a confirmation of delivery.
static int CONFIRM_DELIVERY_FLAG_ROTATE
          A bit-rotation value for confirm delivery flag.
static byte CONFIRM_READ_FLAG
          A flag to denote that this record wants a confirmation that the message has been read.
static int CONFIRM_READ_FLAG_ROTATE
          A bit-rotation value for the read confirmation flag.
static byte PRIORITY_FLAG
          A mask for the message priority flags.
static int PRIORITY_FLAG_ROTATE
          A bit-rotation value for the priority flags.
static byte PRIORITY_HIGH
          A flag to denote that this record has high priority.
static byte PRIORITY_LOW
          A flag to denote that this record has low priority.
static byte PRIORITY_NORMAL
          A flag to denote that this record has normal priority.
protected static java.util.ResourceBundle rb
           
static byte READ_FLAG
          A flag to denote that this record has been read.
static int READ_FLAG_ROTATE
          A bit-rotation value for the read flag.
static byte SIGNATURE_FLAG
          A flag to denote that this record uses the users signature.
static int SIGNATURE_FLAG_ROTATE
          A bit-rotation value for the signature flag.
 
Fields inherited from class org.jSyncManager.API.Protocol.Util.DLPRecord
ARCHIVED, attributes, BUSY, category, data, DATA_INCLUDED, DELETE_ALL_IN_CATEGORY, DELETE_ALL_RECORDS, DELETED, DIRTY, index, inputData, recordID, recordSize, SECRET, SORT_DATABASE
 
Constructor Summary
MailRecord()
          MailRecord default constructor.
MailRecord(DLPRecord record)
          Construct a new MailRecord from the specified DLPRecord.
 
Method Summary
protected  void generateData()
          Generate the raw data block from the existing fields.
 int getAddressing()
          Get the addressing message flag.
 java.lang.String getBCC()
          Get the BCC address value.
 java.lang.String getCC()
          Get the CC address value.
 boolean getConfirmDeliveryFlag()
          Get the Confirm Delivery message flag.
 boolean getConfirmReadFlag()
          Get the Confirm Read message flag.
 byte getFlags()
          Get the flags values.
 java.lang.String getFrom()
          Get the From address value.
 java.lang.String getMessageBody()
          Get the message body value.
 int getPriority()
          Get the message Priority value.
 boolean getReadFlag()
          Get the read message flag.
 java.lang.String getReplyTo()
          Get the ReplyTo address value.
 java.lang.String getSentTo()
          Get the SentTo address value.
 boolean getSignatureFlag()
          Get the signature message flag.
 java.lang.String getSubject()
          Get the Subject value.
 java.util.Calendar getTime()
          Get the message time value as a Calendar object.
 java.lang.String getTo()
          Get the To address value.
protected  void parseFields()
          Parse the data fields.
 void setAddressing(int addressing)
          Set the addressing message value from an int value.
 void setBCC(java.lang.String s)
          Set the BCC value from a String object.
 void setCC(java.lang.String s)
          Set the CC value from a String object.
 void setConfirmDeliveryFlag(boolean b)
          Set the confirm delivary message flag.
 void setConfirmReadFlag(boolean b)
          Set the confirm read message flag.
 void setFlags(byte newflags)
          Set the message flag values from a byte value.
 void setFrom(java.lang.String s)
          Set the From value from a String object.
 void setMessageBody(java.lang.String s)
          Set the message body value from a String object.
 void setPriority(int priority)
          Set the message priority from an int value.
 void setReadFlag(boolean b)
          Set the read message flag.
 void setRecord(MailRecord record)
          Set the MailRecord information from the given MailRecord.
 void setReplyTo(java.lang.String s)
          Set the ReplyTo value from a String object.
 void setSentTo(java.lang.String s)
          Set the SentTo value from a String object.
 void setSignatureFlag(boolean b)
          Set the signature message flag.
 void setSubject(java.lang.String s)
          Set the subject value from a String object.
 void setTime(java.util.Calendar s)
          Set the time value from a Calendar object.
 void setTo(java.lang.String s)
          Set the To value from a String object.
 java.lang.String toString()
          Return a human-readable String representation of this MailRecord.
 
Methods inherited from class org.jSyncManager.API.Protocol.Util.DLPRecord
checkAttribute, getAttributes, getCategory, getData, getIndex, getRecordID, getRecordSize, setAttributes, setCategory, setData, setIndex, setRecordID, setRecordSize
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

rb

protected static java.util.ResourceBundle rb

PRIORITY_HIGH

public static final byte PRIORITY_HIGH
A flag to denote that this record has high priority.

PRIORITY_NORMAL

public static final byte PRIORITY_NORMAL
A flag to denote that this record has normal priority.

PRIORITY_LOW

public static final byte PRIORITY_LOW
A flag to denote that this record has low priority.

READ_FLAG

public static final byte READ_FLAG
A flag to denote that this record has been read.

SIGNATURE_FLAG

public static final byte SIGNATURE_FLAG
A flag to denote that this record uses the users signature.

CONFIRM_READ_FLAG

public static final byte CONFIRM_READ_FLAG
A flag to denote that this record wants a confirmation that the message has been read.

CONFIRM_DELIVERY_FLAG

public static final byte CONFIRM_DELIVERY_FLAG
A flag to denote that this record wnats a confirmation of delivery.

PRIORITY_FLAG

public static final byte PRIORITY_FLAG
A mask for the message priority flags.

ADDRESSING_FLAG

public static final byte ADDRESSING_FLAG
A mask for the message addressing flags.

READ_FLAG_ROTATE

public static final int READ_FLAG_ROTATE
A bit-rotation value for the read flag.

SIGNATURE_FLAG_ROTATE

public static final int SIGNATURE_FLAG_ROTATE
A bit-rotation value for the signature flag.

CONFIRM_READ_FLAG_ROTATE

public static final int CONFIRM_READ_FLAG_ROTATE
A bit-rotation value for the read confirmation flag.

CONFIRM_DELIVERY_FLAG_ROTATE

public static final int CONFIRM_DELIVERY_FLAG_ROTATE
A bit-rotation value for confirm delivery flag.

PRIORITY_FLAG_ROTATE

public static final int PRIORITY_FLAG_ROTATE
A bit-rotation value for the priority flags.

ADDRESSING_FLAG_ROTATE

public static final int ADDRESSING_FLAG_ROTATE
A bit-rotation value for the addressing flags.

ADDRESSING_SENT_TO

public static final int ADDRESSING_SENT_TO
An addressing flag denoting this message contains a Sent-To line.

ADDRESSING_SENT_CC

public static final int ADDRESSING_SENT_CC
An addressing flag denoting this message contains a Corbon-Copy line.

ADDRESSING_SENT_BCC

public static final int ADDRESSING_SENT_BCC
An addressing flag denoting this message contains a Blind Carbon-Copy line.
Constructor Detail

MailRecord

public MailRecord()
MailRecord default constructor.

MailRecord

public MailRecord(DLPRecord record)
Construct a new MailRecord from the specified DLPRecord.
Parameters:
record - a DLPRecord object read from the Mail database.
Method Detail

setRecord

public void setRecord(MailRecord record)
Set the MailRecord information from the given MailRecord.
Parameters:
record - the MailRecord information from the given MailRecord.

parseFields

protected void parseFields()
Parse the data fields.
Overrides:
parseFields in class DLPRecord

generateData

protected void generateData()
Generate the raw data block from the existing fields.
Overrides:
generateData in class DLPRecord

getTime

public java.util.Calendar getTime()
Get the message time value as a Calendar object.
Returns:
the message time value as a Calendar object.

getSubject

public java.lang.String getSubject()
Get the Subject value.
Returns:
the Subject value.

getFrom

public java.lang.String getFrom()
Get the From address value.
Returns:
the From address value.

getTo

public java.lang.String getTo()
Get the To address value.
Returns:
the To address value.

getCC

public java.lang.String getCC()
Get the CC address value.
Returns:
the CC address value.

getBCC

public java.lang.String getBCC()
Get the BCC address value.
Returns:
the BCC address value.

getReplyTo

public java.lang.String getReplyTo()
Get the ReplyTo address value.
Returns:
the ReplyTo address value.

getSentTo

public java.lang.String getSentTo()
Get the SentTo address value.
Returns:
the SentTo address value.

getMessageBody

public java.lang.String getMessageBody()
Get the message body value.
Returns:
the message body value.

getFlags

public byte getFlags()
Get the flags values.
Returns:
the flags values.

setTime

public void setTime(java.util.Calendar s)
Set the time value from a Calendar object.
Returns:
s the time value for this record.

setSubject

public void setSubject(java.lang.String s)
Set the subject value from a String object.
Returns:
s the subject value for this object.

setFrom

public void setFrom(java.lang.String s)
Set the From value from a String object.
Returns:
s the From value for this object.

setTo

public void setTo(java.lang.String s)
Set the To value from a String object.
Returns:
s the To value for this object.

setCC

public void setCC(java.lang.String s)
Set the CC value from a String object.
Returns:
s the CC value for this object.

setBCC

public void setBCC(java.lang.String s)
Set the BCC value from a String object.
Returns:
s the BCC vlue for this object.

setReplyTo

public void setReplyTo(java.lang.String s)
Set the ReplyTo value from a String object.
Returns:
s the Reply-To value for this object.

setSentTo

public void setSentTo(java.lang.String s)
Set the SentTo value from a String object.
Returns:
s the SentTo value for this object.

setMessageBody

public void setMessageBody(java.lang.String s)
Set the message body value from a String object.
Returns:
s the message body for this object.

setFlags

public void setFlags(byte newflags)
Set the message flag values from a byte value.
Returns:
newflags the message flags for this object.

getReadFlag

public boolean getReadFlag()
Get the read message flag.
Returns:
true if this message has been read, false otherwise.

getSignatureFlag

public boolean getSignatureFlag()
Get the signature message flag.
Returns:
true if this message requires the users signature be attached prior to transmission, false otherwise.

getConfirmReadFlag

public boolean getConfirmReadFlag()
Get the Confirm Read message flag.
Returns:
true if the user wishes confirmation that this message was read by the recipient, false otherwise.

getConfirmDeliveryFlag

public boolean getConfirmDeliveryFlag()
Get the Confirm Delivery message flag.
Returns:
true if the user has requested confirmation that the message has been delivered, false otherwise.

getPriority

public int getPriority()
Get the message Priority value.
Returns:
the messages priority value.

getAddressing

public int getAddressing()
Get the addressing message flag.
Returns:
the addressing message flag.

setReadFlag

public void setReadFlag(boolean b)
Set the read message flag.
Parameters:
b - true if this message has been read by the user, false otherwise.

setSignatureFlag

public void setSignatureFlag(boolean b)
Set the signature message flag.
Parameters:
b - true if this message requires attachment of the users signature, false otherwise.

setConfirmReadFlag

public void setConfirmReadFlag(boolean b)
Set the confirm read message flag.
Parameters:
b - true if this message requests read confirmation, false otherwise.

setConfirmDeliveryFlag

public void setConfirmDeliveryFlag(boolean b)
Set the confirm delivary message flag.
Parameters:
b - true if this message requests delivery confirmation, false otherwise.

setPriority

public void setPriority(int priority)
                 throws java.lang.IndexOutOfBoundsException
Set the message priority from an int value.
Parameters:
priority - the new priority value.
Throws:
java.lang.IndexOutOfBoundsException - thrown if the priority value is invalid.

setAddressing

public void setAddressing(int addressing)
                   throws java.lang.IndexOutOfBoundsException
Set the addressing message value from an int value.
Parameters:
addressing - the addressing info for this record.
Throws:
java.lang.IndexOutOfBoundsException - if the addressing info is invalid.

toString

public java.lang.String toString()
Return a human-readable String representation of this MailRecord.
Overrides:
toString in class DLPRecord
Returns:
a String representation of this MailRecord.

jSyncManager

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