org.cert.cc.jira.email.handler
Class AttachmentMailHandler

java.lang.Object
  extended by AbstractMessageHandler
      extended by org.cert.cc.jira.email.handler.AttachmentMailHandler

public final class AttachmentMailHandler
extends AbstractMessageHandler

AttachmentMailHandler creates new JIRA issue from incoming emails. If the incoming emails is just text/plain, its data is used to create the issue. If the incoming email is multi-part, each message/rfc822 attachment is interrogated and used to create a new issue. This allows a user to "forward as an attachment" and have the forwarded email be the input for a new JIRA issue. If there are more than one attachment, the attachments are just passed through to JIRA.

© 2010 Carnegie Mellon University

Author:
Steve Scholnick

Field Summary
static File PROPERTIES_DIRECTORY
          Directory for all of EAH's propertes files
 
Constructor Summary
AttachmentMailHandler()
           
 
Method Summary
protected  boolean attachHtmlParts(Part p)
          
protected  boolean attachPlainTextParts(Part p)
          
protected  User getReporter(Message message)
          
 boolean handleMessage(Message message)
          
 void init(Map map)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROPERTIES_DIRECTORY

public static final File PROPERTIES_DIRECTORY
Directory for all of EAH's propertes files

Constructor Detail

AttachmentMailHandler

public AttachmentMailHandler()
Method Detail

init

public void init(Map map)


handleMessage

public boolean handleMessage(Message message)
                      throws MessagingException

Throws:
MessagingException

getReporter

protected User getReporter(Message message)
                    throws MessagingException

Throws:
MessagingException

attachHtmlParts

protected boolean attachHtmlParts(Part p)
                           throws MessagingException,
                                  IOException

Throws:
MessagingException
IOException

attachPlainTextParts

protected boolean attachPlainTextParts(Part p)
                                throws MessagingException,
                                       IOException

Throws:
MessagingException
IOException


Copyright © 2012 Carnegie Mellon University