|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.mail.Message
javax.mail.internet.MimeMessage
org.alfresco.repo.imap.AbstractMimeMessage
public abstract class AbstractMimeMessage
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.mail.internet.MimeMessage |
---|
javax.mail.internet.MimeMessage.RecipientType |
Field Summary | |
---|---|
protected static java.lang.String |
DEFAULT_EMAIL_FROM
Used if imapHelper.getDefaultFromAddress is not set |
protected static java.lang.String |
DEFAULT_EMAIL_TO
|
protected boolean |
generateBody
|
protected ImapService |
imapService
|
protected static int |
MAX_RETRIES
|
protected FileInfo |
messageFileInfo
|
protected ServiceRegistry |
serviceRegistry
|
protected javax.mail.internet.MimeMessage |
wrappedMessage
|
Fields inherited from class javax.mail.internet.MimeMessage |
---|
content, contentStream, dh, flags, headers, modified, saved |
Fields inherited from class javax.mail.Message |
---|
expunged, folder, msgnum, session |
Fields inherited from interface javax.mail.Part |
---|
ATTACHMENT, INLINE |
Constructor Summary | |
---|---|
protected |
AbstractMimeMessage(FileInfo fileInfo,
ServiceRegistry serviceRegistry,
boolean generateBody)
|
protected |
AbstractMimeMessage(javax.mail.Session session)
|
Method Summary | |
---|---|
protected void |
addFromInternal(java.lang.String addressesString)
|
protected void |
buildMessage(FileInfo fileInfo,
ServiceRegistry serviceRegistry)
|
abstract void |
buildMessageInternal()
Method must be implemented in subclasses. |
protected javax.mail.internet.InternetAddress[] |
buildRecipientToAddress()
TODO USE CASE 2: "The To/addressee will be the first email alias found in the parent folders or a default one (TBD)". |
protected javax.mail.internet.InternetAddress[] |
buildSenderFromAddress()
Builds the InternetAddress from the Content Author name if provided. |
protected void |
checkParameter(java.lang.Object parameter,
java.lang.String name)
Method that checks mandatory parameter. |
java.lang.String |
getEmailBodyText(ImapService.EmailBodyType type)
Returns the text representing email body for ContentModel node. |
javax.mail.Flags |
getFlags()
Returns message flags. |
FileInfo |
getMessageInfo()
Returns FileInfo object representing message in Alfresco. |
void |
setFlags(javax.mail.Flags flags,
boolean value)
Sets message flags. |
protected void |
setMessageHeaders()
|
protected void |
updateMessageID()
|
Methods inherited from class javax.mail.internet.MimeMessage |
---|
addFrom, addHeader, addHeaderLine, addRecipients, addRecipients, createInternetHeaders, createMimeMessage, getAllHeaderLines, getAllHeaders, getAllRecipients, getContent, getContentID, getContentLanguage, getContentMD5, getContentStream, getContentType, getDataHandler, getDescription, getDisposition, getEncoding, getFileName, getFrom, getHeader, getHeader, getInputStream, getLineCount, getMatchingHeaderLines, getMatchingHeaders, getMessageID, getNonMatchingHeaderLines, getNonMatchingHeaders, getRawInputStream, getReceivedDate, getRecipients, getReplyTo, getSender, getSentDate, getSize, getSubject, isMimeType, isSet, parse, removeHeader, reply, saveChanges, setContent, setContent, setContentID, setContentLanguage, setContentMD5, setDataHandler, setDescription, setDescription, setDisposition, setFileName, setFrom, setFrom, setHeader, setRecipients, setRecipients, setReplyTo, setSender, setSentDate, setSubject, setSubject, setText, setText, setText, updateHeaders, writeTo, writeTo |
Methods inherited from class javax.mail.Message |
---|
addRecipient, getFolder, getMessageNumber, isExpunged, match, setExpunged, setFlag, setMessageNumber, setRecipient |
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 DEFAULT_EMAIL_FROM
protected static final java.lang.String DEFAULT_EMAIL_TO
protected static int MAX_RETRIES
protected boolean generateBody
protected ServiceRegistry serviceRegistry
protected ImapService imapService
protected FileInfo messageFileInfo
protected javax.mail.internet.MimeMessage wrappedMessage
Constructor Detail |
---|
protected AbstractMimeMessage(javax.mail.Session session)
protected AbstractMimeMessage(FileInfo fileInfo, ServiceRegistry serviceRegistry, boolean generateBody) throws javax.mail.MessagingException
javax.mail.MessagingException
Method Detail |
---|
protected void buildMessage(FileInfo fileInfo, ServiceRegistry serviceRegistry) throws javax.mail.MessagingException
javax.mail.MessagingException
public abstract void buildMessageInternal() throws javax.mail.MessagingException
javax.mail.MessagingException
protected void checkParameter(java.lang.Object parameter, java.lang.String name)
The
- parameter instance to check.The
- name of the parameter.protected void setMessageHeaders() throws javax.mail.MessagingException
javax.mail.MessagingException
protected javax.mail.internet.InternetAddress[] buildSenderFromAddress() throws javax.mail.internet.AddressException
contentAuthor
- The content author full name.
javax.mail.internet.AddressException
public FileInfo getMessageInfo()
FileInfo
object representing message in Alfresco.
FileInfo
object.public javax.mail.Flags getFlags()
getFlags
in class javax.mail.internet.MimeMessage
Flags
public void setFlags(javax.mail.Flags flags, boolean value) throws javax.mail.MessagingException
setFlags
in class javax.mail.internet.MimeMessage
flags
- - Flags
object.value
- - flags value.
javax.mail.MessagingException
public java.lang.String getEmailBodyText(ImapService.EmailBodyType type)
nodeRef
- NodeRef of the target content.type
- The type of the returned body. May be the one of ImapService.EmailBodyType
.
protected javax.mail.internet.InternetAddress[] buildRecipientToAddress() throws javax.mail.internet.AddressException
<user>@<current.domain>
...
<user>@<current.domain>
javax.mail.internet.AddressException
protected void addFromInternal(java.lang.String addressesString) throws javax.mail.MessagingException
javax.mail.MessagingException
protected void updateMessageID() throws javax.mail.MessagingException
updateMessageID
in class javax.mail.internet.MimeMessage
javax.mail.MessagingException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |