Package jadex.platform.service.email
Class SubscriptionInfo
- java.lang.Object
-
- jadex.platform.service.email.SubscriptionInfo
-
public class SubscriptionInfo extends java.lang.Object
Info struct for email subscriptions.
-
-
Field Summary
Fields Modifier and Type Field Description protected EmailAccount
account
The account.protected IFilter<Email>
filter
The filter.protected boolean
fullconv
Flag if full email conversion is necessary for filtering.protected Email
lastseenmsg
protected int
lastseenno
protected int
total
The 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 void
collectParts(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 Email
convertBodyMessage(javax.mail.Message msg, Email email)
Convert an email message to the simple jadex email format.protected Email
convertHeaderMessage(javax.mail.Message msg, Email email)
Convert an email message to the simple jadex email format.protected Email
convertMessage(javax.mail.Message msg)
Convert an email message to the simple jadex email format.protected Email
convertSubjectMessage(javax.mail.Message msg, Email email)
Convert an email message to the simple jadex email format.EmailAccount
getAccount()
Get the account.IFilter<Email>
getFilter()
Get the filter.Email
getLastSeenMsg()
Get the lastseenmsg.int
getLastSeenNo()
Get the lastseenno.java.util.List<Email>
getNewEmails()
Fetch new emails from the inbox.int
getTotal()
Get the total.void
setAccount(EmailAccount account)
Set the account.void
setFilter(IFilter<Email> filter)
Set the filter.void
setLastSeenMsg(Email lastseenmsg)
Set the lastseenmsg.void
setLastSeenNo(int lastseenno)
Set the lastseenno.void
setTotal(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.MessagingException
java.io.IOException
-
convertAddresses
protected java.lang.String[] convertAddresses(javax.mail.Address[] addrs)
Convert email addresses to strings.
-
-