com.atlassian.confluence.mail
Class Mail

java.lang.Object
  extended by com.atlassian.core.bean.EntityObject
      extended by com.atlassian.confluence.core.ConfluenceEntityObject
          extended by com.atlassian.confluence.core.AbstractVersionedEntityObject
              extended by com.atlassian.confluence.core.ContentEntityObject
                  extended by com.atlassian.confluence.core.SpaceContentEntityObject
                      extended by com.atlassian.confluence.mail.Mail
All Implemented Interfaces:
com.atlassian.bonnie.Searchable, Addressable, Versioned, Labelable, java.io.Serializable, java.lang.Cloneable, java.lang.Comparable

public class Mail
extends SpaceContentEntityObject

See Also:
Serialized Form

Field Summary
static java.lang.String CONTENT_TYPE
           
static java.lang.String DEFAULT_NO_SUBJECT
           
static int MESSAGE_ID_SIZE
           
static int MESSAGE_SUBJECT_SIZE
           
 
Fields inherited from class com.atlassian.confluence.core.ContentEntityObject
CREATED, CURRENT, DELETED, MODIFIED
 
Fields inherited from class com.atlassian.confluence.core.AbstractVersionedEntityObject
INITIAL_VERSION
 
Constructor Summary
Mail()
           
 
Method Summary
 java.lang.String getCanonicalSubject()
          Get the canonical subject of this mail.
 java.lang.String getContent()
           
 java.util.Date getCreationDate()
           
 java.lang.String getDisplayableCanonicalSubject()
          Get the displayable version of the mails canonical subject string.
 java.lang.String getDisplayableSubject()
          Get the displayable version of the mails subject string.
 java.lang.String getExcerpt()
           
 ConfluenceMailAddress[] getFrom()
           
 java.util.List getFromForSearch()
           
 java.lang.String getInReplyTo()
           
 java.lang.String getMessageBody()
           
 java.lang.String getMessageId()
           
 javax.mail.internet.MimeMessage getMimeMessage()
           
 ConfluenceMailAddress[] getRecipients()
           
 java.util.List getRecipientsForSearch()
           
 java.util.List getReferences()
           
 java.util.Date getSentDate()
           
 java.lang.String getSubject()
          Get the mail subject string.
 java.lang.String getTitle()
           
 java.lang.String getType()
          An easy name for the type of this content: makes it easy for things like the #contentLink macro to work out what to draw.
 java.lang.String getUnquotedTextForSummary()
           
 java.lang.String getUrlPath()
           
 boolean hasSubject()
           
 void loadContent(java.io.InputStream in)
           
 void setContent(java.lang.String content)
           
 void setMessageId(java.lang.String messageId)
           
 void setMimeMessage(javax.mail.internet.MimeMessage message)
           
 
Methods inherited from class com.atlassian.confluence.core.SpaceContentEntityObject
addTrackbackLink, convertToHistoricalVersion, getNameForComparison, getSpace, getSpaceKey, hashCode, isIndexable, isInSpace, setSpace
 
Methods inherited from class com.atlassian.confluence.core.ContentEntityObject
addAttachment, addLabelling, addOutgoingLink, addPermission, addReferralLink, clone, compareTo, equals, getAttachmentNamed, getAttachments, getAttachmentsUrlPath, getBodyContents, getContentPermission, getContentPermissionSet, getContentStatus, getDisplayTitle, getGlobalLabels, getIdAsString, getLabelCount, getLabellings, getLabels, getLabelsForDisplay, getLabelUtil, getLatestVersionsOfAttachments, getOutgoingLinks, getPermissions, getPersonalLabels, getRealTitle, getReferralLinks, getRenderedVersionComment, getSearchableDependants, getTrackbackLinks, getUserAccessor, getVersionComment, getVisibleLabels, hasContentPermissions, hasPermissions, isCurrent, isDeleted, isFavourite, isRecentlyUpdatedFor, isVersionCommentAvailable, removeAttachment, removeContentPermissionSet, removeLabelling, removeOutgoingLink, removeReferralLink, removeTrackbackLink, setAttachments, setBodyContents, setContentStatus, setOutgoingLinks, setReferralLinks, setTitle, setTrackbackLinks, setUserAccessor, setVersionComment, toPageContext, toString, trash
 
Methods inherited from class com.atlassian.confluence.core.AbstractVersionedEntityObject
getLatestVersion, getOriginalVersion, getVersion, isLatestVersion, isNew, setOriginalVersion, setVersion
 
Methods inherited from class com.atlassian.confluence.core.ConfluenceEntityObject
getCreatorName, getLastModifierName, getRealClass, isPersistent, setCreatorName, setLastModifierName
 
Methods inherited from class com.atlassian.core.bean.EntityObject
getCurrentDate, getId, getLastModificationDate, setClock, setCreationDate, setId, setLastModificationDate
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.atlassian.bonnie.Searchable
getId
 
Methods inherited from interface com.atlassian.confluence.core.Addressable
getId
 

Field Detail

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 java.lang.String CONTENT_TYPE
See Also:
Constant Field Values

DEFAULT_NO_SUBJECT

public static final java.lang.String DEFAULT_NO_SUBJECT
See Also:
Constant Field Values
Constructor Detail

Mail

public Mail()
Method Detail

getType

public java.lang.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 Addressable
Specified by:
getType in class ContentEntityObject

getContent

public java.lang.String getContent()
Overrides:
getContent in class ContentEntityObject

getUrlPath

public java.lang.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(java.io.InputStream in)
                 throws java.io.IOException
Throws:
java.io.IOException

setContent

public void setContent(java.lang.String content)
Overrides:
setContent in class ContentEntityObject

getTitle

public java.lang.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 java.lang.String getSubject()
Get the mail subject string.

See Also:
getDisplayableSubject()

getDisplayableSubject

public java.lang.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 java.lang.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 java.lang.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 java.lang.String getMessageId()

setMessageId

public void setMessageId(java.lang.String messageId)

getMessageBody

public java.lang.String getMessageBody()

setMimeMessage

public void setMimeMessage(javax.mail.internet.MimeMessage message)

getInReplyTo

public java.lang.String getInReplyTo()

getReferences

public java.util.List getReferences()

getFrom

public ConfluenceMailAddress[] getFrom()

getFromForSearch

public java.util.List getFromForSearch()

getRecipientsForSearch

public java.util.List getRecipientsForSearch()

getRecipients

public ConfluenceMailAddress[] getRecipients()

getSentDate

public java.util.Date getSentDate()

getCreationDate

public java.util.Date getCreationDate()
Overrides:
getCreationDate in class com.atlassian.core.bean.EntityObject

getExcerpt

public java.lang.String getExcerpt()
Overrides:
getExcerpt in class ContentEntityObject

getUnquotedTextForSummary

public java.lang.String getUnquotedTextForSummary()


Copyright © 2003-2008 Atlassian Pty Ltd. All Rights Reserved.