Interface IJEMHMailHeaderPreProcTask

    • Method Detail

      • getHeadersHandled

        Set<String> getHeadersHandled()
        Collection of headers that are to be processed
        Returns:
        set of headers handled by the PreProcTask, eg To:
      • filterHeaders

        void filterHeaders​(List<PreProcHeaderBean> headerBeans,
                           byte[] mailContent,
                           int profileId)
                    throws PreProcTaskFailureException
        API exposes the config via ConfigFields rather than entities
        Parameters:
        headerBeans - the List of headers to filter, eg To, Cc. Bean Contains Header Name, Original Value and Updated Value
        mailContent - of the byte[] data of the email
        profileId - to run Against
        Throws:
        PreProcTaskFailureException - if it breaks
      • getDefaultConfig

        List<ConfigField> getDefaultConfig()
        Allow JEMH to create example TaskConfig as need for this task, list is pre-sorted based on weight
        Returns:
        default config for this pre-proc task
      • getDefaultConfig

        List<ConfigField> getDefaultConfig​(int profileId)
        Allow JEMH to create example TaskConfig as need for this task, list is pre-sorted based on weight. Takes a profileId to be able to retrieve profile-specific configuration during task creation (As there is no runtime initialization at this point)
        Parameters:
        profileId - to run Against
        Returns:
        default config for this pre-proc task
      • isScriptSelfTest

        boolean isScriptSelfTest()
        Returns:
        true if is self test enabled (Used for Script Header/Body Pre processing task)
      • isProcessedMultipleHeaders

        boolean isProcessedMultipleHeaders()
        Returns:
        true if multiple headers will be processed (Used for ScriptPreProcTask Header Script Processing)
      • isFilterPostProccessedMail

        boolean isFilterPostProccessedMail()
        Returns:
        true if this pre-proc task should also process the post-processed mail body
      • filterPostProcessedMail

        boolean filterPostProcessedMail​(EmailHeaderUtil emu,
                                        String content)
        Parameters:
        emu - the email header util
        content - the email body after other pre-proc tasks have manipulated headers
        Returns:
        true if updated
      • getWiki

        String getWiki()
        Doc Page of this extension
        Returns:
        Doc Page of this extension
      • getOutcomeReason

        String getOutcomeReason()
        Returns:
        the message for the outcome, if set in a preproc task