Interface IJEMHFieldProcessor
-
- All Superinterfaces:
IJEMHFieldProcessorKeys
,IJEMHModuleProvider
public interface IJEMHFieldProcessor extends IJEMHModuleProvider, IJEMHFieldProcessorKeys
Field Processors process incoming emails, digesting them as required into a map of keys and values.- Author:
- andy
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.javahollic.jira.emh.api.IJEMHFieldProcessorKeys
IJEMHFieldProcessorKeys.AvailableProcessors
-
-
Field Summary
-
Fields inherited from interface com.javahollic.jira.emh.api.IJEMHFieldProcessorKeys
ADDITIONAL_MAP_VALUES_KEY, CONTENT_ID_FILENAME_MAP, CUSTOM_DIRECTIVES, CUSTOM_FIELD_US, DEFAULT_ISSUE_LINK_DIRECTION, DEFEAT_REPORTER_OVERRIDE_CHECK, DIRECTIVE_DEFINED_ISSUE, JEMH_INTERNAL_KEY_PREFIX, JOIN_GROUP_TO_CUSTOM_FIELD, JOIN_GROUP_TO_PROJECT_ROLE, KEY_AFFECTS_VERSIONS, KEY_ASSIGNEE, KEY_ATTACHMENTS, KEY_CC_USERS, KEY_COMMENT, KEY_COMPONENTS, KEY_DESCRIPTION, KEY_DUE_DATE, KEY_DUE_DATE_FORMAT, KEY_EMAIL_SENDER_USERID, KEY_EMBEDDED_ATTACHMENTS, KEY_ENVIRONMENT, KEY_FALLBACK_EMAIL_SUBJECT_SUMMARY, KEY_FIELD_PROCESSOR_HINT, KEY_FIX_VERSIONS, KEY_ISSUE_KEY, KEY_ISSUE_TEMPLATE, KEY_ISSUETYPE, KEY_ISSUETYPE_STATUS, KEY_JEMH_RECIPIENT, KEY_JSD_AGENT_INTERNAL_COMMENT, KEY_JSD_APPROVAL, KEY_JSD_APPROVAL_DECISION, KEY_LABELS, KEY_LINKTO, KEY_LOG_WORK_DONE, KEY_NOTIFY_ON_EDIT, KEY_ORGANIZATIONS, KEY_OVERRIDE_HINTOGRAM_EMAIL_DELIVERY_ADDRESS, KEY_PARAM, KEY_PARENT_ISSUE_KEY, KEY_PRIORITY, KEY_PROJECT, KEY_REPORTER, KEY_SECURITY_LEVEL, KEY_SPRINT, KEY_STRIP_COMMENTS, KEY_SUMMARY, KEY_VIEWABLE, KEY_VOTE, KEY_WATCHERS, KEY_WORK_ESTIMATE, KEY_WORKFLOW, KEY_WORKFLOW_PARAMS, KEY_WORKFLOW_RESOLUTION, KEY_WORKLOG, KEY_WORKLOG_KEEP_ESTIMATE, KEY_WORKLOG_NEW_REMAINING_ESTIMATE, KEY_WORKLOG_PARAMS, KEY_WORKLOG_START_DATE, KEY_WORKLOG_TIME_SPENT, KEY_WORKLOG_VIEWABLE_GROUP, KEY_WORKLOG_VIEWABLE_ROLE, KEY_WORKLOG_VIEWAWBLE, MAPPING_AUTO_JOIN_GROUPS, MAPPING_AUTO_JOIN_GROUPS_AUDIENCE, NON_JIRA_WATCHERS, PROJECT_MAPPING_RULE, RAW_MESSAGE, STANDARD_JIRA_ISSUE_ATTRIBUTES, STRIPPED_BODY_CONTENT
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
copyTo(int id)
Handlers should duplicate their locally stored resources, against the given id KEY that relates to the JEMH profile involved.IJEMHFieldProcessorContext
getContext()
Provides JEMH with a reference to the processors init paramsString
getExecutionLog()
int
getFieldCount()
Collection<Map<String,Object>>
getFieldMaps()
void
handleDelete()
JEMH can delete profiles, which should also delete any resources that a handler has allocated.void
init(IJEMHFieldProcessorContext context)
boolean
isHandlerOptOutOfJEMHPostConfig()
JEMH applies much configuration over the top of provided directives, for example, attachment extraction as well as provision of Project Mapping derived values and more.boolean
isHandlerOwnsMessage()
-
Methods inherited from interface com.javahollic.jira.emh.api.extension.IJEMHModuleProvider
getDescription, getKey, getName, getStatus, getVendor, getVendorUrl, isUsable
-
-
-
-
Method Detail
-
init
void init(IJEMHFieldProcessorContext context)
- Parameters:
context
- providing access to everything required
-
getContext
IJEMHFieldProcessorContext getContext()
Provides JEMH with a reference to the processors init params- Returns:
- context
-
isHandlerOwnsMessage
boolean isHandlerOwnsMessage()
- Returns:
- true if the handler decides it should own the processing of this email, i.e. should be used instead of other Field Processors, a false value just means the handler should participate in the election allow with any of the other configured default handlers.
-
isHandlerOptOutOfJEMHPostConfig
boolean isHandlerOptOutOfJEMHPostConfig()
JEMH applies much configuration over the top of provided directives, for example, attachment extraction as well as provision of Project Mapping derived values and more. This support can be disabled for 'naked' handling, but will require specific information to be available in order to create issues: - project - issueType - reporter - summary- Returns:
- true if handlers should be solely responsible for email processing, or whether JEMH should perform more, eg through Project Mappings
-
getFieldCount
int getFieldCount()
- Returns:
- the number of fields the handler has found. This allows the handler to participate in the general handler election (the handler with the most fields found wins). Boosting this return value can skew the election in this handlers favour.
-
getFieldMaps
Collection<Map<String,Object>> getFieldMaps() throws FieldProcessorException
- Returns:
- map of JEMH expected keys to values
- Throws:
FieldProcessorException
- if it breaks
-
handleDelete
void handleDelete()
JEMH can delete profiles, which should also delete any resources that a handler has allocated. Clean up here.
-
copyTo
void copyTo(int id)
Handlers should duplicate their locally stored resources, against the given id KEY that relates to the JEMH profile involved. see IJEMHFieldProcessorContext.getID()- Parameters:
id
- the id
-
getExecutionLog
String getExecutionLog()
- Returns:
- execution log, primarily to support scripted field processor, can be safely null
-
-