public class

MailItemEntry

extends MediaEntry<E extends BaseEntry<E>>
java.lang.Object
   ↳ com.google.gdata.data.AbstractExtension
     ↳ com.google.gdata.data.ExtensionPoint
       ↳ com.google.gdata.data.BaseEntry<E extends com.google.gdata.data.BaseEntry>
         ↳ com.google.gdata.data.media.MediaEntry<E extends com.google.gdata.data.BaseEntry<E>>
           ↳ com.google.gdata.data.appsforyourdomain.migration.MailItemEntry

Class Overview

Used by a MailItemFeedProvider to represent a single MailItemEntry in a list of MailItems. MailItems are representations of email messages from a domain's legacy systems destined for Google.

Summary

Constants
String MAILITEM_KIND Kind term value for MailItem category labels.
Fields
public static final Category MAILITEM_CATEGORY Kind category used to label feeds or entries that have MailItem extension data.
[Expand]
Inherited Fields
From class com.google.gdata.data.BaseEntry
From class com.google.gdata.data.ExtensionPoint
From class com.google.gdata.data.AbstractExtension
Public Constructors
MailItemEntry()
Constructs a new MailItemEntry instance
MailItemEntry(BaseEntry<MailItemEntry> sourceEntry)
Constructs a new MailItemEntry instance by doing a shallow copy of data from an existing BaseEntry instance.
Public Methods
void addLabel(Label label)
Adds a label to this MailItem
void addMailProperty(MailItemProperty mailProperty)
Sets mail settings (read status, starred status, etc.) for this message.
void addRecipient(Email recipient)
Adds a recipient email to the Mail Item.
void declareExtensions(ExtensionProfile extProfile)
Initializes an ExtensionProfile based upon the extensions expected by a MailItemEntry.
List<Label> getLabels()
List<MailItemProperty> getMailProperties()
List<Email> getRecipients()
This is relevant only for multi recipient feed.
Rfc822Msg getRfc822Msg()
void setRfc822Msg(Rfc822Msg rfc822Msg)
Sets the rfc822Msg for this MailItem
[Expand]
Inherited Methods
From class com.google.gdata.data.media.MediaEntry
From class com.google.gdata.data.BaseEntry
From class com.google.gdata.data.ExtensionPoint
From class com.google.gdata.data.AbstractExtension
From class java.lang.Object
From interface com.google.gdata.data.Extension
From interface com.google.gdata.data.IAtom
From interface com.google.gdata.data.IEntry
From interface com.google.gdata.data.Kind.Adaptable
From interface com.google.gdata.data.Kind.Adaptor
From interface com.google.gdata.data.media.IMediaEntry

Constants

public static final String MAILITEM_KIND

Kind term value for MailItem category labels.

Constant Value: "http://schemas.google.com/apps/2006#mailItem"

Fields

public static final Category MAILITEM_CATEGORY

Kind category used to label feeds or entries that have MailItem extension data.

Public Constructors

public MailItemEntry ()

Constructs a new MailItemEntry instance

public MailItemEntry (BaseEntry<MailItemEntry> sourceEntry)

Constructs a new MailItemEntry instance by doing a shallow copy of data from an existing BaseEntry instance.

Parameters
sourceEntry The BaseEntry object to copy from

Public Methods

public void addLabel (Label label)

Adds a label to this MailItem

Parameters
label The label to add to the message when it is imported into GMail

public void addMailProperty (MailItemProperty mailProperty)

Sets mail settings (read status, starred status, etc.) for this message.

Parameters
mailProperty

public void addRecipient (Email recipient)

Adds a recipient email to the Mail Item.

Parameters
recipient The recipient email to be attached with the message

public void declareExtensions (ExtensionProfile extProfile)

Initializes an ExtensionProfile based upon the extensions expected by a MailItemEntry.

Parameters
extProfile The ExtensionProfile to initialize.

public List<Label> getLabels ()

Returns
  • a list of Labels to be applied to this message upon insertion in GMail

public List<MailItemProperty> getMailProperties ()

Returns
  • the mail settings (read status, starred status, etc.) of the mail message

public List<Email> getRecipients ()

This is relevant only for multi recipient feed. The single recipient case will not contain the email address of recipient.

Returns
  • a list of recipients' email addresses for this mail item

public Rfc822Msg getRfc822Msg ()

Returns
  • the rfc822 compliant encoding of the mail message

public void setRfc822Msg (Rfc822Msg rfc822Msg)

Sets the rfc822Msg for this MailItem

Parameters
rfc822Msg