psdi.common.emailstner

Class Preprocessor

  • java.lang.Object
    • psdi.common.emailstner.Preprocessor
  • All Implemented Interfaces:
    LSNRPreprocessor


    public class Preprocessor
    extends java.lang.Object
    implements LSNRPreprocessor
    preprocessor class for email listener. This class checks the subject of the email and finds out if a mail is new or not.
    • Constructor Summary

      Constructors 
      Constructor and Description
      Preprocessor() 
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.String getObjectKey(java.lang.String del, java.lang.String subject)
      Returns the object key.
      boolean isNewEmail(java.lang.String del, java.lang.String subject)
      Checks if the mail is a new mail or not If the subject doesn't contain the delimiter then its a new mail else it is a reply to the outbound mail
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Preprocessor

        public Preprocessor()
    • Method Detail

      • isNewEmail

        public boolean isNewEmail(java.lang.String del,
                                  java.lang.String subject)
                           throws java.lang.Exception
        Checks if the mail is a new mail or not If the subject doesn't contain the delimiter then its a new mail else it is a reply to the outbound mail
        Specified by:
        isNewEmail in interface LSNRPreprocessor
        Parameters:
        del -
        subject -
        Returns:
        true if new email else false
        Throws:
        java.lang.Exception
      • getObjectKey

        public java.lang.String getObjectKey(java.lang.String del,
                                             java.lang.String subject)
                                      throws java.lang.Exception
        Returns the object key. Parse the subject of the email and get the key value If the subject contains ##KEY## then return the key. In this case ## is the object key delimiter
        Specified by:
        getObjectKey in interface LSNRPreprocessor
        Parameters:
        del -
        subject -
        Returns:
        Key value
        Throws:
        java.lang.Exception