cern.jira.emailhandler
Class RegexCommentHandler
java.lang.Object
AbstractCommentHandler
cern.jira.emailhandler.RegexCommentHandler
public class RegexCommentHandler
- extends AbstractCommentHandler
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
private static final Logger log
KEY_SPLITREGEX
private static final java.lang.String KEY_SPLITREGEX
- See Also:
- Constant Field Values
splitRegex
private java.lang.String splitRegex
RegexCommentHandler
public RegexCommentHandler()
init
public void init(java.util.Map params)
getEmailBody
protected java.lang.String getEmailBody(Message message)
throws MessagingException
- Throws:
MessagingException
splitMailBody
public java.lang.String splitMailBody(java.lang.String rawBody)
getSplitRegex
public java.lang.String getSplitRegex()
setSplitRegex
public void setSplitRegex(java.lang.String splitRegex)
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 part being tested
- Returns:
- true if the part content is not empty, false otherwise
- Throws:
MessagingException
java.io.IOException
attachHtmlParts
protected boolean attachHtmlParts(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 part being tested
- Returns:
- always false
- Throws:
MessagingException
java.io.IOException