Package jadex.platform.service.email
Class SubscriptionInfo
- java.lang.Object
-
- jadex.platform.service.email.SubscriptionInfo
-
public class SubscriptionInfo extends java.lang.ObjectInfo struct for email subscriptions.
-
-
Field Summary
Fields Modifier and Type Field Description protected EmailAccountaccountThe account.protected IFilter<Email>filterThe filter.protected booleanfullconvFlag if full email conversion is necessary for filtering.protected Emaillastseenmsgprotected intlastseennoprotected inttotalThe number of messages in the folder.
-
Constructor Summary
Constructors Constructor Description SubscriptionInfo(IFilter<Email> filter, EmailAccount account, boolean fullconv)Create a new subscription info.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcollectParts(javax.mail.Multipart multipart, java.util.List<java.lang.String> contents, java.util.List<java.lang.Object> attachments)protected java.lang.String[]convertAddresses(javax.mail.Address[] addrs)Convert email addresses to strings.protected EmailconvertBodyMessage(javax.mail.Message msg, Email email)Convert an email message to the simple jadex email format.protected EmailconvertHeaderMessage(javax.mail.Message msg, Email email)Convert an email message to the simple jadex email format.protected EmailconvertMessage(javax.mail.Message msg)Convert an email message to the simple jadex email format.protected EmailconvertSubjectMessage(javax.mail.Message msg, Email email)Convert an email message to the simple jadex email format.EmailAccountgetAccount()Get the account.IFilter<Email>getFilter()Get the filter.EmailgetLastSeenMsg()Get the lastseenmsg.intgetLastSeenNo()Get the lastseenno.java.util.List<Email>getNewEmails()Fetch new emails from the inbox.intgetTotal()Get the total.voidsetAccount(EmailAccount account)Set the account.voidsetFilter(IFilter<Email> filter)Set the filter.voidsetLastSeenMsg(Email lastseenmsg)Set the lastseenmsg.voidsetLastSeenNo(int lastseenno)Set the lastseenno.voidsetTotal(int total)Set the total.
-
-
-
Field Detail
-
account
protected EmailAccount account
The account.
-
fullconv
protected boolean fullconv
Flag if full email conversion is necessary for filtering.
-
total
protected int total
The number of messages in the folder.
-
lastseenno
protected int lastseenno
-
lastseenmsg
protected Email lastseenmsg
-
-
Constructor Detail
-
SubscriptionInfo
public SubscriptionInfo(IFilter<Email> filter, EmailAccount account, boolean fullconv)
Create a new subscription info.
-
-
Method Detail
-
setFilter
public void setFilter(IFilter<Email> filter)
Set the filter.- Parameters:
filter- The filter to set.
-
getAccount
public EmailAccount getAccount()
Get the account.- Returns:
- The account.
-
setAccount
public void setAccount(EmailAccount account)
Set the account.- Parameters:
account- The account to set.
-
getTotal
public int getTotal()
Get the total. return The total.
-
setTotal
public void setTotal(int total)
Set the total.- Parameters:
total- The total to set.
-
getLastSeenNo
public int getLastSeenNo()
Get the lastseenno. return The lastseenno.
-
setLastSeenNo
public void setLastSeenNo(int lastseenno)
Set the lastseenno.- Parameters:
lastseenno- The lastseenno to set.
-
getLastSeenMsg
public Email getLastSeenMsg()
Get the lastseenmsg. return The lastseenmsg.
-
setLastSeenMsg
public void setLastSeenMsg(Email lastseenmsg)
Set the lastseenmsg.- Parameters:
lastseenmsg- The lastseenmsg to set.
-
getNewEmails
public java.util.List<Email> getNewEmails()
Fetch new emails from the inbox.
-
convertMessage
protected Email convertMessage(javax.mail.Message msg)
Convert an email message to the simple jadex email format.
-
convertSubjectMessage
protected Email convertSubjectMessage(javax.mail.Message msg, Email email)
Convert an email message to the simple jadex email format.
-
convertHeaderMessage
protected Email convertHeaderMessage(javax.mail.Message msg, Email email)
Convert an email message to the simple jadex email format.
-
convertBodyMessage
protected Email convertBodyMessage(javax.mail.Message msg, Email email)
Convert an email message to the simple jadex email format.
-
collectParts
protected void collectParts(javax.mail.Multipart multipart, java.util.List<java.lang.String> contents, java.util.List<java.lang.Object> attachments) throws javax.mail.MessagingException, java.io.IOException- Throws:
javax.mail.MessagingExceptionjava.io.IOException
-
convertAddresses
protected java.lang.String[] convertAddresses(javax.mail.Address[] addrs)
Convert email addresses to strings.
-
-