cern.jira.emailhandler
Class FullCommentHandler

java.lang.Object
  extended by AbstractCommentHandler
      extended by cern.jira.emailhandler.FullCommentHandler

public class FullCommentHandler
extends AbstractCommentHandler


Field Summary
private static Category log
           
 
Constructor Summary
FullCommentHandler()
           
 
Method Summary
protected  boolean attachHtmlParts(javax.mail.Part part)
          Attaches HTML parts.
protected  boolean attachPlainTextParts(Part part)
          Attaches plaintext parts.
protected  java.lang.String getEmailBody(Message message)
          Given a message, adds the entire message body as a comment to the first issue referenced in the subject.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static final Category log
Constructor Detail

FullCommentHandler

public FullCommentHandler()
Method Detail

getEmailBody

protected java.lang.String getEmailBody(Message message)
                                 throws MessagingException
Given a message, adds the entire message body as a comment to the first issue referenced in the subject.

Throws:
MessagingException

attachPlainTextParts

protected boolean attachPlainTextParts(Part part)
                                throws MessagingException,
                                       java.io.IOException
Attaches plaintext parts. Plain text parts must be kept if they are not empty.

Parameters:
part - the plain text part.
Returns:
true if the part is not empty, false otherwise
Throws:
MessagingException
java.io.IOException

attachHtmlParts

protected boolean attachHtmlParts(javax.mail.Part part)
                           throws MessagingException,
                                  java.io.IOException
Attaches HTML parts. 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.

Parameters:
part - the HTML part being processed
Returns:
always false
Throws:
MessagingException
java.io.IOException