Class SubscriptionInfo


  • public class SubscriptionInfo
    extends java.lang.Object
    Info struct for email subscriptions.
    • Field Detail

      • 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

      • getFilter

        public IFilter<Email> getFilter()
        Get the filter.
        Returns:
        The filter.
      • 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.