com.atlassian.jira.service.util.handler
Class RegexCommentHandler
java.lang.Object
com.atlassian.jira.service.util.handler.AbstractMessageHandler
com.atlassian.jira.service.util.handler.AbstractCommentHandler
com.atlassian.jira.service.util.handler.RegexCommentHandler
- All Implemented Interfaces:
- MessageHandler
public class RegexCommentHandler
- extends AbstractCommentHandler
Fields inherited from class com.atlassian.jira.service.util.handler.AbstractMessageHandler |
applicationProperties, bulk, catchEmail, commentManager, CONTENT_TYPE_TEXT, createUsers, deleteEmail, HEADER_IN_REPLY_TO, HEADER_MESSAGE_ID, issueFactory, KEY_BULK, KEY_CATCHEMAIL, KEY_CREATEUSERS, KEY_FINGER_PRINT, KEY_NOTIFYUSERS, KEY_REPORTER, notifyUsers, params, reporteruserName |
Methods inherited from class com.atlassian.jira.service.util.handler.AbstractMessageHandler |
addError, addError, addErrorAndReturnFalse, addErrorAndReturnFalse, attachAttachmentsParts, attachInlineParts, attachMessagePart, attachRelatedPart, canHandleMessage, createAttachmentsForMessage, createAttachmentWithPart, createUserForReporter, findUserByEmail, findUserByUsername, getAssociatedIssue, getErrorHandler, getFileFromPart, getFilenameForAttachment, getI18nBean, getPrecedenceHeader, getReporter, isAutoSubmitted, isDeliveryStatus, recordMessageId, renameFileIfInvalid, setErrorHandler, shouldAttach |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RegexCommentHandler
public RegexCommentHandler()
init
public void init(Map params)
- Description copied from interface:
MessageHandler
- Will be called before any messages are to be handled.
- Specified by:
init
in interface MessageHandler
- Overrides:
init
in class AbstractMessageHandler
- Parameters:
params
- configuration.
getEmailBody
protected String getEmailBody(javax.mail.Message message)
throws javax.mail.MessagingException
- Specified by:
getEmailBody
in class AbstractCommentHandler
- Throws:
javax.mail.MessagingException
splitMailBody
public String splitMailBody(String rawBody)
getSplitRegex
public String getSplitRegex()
setSplitRegex
public void setSplitRegex(String splitRegex)
attachPlainTextParts
protected boolean attachPlainTextParts(javax.mail.Part part)
throws javax.mail.MessagingException,
IOException
- Plain text parts must be kept if they arent empty.
- Specified by:
attachPlainTextParts
in class AbstractMessageHandler
- Parameters:
part
-
- Returns:
-
- Throws:
javax.mail.MessagingException
- if javamail complains
IOException
- if javamail complains
attachHtmlParts
protected boolean attachHtmlParts(javax.mail.Part part)
throws javax.mail.MessagingException,
IOException
- Comments never wish to keep html parts that are not attachments as they extract the plain text
part and use that as the content. This method therefore is hard wired to always return false.
- Specified by:
attachHtmlParts
in class AbstractMessageHandler
- Parameters:
part
- The html part being processed
- Returns:
- Always returns false
- Throws:
javax.mail.MessagingException
IOException
Copyright © 2002-2011 Atlassian. All Rights Reserved.