com.atlassian.jira.service.util.handler
Class CVSLogHandler
java.lang.Object
com.atlassian.jira.service.util.handler.AbstractMessageHandler
com.atlassian.jira.service.util.handler.CVSLogHandler
- All Implemented Interfaces:
- MessageHandler
public class CVSLogHandler
- extends AbstractMessageHandler
Fields inherited from class com.atlassian.jira.service.util.handler.AbstractMessageHandler |
applicationProperties, bulk, catchEmail, commentManager, CONTENT_TYPE_PKCS7, CONTENT_TYPE_TEXT, createUsers, deleteEmail, issueFactory, KEY_BULK, KEY_CATCHEMAIL, KEY_CREATEUSERS, KEY_NOTIFYUSERS, KEY_REPORTER, notifyUsers, params, reporteruserName |
Method Summary |
String |
getCommentArea(String messageBody)
Get the actual comment text from a CVS log email. |
protected CommentManager |
getCommentManager()
This method was extracted and made protected to allow unit test mocking |
boolean |
handleMessage(javax.mail.Message message)
Perform the specific work of this handler for the given message. |
protected boolean |
hasUserPermissionToComment(org.ofbiz.core.entity.GenericValue issue,
User reporter)
Returns true if the specified user has permission to comment on given issue. |
Methods inherited from class com.atlassian.jira.service.util.handler.AbstractMessageHandler |
addError, addError, addErrorAndReturnFalse, addErrorAndReturnFalse, canHandleMessage, createAttachmentsForMessage, createAttachmentWithPart, createUserForReporter, findUserByEmail, findUserByUsername, getAssociatedIssue, getErrorHandler, getFileFromPart, getI18nBean, getPrecedenceHeader, getReporter, init, recordMessageId, renameFileIfInvalid, setErrorHandler |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CVSLogHandler
public CVSLogHandler()
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.
getCommentManager
protected CommentManager getCommentManager()
- This method was extracted and made protected to allow unit test mocking
- Returns:
- comment manager
hasUserPermissionToComment
protected boolean hasUserPermissionToComment(org.ofbiz.core.entity.GenericValue issue,
User reporter)
- Returns true if the specified user has permission to comment on given issue.
- Parameters:
issue
- issue to comment onreporter
- commenting user
- Returns:
- true if permission granted, false otherwise
getCommentArea
public String getCommentArea(String messageBody)
- Get the actual comment text from a CVS log email. This is done by reading through line
by line, and parsing the comment body.
- Parameters:
messageBody
- message body
- Returns:
- comment from CVS log email
Copyright © 2002-2007 Atlassian. All Rights Reserved.