psdi.common.emailstner

Class LSNRActionHelper

  • java.lang.Object
    • psdi.common.emailstner.LSNRActionHelper


  • public class LSNRActionHelper
    extends java.lang.Object
    Class for processing email message and error messages
    • Constructor Detail

      • LSNRActionHelper

        public LSNRActionHelper()
    • Method Detail

      • requiredFieldsExist

        public boolean requiredFieldsExist(MboRemote actionObject,
                                           long uniqueId)
                                    throws MXException
        Checks if all required field have value before creating service request,incident or problem
        Parameters:
        actionObject -
        uniqueId -
        Returns:
        true if all required fields has value else false
        Throws:
        MXException
      • createCommLog

        public void createCommLog(MboRemote inboundComm,
                                  MboRemote actionObject)
                           throws MXException
        creats a commlog entry
        Parameters:
        inboundComm -
        actionObject -
        templateName -
        Throws:
        MXException
      • createDocLinkForCommLog

        public void createDocLinkForCommLog(MboRemote inboundComm,
                                            MboRemote commlog)
                                     throws MXException
        Create doclinks entry for COMMLOG
        Parameters:
        inboundcomm -
        commlog -
        Throws:
        java.lang.Exception
        MXException
      • updateDoclinkForActionObject

        public void updateDoclinkForActionObject(MboRemote inboundComm,
                                                 MboRemote actionObject)
                                          throws MXException
        Updates the doclink entry for the action object specified in message body
        Parameters:
        inboundComm -
        actionObject -
        Throws:
        MXException
      • updateStatusAndSendMail

        public void updateStatusAndSendMail(MboRemote inboundComm,
                                            java.lang.String status,
                                            java.lang.String msgStr,
                                            java.lang.String templateName)
                                     throws MXException
        Updates the status of inboundcomm and sends a mail to sender/admin
        Parameters:
        inboundComm -
        status -
        msgStr -
        templateName -
        Throws:
        MXException
      • convertToDate

        public java.util.Date convertToDate(int type,
                                            java.lang.String value,
                                            UserInfo u)
                                     throws java.lang.Exception
        Convert the string to a date object
        Parameters:
        attr -
        value -
        uniqueId -
        Returns:
        date object
        Throws:
        MXException
        java.lang.Exception
      • updateObject

        public MboRemote updateObject(InboundCommRemote inboundComm,
                                      MboRemote objectRemote)
                               throws MXException
        Update sr,incident,problem with message body attributes
        Parameters:
        inboundComm -
        objectRemote -
        Returns:
        updated sr,incident or problem record
        Throws:
        MXException
      • performSecuityCheck

        public boolean performSecuityCheck(InboundCommRemote inboundComm,
                                           MboRemote objectMbo)
                                    throws java.lang.Exception
        Perform security check for the object and action specified in message body
        Parameters:
        inboundComm -
        formatMode -
        Throws:
        java.lang.Exception
      • authExistForObjectAndAction

        public boolean authExistForObjectAndAction(InboundCommRemote inboundComm,
                                                   MboRemote objectRemote,
                                                   java.lang.String action,
                                                   java.lang.String objectName)
                                            throws MXException
        Check for given site authorization exist or not
        Parameters:
        inboundComm -
        objectRemote -
        action -
        objectName -
        Returns:
        true if authorization exists else false
        Throws:
        MXException
      • setExtraAttrValuesForInsert

        public void setExtraAttrValuesForInsert(java.util.HashMap map)
                                         throws java.lang.Exception
        Sets extra attribute-value pair for CREATE action Should be called before createObject call
        Parameters:
        map -
        Throws:
        java.lang.Exception
      • setExtraAttrValuesForUpdate

        public void setExtraAttrValuesForUpdate(java.util.HashMap map)
                                         throws java.lang.Exception
        Sets extra attribute-value pair for UPDATE action Should be called before updateObject call
        Parameters:
        map -
        Throws:
        java.lang.Exception
      • updateInbCommAfterAction

        public void updateInbCommAfterAction(InboundCommRemote inboundComm,
                                             MboRemote objectRemote)
                                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • handleException

        public void handleException(java.lang.String objectName,
                                    java.lang.Exception ee,
                                    MboRemote inboundComm,
                                    java.lang.String action)
                             throws java.lang.Exception
        Method called during exception of actions.
        Parameters:
        objectName -
        ee -
        inboundComm -
        action -
        Throws:
        java.lang.Exception