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

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

public class CreateIssueHandler
extends AbstractMessageHandler

A message handler to create a new issue from an incoming message. Note: requires public noarg constructor as this class is instantiated by reflection


Field Summary
 boolean ccAssignee
           
 String issueType
           
 String projectKey
           
 
Fields inherited from class com.atlassian.jira.service.util.handler.AbstractMessageHandler
bulk, catchEmail, CONTENT_TYPE_PKCS7, CONTENT_TYPE_TEXT, createUsers, deleteEmail, KEY_BULK, KEY_CATCHEMAIL, KEY_CREATEUSERS, KEY_NOTIFYUSERS, KEY_REPORTER, notifyUsers, params, reporteruserName
 
Constructor Summary
CreateIssueHandler()
           
 
Method Summary
static User getFirstValidAssignee(javax.mail.Address[] addresses, org.ofbiz.core.entity.GenericValue project)
          Given an array of addresses, this method returns the first valid assignee for the appropriate project
protected  org.ofbiz.core.entity.GenericValue getProject(javax.mail.Message message)
           
protected  ProjectManager getProjectManager()
           
 boolean handleMessage(javax.mail.Message message)
          Perform the specific work of this handler for the given message.
protected  boolean hasValidIssueType()
           
 void init(Map params)
           
 
Methods inherited from class com.atlassian.jira.service.util.handler.AbstractMessageHandler
addError, addError, addErrorAndReturnFalse, addErrorAndReturnFalse, canHandleMessage, createAttachmentsForMessage, createAttachmentWithPart, getAssociatedIssue, getErrorHandler, getFileFromPart, getI18nBean, getPrecedenceHeader, getReporter, recordMessageId, setErrorHandler
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

projectKey

public String projectKey

issueType

public String issueType

ccAssignee

public boolean ccAssignee
Constructor Detail

CreateIssueHandler

public CreateIssueHandler()
Method Detail

init

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

handleMessage

public boolean handleMessage(javax.mail.Message message)
                      throws javax.mail.MessagingException
Description copied from class: AbstractMessageHandler
Perform the specific work of this handler for the given message.

Specified by:
handleMessage in interface MessageHandler
Specified by:
handleMessage in class AbstractMessageHandler
Returns:
true if the message is to be deleted from the source.
Throws:
javax.mail.MessagingException - if anything went wrong.

getProject

protected org.ofbiz.core.entity.GenericValue getProject(javax.mail.Message message)

hasValidIssueType

protected boolean hasValidIssueType()

getProjectManager

protected ProjectManager getProjectManager()

getFirstValidAssignee

public static User getFirstValidAssignee(javax.mail.Address[] addresses,
                                         org.ofbiz.core.entity.GenericValue project)
Given an array of addresses, this method returns the first valid assignee for the appropriate project

Parameters:
addresses -


Copyright © 2002-2007 Atlassian. All Rights Reserved.