|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.java.sip.communicator.impl.protocol.jabber.extensions.mailnotification.MailThreadInfo
public class MailThreadInfo
This class represents the "mail-thread-info" element the Google use in their mail notifications to deliver detailed thread information.
| Nested Class Summary | |
|---|---|
class |
MailThreadInfo.Sender
The class describes a single participant in this email thread. |
| Field Summary | |
|---|---|
static String |
ELEMENT_NAME
The name of the "mail-thread-info" element. |
static String |
LABELS_ELEMENT_NAME
The name of the XML tag element containing a pipe separated list of labels assigned to this thread. |
static int |
PARTICIPATION_NONE
Indicates that the local user has not participated in this thread. |
static int |
PARTICIPATION_ONE_OF_MANY
Indicates that the user is one of many recipients listed in the thread. |
static int |
PARTICIPATION_SOLE_RECIPIENT
PARTICIPATION_SOLE_RECIPIENT indicates that the user is the sole recipient for messages in this thread. |
static String |
SENDERS_ELEMENT_NAME
The name of the XML tag element containing the list of all senders. |
static String |
SNIPPET_ELEMENT_NAME
The name of the XML tag element containing a snippet of the thread. |
static String |
SUBJECT_ELEMENT_NAME
The name of the XML tag element containing the thread subject. |
| Constructor Summary | |
|---|---|
MailThreadInfo()
|
|
| Method Summary | |
|---|---|
protected void |
addSender(MailThreadInfo.Sender sender)
Adds sender to the list of senders in this thread. |
String |
createHtmlDescription()
Creates an html description (table rows) of the specified thread. |
String |
findOriginator(boolean firstNameOnly)
Returns the sender that initiated the thread or the first sender in the list if for some reason we couldn't determine the originator. |
long |
getDate()
Returns the date of the most recent message in this thread. |
String |
getLabels()
Returns a pipe ('|') delimited list of labels applied to this thread. |
int |
getMessageCount()
Returns the number of messages in this thread. |
int |
getParticipation()
Returns the participation index for this thread. |
int |
getSenderCount()
Returns the number of people that have been posting in this thread. |
String |
getSnippet()
Returns an html-encoded snippet from the body of the email. |
String |
getSubject()
Returns the subject of this e-mail thread. |
String |
getTid()
Returns the ID of this thread. |
int |
getUnreadSenderCount()
Returns the number of people that have been posting in this thread and that we have unread messages from. |
String |
getURL()
Returns an URL linking to this thread. |
static MailThreadInfo |
parse(org.xmlpull.v1.XmlPullParser parser)
Creates and initializes a MailThreadInfo instance according to the details that come with the parser. |
Iterator<MailThreadInfo.Sender> |
senders()
Returns an iterator over a list of one or more sender instances, each of which describes a participant in this thread. |
protected void |
setDate(long date)
Sets the date of the most recent message in this thread. |
protected void |
setLabels(String labels)
Sets a pipe ('|') delimited list of labels that apply to this thread. |
protected void |
setMessageCount(int messageCount)
Sets the number of messages in this thread. |
protected void |
setParticipation(int participation)
Specifies the participation index for this thread. |
protected void |
setSnippet(String snippet)
Sets an html-encoded snippet from the body of the email. |
protected void |
setSubject(String subject)
Sets the subject of this e-mail thread. |
protected void |
setTid(String tid)
Specifies the ID of this thread. |
protected void |
setURL(String url)
Sets an URL linking to this thread. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String ELEMENT_NAME
public static final String SENDERS_ELEMENT_NAME
public static final String LABELS_ELEMENT_NAME
public static final String SUBJECT_ELEMENT_NAME
public static final String SNIPPET_ELEMENT_NAME
public static final int PARTICIPATION_NONE
public static final int PARTICIPATION_ONE_OF_MANY
public static final int PARTICIPATION_SOLE_RECIPIENT
| Constructor Detail |
|---|
public MailThreadInfo()
| Method Detail |
|---|
public int getParticipation()
protected void setParticipation(int participation)
participation - one of the PARTICIPATION_XXX values defines in this
class and indicating whether the local is the sole, one of many or not a
participant of this thread.public Iterator<MailThreadInfo.Sender> senders()
public int getSenderCount()
public int getUnreadSenderCount()
public String findOriginator(boolean firstNameOnly)
firstNameOnly - use only first name
protected void addSender(MailThreadInfo.Sender sender)
sender - the sender that we are adding.public int getMessageCount()
protected void setMessageCount(int messageCount)
messageCount - the number of messages in this thread.public long getDate()
protected void setDate(long date)
date - a timestamp of the most recent message in this thread.public String getURL()
protected void setURL(String url)
url - the URL linking to this particular thread.public String getLabels()
protected void setLabels(String labels)
labels - a pipe ('|') delimited list of labels that apply to this
thread.public String getTid()
protected void setTid(String tid)
tid - the ID of this thread.public String getSubject()
protected void setSubject(String subject)
subject - the subject of this e-mail thread.public String getSnippet()
protected void setSnippet(String snippet)
snippet - an html-encoded snippet from the body of the email.
public static MailThreadInfo parse(org.xmlpull.v1.XmlPullParser parser)
throws org.xmlpull.v1.XmlPullParserException,
NumberFormatException,
IOException
parser - the parse that we are to read the MailThreadInfo
from.
org.xmlpull.v1.XmlPullParserException - if something goes wrong while parsing
the document.
NumberFormatException - in case we fail to parse any of the
elements that we expect to be numerical.
IOException - in case reading the input xml fails.public String createHtmlDescription()
|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||