Interface IJEMHMailHeaderPreProcTask
-
- All Superinterfaces:
IJEMHModuleProvider
public interface IJEMHMailHeaderPreProcTask extends IJEMHModuleProvider
Definition of filters for JEMH.- Author:
- andy
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringfilterHeader(String header, String value, IJEMHRuntimeConfig config, List<ConfigField> taskConfig)API exposes the config via ConfigFields rather than entitiesvoidfilterHeaders(List<PreProcHeaderBean> headerBeans, byte[] mailContent, int profileId)API exposes the config via ConfigFields rather than entitiesbooleanfilterPostProcessedMail(EmailHeaderUtil emu, String content)List<ConfigField>getDefaultConfig()Allow JEMH to create example TaskConfig as need for this task, list is pre-sorted based on weightList<ConfigField>getDefaultConfig(int profileId)Allow JEMH to create example TaskConfig as need for this task, list is pre-sorted based on weight.Set<String>getHeadersHandled()Collection of headers that are to be processedcom.javahollic.jira.emh.api.ao.IJEMHFPAuditEventEntiyDef.ProcessingOutcomegetOutcome()StringgetOutcomeReason()StringgetWiki()Doc Page of this extensionvoidinit(IJEMHRuntimeConfig config, IJEMHInboundReport report, List<ConfigField> fields)Generic init method to allow setup if neededbooleanisFilterPostProccessedMail()booleanisProcessedMultipleHeaders()booleanisScriptSelfTest()booleanrunSelfTest(List<ConfigField> updatedConfig)run a local self test, if implemented-
Methods inherited from interface com.javahollic.jira.emh.api.extension.IJEMHModuleProvider
getDescription, getKey, getName, getStatus, getVendor, getVendorUrl, isUsable
-
-
-
-
Field Detail
-
UTF8
static final String UTF8
- See Also:
- Constant Field Values
-
-
Method Detail
-
init
void init(IJEMHRuntimeConfig config, IJEMHInboundReport report, List<ConfigField> fields) throws InitFailureException
Generic init method to allow setup if needed- Parameters:
config- the JEMH runtime configurationreport- to feedback from preproc tasksfields- the pre-proc task configuration fields- Throws:
InitFailureException- if it breaks
-
getHeadersHandled
Set<String> getHeadersHandled()
Collection of headers that are to be processed- Returns:
- set of headers handled by the PreProcTask, eg To:
-
filterHeader
String filterHeader(String header, String value, IJEMHRuntimeConfig config, List<ConfigField> taskConfig) throws PreProcTaskFailureException
API exposes the config via ConfigFields rather than entities- Parameters:
header- the header to filter, eg Tovalue- the value of the header coming inconfig- the JEMH runtime configurationtaskConfig- the list of pre-proc task configuration fields- Returns:
- modified header value
- Throws:
PreProcTaskFailureException- if it breaks
-
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 ValuemailContent- of the byte[] data of the emailprofileId- 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
-
runSelfTest
boolean runSelfTest(List<ConfigField> updatedConfig) throws PreProcTaskFailureException
run a local self test, if implemented- Parameters:
updatedConfig- updated pre-proc task config- Returns:
- true on success
- Throws:
PreProcTaskFailureException- if it didn't
-
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 utilcontent- 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
-
getOutcome
com.javahollic.jira.emh.api.ao.IJEMHFPAuditEventEntiyDef.ProcessingOutcome getOutcome()
- Returns:
- outcome, eg drop
-
getOutcomeReason
String getOutcomeReason()
- Returns:
- the message for the outcome, if set in a preproc task
-
-