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.AbstractLabelableEntityObject
                  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, Content, Addressable, ContentTypeAware, Versioned, EditableLabelable, Labelable, Spaced, Serializable, Cloneable, Comparable

Deprecated. since 4.2. Mail archiving is now managed entirely by the mail archiving plugin.

@Deprecated
public class Mail
extends SpaceContentEntityObject

I used to be a Mail content object, then I took an arrow in the knee.

This object needs to remain in the codebase so long as we continue to support upgrading from versions of Confluence prior to 4.2

See Also:
Serialized Form

Field Summary
static String CONTENT_TYPE
          Deprecated.  
static String DEFAULT_NO_SUBJECT
          Deprecated.  
static int MESSAGE_ID_SIZE
          Deprecated.  
static int MESSAGE_SUBJECT_SIZE
          Deprecated.  
 
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()
          Deprecated.  
 
Method Summary
 String getAttachmentsUrlPath()
          Deprecated.  
 String getAttachmentUrlPath(Attachment attachment)
          Deprecated. Gets the path relative to Confluence's base URL to view the given attachment in the context of this content (for example, highlighted in the content's list of attachments).
 String getBodyAsString()
          Deprecated. Overrides super method to remove leading blank lines.
 String getCanonicalSubject()
          Deprecated. Get the canonical subject of this mail.
 Date getCreationDate()
          Deprecated.  
 BodyType getDefaultBodyType()
          Deprecated.  
 String getDisplayableCanonicalSubject()
          Deprecated. Get the displayable version of the mails canonical subject string.
 String getDisplayableSubject()
          Deprecated. Get the displayable version of the mails subject string.
 String getExcerpt()
          Deprecated.  
 ConfluenceMailAddress[] getFrom()
          Deprecated.  
 List getFromForSearch()
          Deprecated.  
 String getInReplyTo()
          Deprecated.  
 String getMessageBody()
          Deprecated.  
 String getMessageId()
          Deprecated.  
 javax.mail.internet.MimeMessage getMimeMessage()
          Deprecated.  
 ConfluenceMailAddress[] getRecipients()
          Deprecated.  
 List getRecipientsForSearch()
          Deprecated.  
 List getReferences()
          Deprecated.  
 Date getSentDate()
          Deprecated.  
 String getSubject()
          Deprecated. Get the mail subject string.
 String getTitle()
          Deprecated.  
 String getType()
          Deprecated. An easy name for the type of this content: makes it easy for things like the #contentLink macro to work out what to draw.
 String getUnquotedTextForSummary()
          Deprecated.  
 String getUrlPath()
          Deprecated.  
 boolean hasSubject()
          Deprecated.  
 void loadContent(InputStream in)
          Deprecated.  
 void setBodyAsString(String content)
          Deprecated. Convenience method that sets the content of this ContentEntityObject.
 void setMessageId(String messageId)
          Deprecated.  
 void setMimeMessage(javax.mail.internet.MimeMessage message)
          Deprecated.  
 
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, addComment, addOutgoingLink, addPermission, addReferralLink, clone, compareTo, ensureAttachmentBelongsToContent, equals, getAttachmentNamed, getAttachments, getBodyAsStringWithoutMarkup, getBodyContent, getBodyContent, getBodyContents, getComments, getContentPermission, getContentPermissionSet, getContentStatus, getDisplayTitle, getEntity, getIdAsString, getLatestVersionsOfAttachments, getOutgoingLinks, getPermissions, getReferralLinks, getRenderedVersionComment, getSearchableDependants, getTrackbackLinks, getTypeEnum, getUserAccessor, getVersionComment, hasContentPermissions, hasPermissions, isCurrent, isDeleted, isRecentlyUpdatedFor, isVersionCommentAvailable, removeAttachment, removeComment, removeContentPermissionSet, removeOutgoingLink, removeReferralLink, removeTrackbackLink, setAttachments, setBodyContent, setBodyContents, setComments, setContent, setContentStatus, setOutgoingLinks, setReferralLinks, setTitle, setTrackbackLinks, setUserAccessor, setVersionComment, toPageContext, toString, trash
 
