com.atlassian.confluence.mail
Class Mail
java.lang.Object
com.atlassian.core.bean.EntityObject
com.atlassian.confluence.core.ConfluenceEntityObject
com.atlassian.confluence.core.AbstractVersionedEntityObject
com.atlassian.confluence.core.ContentEntityObject
com.atlassian.confluence.core.SpaceContentEntityObject
com.atlassian.confluence.mail.Mail
- All Implemented Interfaces:
- com.atlassian.bonnie.Searchable, Addressable, ContentTypeAware, Versioned, Labelable, Spaced, Serializable, Cloneable, Comparable
public class Mail
- extends SpaceContentEntityObject
- See Also:
- Serialized Form
Constructor Summary |
Mail()
|
Methods inherited from class com.atlassian.confluence.core.ContentEntityObject |
addAttachment, addComment, addLabelling, addOutgoingLink, addPermission, addReferralLink, clone, compareTo, equals, getAttachmentNamed, getAttachments, getAttachmentsUrlPath, getBodyAsStringWithoutMarkup, getBodyContent, getBodyContent, getBodyContents, getComments, getContentPermission, getContentPermissionSet, getContentStatus, getDisplayTitle, getGlobalLabels, getIdAsString, getLabelCount, getLabellings, getLabels, getLabelsForDisplay, getLabelUtil, getLatestVersionsOfAttachments, getOutgoingLinks, getPermissions, getPersonalLabels, getReferralLinks, getRenderedVersionComment, getSearchableDependants, getTeamLabels, getTrackbackLinks, getTypeEnum, getUserAccessor, getVersionComment, getVisibleLabels, hasContentPermissions, hasPermissions, isCurrent, isDeleted, isFavourite, isRecentlyUpdatedFor, isVersionCommentAvailable, removeAttachment, removeComment, removeContentPermissionSet, removeLabelling, removeOutgoingLink, removeReferralLink, removeTrackbackLink, setAttachments, setBodyContent, setBodyContents, setComments, setContent, setContentStatus, setOutgoingLinks, setReferralLinks, setTitle, setTrackbackLinks, setUserAccessor, setVersionComment, toPageContext, toString, trash |
Methods inherited from class com.atlassian.core.bean.EntityObject |
getCurrentDate, getId, getLastModificationDate, setClock, setCreationDate, setId, setLastModificationDate |
Methods inherited from interface com.atlassian.bonnie.Searchable |
getId |
Methods inherited from interface com.atlassian.confluence.core.Addressable |
getId |
MESSAGE_ID_SIZE
public static final int MESSAGE_ID_SIZE
- See Also:
- Constant Field Values
MESSAGE_SUBJECT_SIZE
public static final int MESSAGE_SUBJECT_SIZE
- See Also:
- Constant Field Values
CONTENT_TYPE
public static final String CONTENT_TYPE
- See Also:
- Constant Field Values
DEFAULT_NO_SUBJECT
public static final String DEFAULT_NO_SUBJECT
- See Also:
- Constant Field Values
Mail
public Mail()
getType
public String getType()
- Description copied from class:
ContentEntityObject
- An easy name for the type of this content: makes it easy for
things like the #contentLink macro to work out what to draw.
This is a bit of a hack, but it saves heaps of code elsewhere,
especially since we tend to get back these objects wrapped in
all sorts of Hibernate CGLIB stuff.
- Specified by:
getType
in interface ContentTypeAware
- Specified by:
getType
in class ContentEntityObject
- Returns:
- the content type
getUrlPath
public String getUrlPath()
- Specified by:
getUrlPath
in interface Addressable
- Specified by:
getUrlPath
in class ContentEntityObject
getMimeMessage
public javax.mail.internet.MimeMessage getMimeMessage()
throws javax.mail.MessagingException
- Throws:
javax.mail.MessagingException
loadContent
public void loadContent(InputStream in)
throws IOException
- Throws:
IOException
getDefaultBodyType
public BodyType getDefaultBodyType()
- Overrides:
getDefaultBodyType
in class ContentEntityObject
getBodyAsString
public String getBodyAsString()
- Overrides super method to remove leading blank lines.
- Overrides:
getBodyAsString
in class ContentEntityObject
- Returns:
- the String representation of the mail.
setBodyAsString
public void setBodyAsString(String content)
- Description copied from class:
ContentEntityObject
- Convenience method that sets the content of this ContentEntityObject.
- Overrides:
setBodyAsString
in class ContentEntityObject
- Parameters:
content
- the String representation of the mail.
getTitle
public String getTitle()
- Overrides:
getTitle
in class ContentEntityObject
hasSubject
public boolean hasSubject()
- Returns:
- True if this mail item contains a subject string, false otherwise. If we can not determine
the presence of the subject in the mime-message, we assume that one does not exist.
getSubject
public String getSubject()
- Get the mail subject string.
- See Also:
getDisplayableSubject()
getDisplayableSubject
public String getDisplayableSubject()
- Get the displayable version of the mails subject string. If the mail does not have a subject, then
this returns the default subject.
- See Also:
hasSubject()
,
getSubject()
getCanonicalSubject
public String getCanonicalSubject()
- Get the canonical subject of this mail. The canonical form removes all Re: and Fwd: style
prefixes on the email, returning what should be the original emails subject. All emails within a thread
will have the same canonical subject.
- See Also:
getSubject()
getDisplayableCanonicalSubject
public String getDisplayableCanonicalSubject()
- Get the displayable version of the mails canonical subject string. That is, if the mail does not have a
canonical subject, return the default.
- See Also:
getCanonicalSubject()
,
hasSubject()
getMessageId
public String getMessageId()
setMessageId
public void setMessageId(String messageId)
getMessageBody
public String getMessageBody()
setMimeMessage
public void setMimeMessage(javax.mail.internet.MimeMessage message)
getInReplyTo
public String getInReplyTo()
getReferences
public List getReferences()
getFrom
public ConfluenceMailAddress[] getFrom()
getFromForSearch
public List getFromForSearch()
getRecipientsForSearch
public List getRecipientsForSearch()
getRecipients
public ConfluenceMailAddress[] getRecipients()
getSentDate
public Date getSentDate()
getCreationDate
public Date getCreationDate()
- Overrides:
getCreationDate
in class com.atlassian.core.bean.EntityObject
getExcerpt
public String getExcerpt()
- Overrides:
getExcerpt
in class ContentEntityObject
getUnquotedTextForSummary
public String getUnquotedTextForSummary()
Copyright © 2003-2011 Atlassian. All Rights Reserved.