com.atlassian.jira.service.util.handler
Class AbstractMessageHandler
java.lang.Object
com.atlassian.jira.service.util.handler.AbstractMessageHandler
- All Implemented Interfaces:
- MessageHandler
- Direct Known Subclasses:
- CreateIssueHandler, CreateOrCommentHandler, CVSLogHandler, FullCommentHandler, NonQuotedCommentHandler
- public abstract class AbstractMessageHandler
- extends java.lang.Object
- implements MessageHandler
An AbstractMessageHandler that stores the parameter map.
Field Summary |
java.lang.String |
catchEmail
New issues without this receipient are ignored. |
protected static java.lang.String |
KEY_CATCHEMAIL
|
protected static java.lang.String |
KEY_REPORTER
|
protected java.util.Map |
params
|
java.lang.String |
reporteruserName
Username of default reporter, if sender not recognized. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
KEY_REPORTER
protected static final java.lang.String KEY_REPORTER
- See Also:
- Constant Field Values
KEY_CATCHEMAIL
protected static final java.lang.String KEY_CATCHEMAIL
- See Also:
- Constant Field Values
params
protected java.util.Map params
reporteruserName
public java.lang.String reporteruserName
- Username of default reporter, if sender not recognized.
catchEmail
public java.lang.String catchEmail
- New issues without this receipient are ignored.
AbstractMessageHandler
public AbstractMessageHandler()
init
public void init(java.util.Map params)
- Specified by:
init
in interface MessageHandler
handleMessage
public abstract boolean handleMessage(Message message)
throws MessagingException
- Specified by:
handleMessage
in interface MessageHandler
- Throws:
MessagingException
createAttachmentsForMessage
protected void createAttachmentsForMessage(Message message,
GenericValue issue)
throws java.io.IOException,
MessagingException
- Throws:
java.io.IOException
MessagingException
createAttachmentWithPart
protected void createAttachmentWithPart(BodyPart part,
GenericValue issue)
throws java.io.IOException
- Throws:
java.io.IOException
getFileFromPart
protected java.io.File getFileFromPart(BodyPart part,
GenericValue issue)
throws java.io.IOException,
MessagingException,
GenericEntityException
- Throws:
java.io.IOException
MessagingException
GenericEntityException
getReporter
protected User getReporter(Message message)
throws MessagingException
- Get the reporter from the email address who sent the message, or else the default reporter.
If neither of these are found, return null.
- Parameters:
message
- The email message to search through.
- Returns:
- The user who sent the email, or the default reporter, or null.
- Throws:
MessagingException
- If there is a problem getting the user who created the message.