Methods inherited from class com.atlassian.confluence.core.AbstractLabelableEntityObject
addLabelling, getGlobalLabels, getLabelCount, getLabellings, getLabels, getLabelsForDisplay, getLabelUtil, getPersonalLabels, getTeamLabels, getVisibleLabels, isFavourite, removeLabelling, setLabellings
 
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
 
Methods inherited from interface com.atlassian.confluence.labels.EditableLabelable
getId, isPersistent
 

Field Detail

MESSAGE_ID_SIZE

public static final int MESSAGE_ID_SIZE
Deprecated. 
See Also:
Constant Field Values

MESSAGE_SUBJECT_SIZE

public static final int MESSAGE_SUBJECT_SIZE
Deprecated. 
See Also:
Constant Field Values

CONTENT_TYPE

public static final String CONTENT_TYPE
Deprecated. 
See Also:
Constant Field Values

DEFAULT_NO_SUBJECT

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

Mail

public Mail()
Deprecated. 
Method Detail

getType

public String getType()
Deprecated. 
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()
Deprecated. 
Specified by:
getUrlPath in interface Addressable
Specified by:
getUrlPath in class ContentEntityObject

getAttachmentUrlPath

public String getAttachmentUrlPath(Attachment attachment)
Deprecated. 
Description copied from class: ContentEntityObject
Gets the path relative to Confluence's base URL to view the given attachment in the context of this content (for example, highlighted in the content's list of attachments). Generally you will want to call Attachment.getUrlPath() instead of this method: if we ever implement view pages for individual attachments, that's the method that will be changed to point to them. The default implementation just returns the view page for this content.

Overrides:
getAttachmentUrlPath in class ContentEntityObject
Parameters:
attachment - one of this content's attachments
Returns:
the path relative to the base url to view the attachment in the context of this content.

getAttachmentsUrlPath

public String getAttachmentsUrlPath()
Deprecated. 
Overrides:
getAttachmentsUrlPath in class ContentEntityObject

getMimeMessage

public javax.mail.internet.MimeMessage getMimeMessage()
                                               throws javax.mail.MessagingException
Deprecated. 
Throws:
javax.mail.MessagingException

loadContent

public void loadContent(InputStream in)
                 throws IOException
Deprecated. 
Throws:
IOException

getDefaultBodyType

public BodyType getDefaultBodyType()
Deprecated. 
Overrides:
getDefaultBodyType in class ContentEntityObject

getBodyAsString

public String getBodyAsString()
Deprecated. 
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)
Deprecated. 
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()
Deprecated. 
Specified by:
getTitle in interface EditableLabelable
Overrides:
getTitle in class ContentEntityObject

hasSubject

public boolean hasSubject()
Deprecated. 
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()
Deprecated. 
Get the mail subject string.

See Also:
getDisplayableSubject()

getDisplayableSubject

public String getDisplayableSubject()
Deprecated. 
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()
Deprecated. 
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()
Deprecated. 
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()
Deprecated. 

setMessageId

public void setMessageId(String messageId)
Deprecated. 

getMessageBody

public String getMessageBody()
Deprecated. 

setMimeMessage

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

getInReplyTo

public String getInReplyTo()
Deprecated. 

getReferences

public List getReferences()
Deprecated. 

getFrom

public ConfluenceMailAddress[] getFrom()
Deprecated. 

getFromForSearch

public List getFromForSearch()
Deprecated. 

getRecipientsForSearch

public List getRecipientsForSearch()
Deprecated. 

getRecipients

public ConfluenceMailAddress[] getRecipients()
Deprecated. 

getSentDate

public Date getSentDate()
Deprecated. 

getCreationDate

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

getExcerpt

public String getExcerpt()
Deprecated. 
Overrides:
getExcerpt in class ContentEntityObject

getUnquotedTextForSummary

public String getUnquotedTextForSummary()
Deprecated. 


Copyright © 2003-2012 Atlassian. All Rights Reserved.