|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.service.util.handler.AbstractMessageHandler
public abstract class AbstractMessageHandler
An AbstractMessageHandler that stores the parameter map.
Field Summary | |
---|---|
java.lang.String |
catchEmail
New issues without this receipient are ignored. |
boolean |
createUsers
Whether to create users if they do not exist |
protected static java.lang.String |
KEY_CATCHEMAIL
|
protected static java.lang.String |
KEY_CREATEUSERS
|
protected static java.lang.String |
KEY_REPORTER
|
protected java.util.Map |
params
|
java.lang.String |
reporteruserName
Username of default reporter, if sender not recognized. |
Constructor Summary | |
---|---|
AbstractMessageHandler()
|
Method Summary | |
---|---|
protected void |
createAttachmentsForMessage(javax.mail.Message message,
org.ofbiz.core.entity.GenericValue issue)
Loops through all the Part s, and for each one of type Part.ATTACHMENT , call createAttachmentWithPart(BodyPart, GenericValue) . |
protected void |
createAttachmentWithPart(javax.mail.BodyPart part,
org.ofbiz.core.entity.GenericValue issue)
Create an attachment for a particular mime-part. |
protected org.ofbiz.core.entity.GenericValue |
getAssociatedIssue(javax.mail.Message message)
|
protected java.io.File |
getFileFromPart(javax.mail.BodyPart part,
org.ofbiz.core.entity.GenericValue issue)
|
protected com.opensymphony.user.User |
getReporter(javax.mail.Message message)
Get the reporter from the email address who sent the message, or else create a new user if creating users is set to true, or use the default reporter if one is specified. |
abstract boolean |
handleMessage(javax.mail.Message message)
To be implemented in sub-classes |
void |
init(java.util.Map params)
|
protected void |
recordMessageId(java.lang.String type,
javax.mail.Message message,
java.lang.Long issueId)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final java.lang.String KEY_REPORTER
protected static final java.lang.String KEY_CATCHEMAIL
protected static final java.lang.String KEY_CREATEUSERS
protected java.util.Map params
public java.lang.String reporteruserName
public java.lang.String catchEmail
public boolean createUsers
Constructor Detail |
---|
public AbstractMessageHandler()
Method Detail |
---|
public void init(java.util.Map params)
init
in interface MessageHandler
public abstract boolean handleMessage(javax.mail.Message message) throws javax.mail.MessagingException
handleMessage
in interface MessageHandler
javax.mail.MessagingException
protected void createAttachmentsForMessage(javax.mail.Message message, org.ofbiz.core.entity.GenericValue issue) throws java.io.IOException, javax.mail.MessagingException
Part
s, and for each one of type Part.ATTACHMENT
, call createAttachmentWithPart(BodyPart, GenericValue)
.
message
- The multipart message to search for attachments inissue
- The issue to create attachments in
java.io.IOException
- If there is a problem creating the attachment
javax.mail.MessagingException
- If there is a problem reading the messageprotected void createAttachmentWithPart(javax.mail.BodyPart part, org.ofbiz.core.entity.GenericValue issue) throws java.io.IOException
Part.ATTACHMENT
.
part
- The part of disposition Part.ATTACHMENT
to create the attachment fromissue
- The issue to create attachments in
java.io.IOException
- If there is a problem creating the attachment in the filesystemprotected java.io.File getFileFromPart(javax.mail.BodyPart part, org.ofbiz.core.entity.GenericValue issue) throws java.io.IOException, javax.mail.MessagingException, org.ofbiz.core.entity.GenericEntityException
java.io.IOException
javax.mail.MessagingException
org.ofbiz.core.entity.GenericEntityException
protected com.opensymphony.user.User getReporter(javax.mail.Message message) throws javax.mail.MessagingException
message
- The email message to search through.
javax.mail.MessagingException
- If there is a problem getting the user who created the message.protected void recordMessageId(java.lang.String type, javax.mail.Message message, java.lang.Long issueId) throws javax.mail.MessagingException
javax.mail.MessagingException
protected org.ofbiz.core.entity.GenericValue getAssociatedIssue(javax.mail.Message message)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |