com.atlassian.jira.service.util.handler
Class CreateOrCommentHandler

java.lang.Object
  extended bycom.atlassian.jira.service.util.handler.AbstractMessageHandler
      extended bycom.atlassian.jira.service.util.handler.CreateOrCommentHandler
All Implemented Interfaces:
MessageHandler

public class CreateOrCommentHandler
extends AbstractMessageHandler

A message handler to create a new issue, or add a comment to an existing issue, from an incoming message. If the subject contains a project key the message is added as a comment to that issue. If no project key is found, a new issue is created in the default project.


Field Summary
 java.lang.String issueType
          Default type for new issues.
 java.lang.String projectKey
          Default project where new issues are created.
 java.lang.String stripquotes
          If set (to anything), quoted text is removed from comments.
 
Fields inherited from class com.atlassian.jira.service.util.handler.AbstractMessageHandler
catchEmail, createUsers, KEY_CATCHEMAIL, KEY_CREATEUSERS, KEY_REPORTER, params, reporteruserName
 
Constructor Summary
CreateOrCommentHandler()
           
 
Method Summary
 boolean handleMessage(Message message)
          To be implemented in sub-classes
 void init(java.util.Map params)
           
 
Methods inherited from class com.atlassian.jira.service.util.handler.AbstractMessageHandler
createAttachmentsForMessage, createAttachmentWithPart, getAssociatedIssue, getFileFromPart, getReporter, recordMessageId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

projectKey

public java.lang.String projectKey
Default project where new issues are created.


issueType

public java.lang.String issueType
Default type for new issues.


stripquotes

public java.lang.String stripquotes
If set (to anything), quoted text is removed from comments.

Constructor Detail

CreateOrCommentHandler

public CreateOrCommentHandler()
Method Detail

init

public void init(java.util.Map params)
Specified by:
init in interface MessageHandler
Overrides:
init in class AbstractMessageHandler

handleMessage

public boolean handleMessage(Message message)
                      throws MessagingException
Description copied from class: AbstractMessageHandler
To be implemented in sub-classes

Specified by:
handleMessage in interface MessageHandler
Specified by:
handleMessage in class AbstractMessageHandler
Throws:
MessagingException