Class RequestEMailProcessor

  • All Implemented Interfaces:
    ProcessCall, EmailSrv.ProcessEmailHandle

    public class RequestEMailProcessor
    extends SvrProcess
    implements EmailSrv.ProcessEmailHandle
    Request Email Processor
    Version:
    $Id: RequestEMailProcessor.java,v 1.2 2006/10/23 06:01:20 cruiz Exp $ hieplq:separate email process to other class for easy re-use and do IDEMPIERE-2244 IMAPHost format: {imap|imaps}://[IMAPHostURL]:[Port] example: imaps://imap.gmail.com:993
    Author:
    Carlos Ruiz based on initial work by Jorg Janke - sponsored by DigitalArmour
    • Field Detail

      • p_IMAPHost

        protected String p_IMAPHost
      • p_IMAPPort

        protected int p_IMAPPort
      • p_IMAPUser

        protected String p_IMAPUser
      • p_IMAPPwd

        protected String p_IMAPPwd
      • p_RequestFolder

        protected String p_RequestFolder
      • p_InboxFolder

        protected String p_InboxFolder
      • p_NestInbox

        protected Boolean p_NestInbox
      • p_ErrorFolder

        protected String p_ErrorFolder
      • C_BPartner_ID

        protected int C_BPartner_ID
      • AD_User_ID

        protected int AD_User_ID
      • AD_Role_ID

        protected int AD_Role_ID
      • SalesRep_ID

        protected int SalesRep_ID
      • R_RequestType_ID

        protected int R_RequestType_ID
      • p_DefaultPriority

        protected String p_DefaultPriority
      • p_DefaultConfidentiality

        protected String p_DefaultConfidentiality
      • p_HTMLAttachmentType

        protected String p_HTMLAttachmentType
      • noProcessed

        protected int noProcessed
      • noRequest

        protected int noRequest
      • noError

        protected int noError
      • m_session

        protected javax.mail.Session m_session
        Session
      • m_store

        protected javax.mail.Store m_store
        Store
      • errorFolder

        protected javax.mail.Folder errorFolder
      • requestFolder

        protected javax.mail.Folder requestFolder
      • lsFolderProcess

        protected List<javax.mail.Folder> lsFolderProcess
    • Constructor Detail

      • RequestEMailProcessor

        public RequestEMailProcessor()
    • Method Detail

      • prepare

        protected void prepare()
        Prepare - e.g., get Parameters.
        Specified by:
        prepare in class SvrProcess
      • parseParameter

        protected void parseParameter()
      • checkInputParameter

        protected void checkInputParameter​(EmailSrv emailSrv)
                                    throws javax.mail.MessagingException,
                                           Exception
        Throws:
        javax.mail.MessagingException
        Exception
      • checkEmailHeader

        public boolean checkEmailHeader​(EmailSrv.EmailContent emailHeader,
                                        javax.mail.Message emailRaw)
                                 throws javax.mail.MessagingException
        Description copied from interface: EmailSrv.ProcessEmailHandle
        after read header of email (from, subject, message_id,...), will call this function to evaluate will continue process or cancel this email at this time, in EmailInfo just has header info, content and attach is not manipulate
        Specified by:
        checkEmailHeader in interface EmailSrv.ProcessEmailHandle
        Returns:
        Throws:
        javax.mail.MessagingException
      • processEmailError

        public void processEmailError​(EmailSrv.EmailContent emailHeader,
                                      javax.mail.Message emailRaw,
                                      javax.mail.Store mailStore,
                                      javax.mail.Folder mailFolder)
                               throws javax.mail.MessagingException
        Description copied from interface: EmailSrv.ProcessEmailHandle
        when read email for process, after some time try when has error, will call this function to ensure this email is can't process
        Specified by:
        processEmailError in interface EmailSrv.ProcessEmailHandle
        Throws:
        javax.mail.MessagingException