com.atlassian.confluence.mail.archive.content
Class MailContentEntityAdapter

java.lang.Object
  extended by com.atlassian.confluence.content.ContentEntityAdapterParent
      extended by com.atlassian.confluence.mail.archive.content.MailContentEntityAdapter
All Implemented Interfaces:
ContentEntityAdapter

public class MailContentEntityAdapter
extends ContentEntityAdapterParent


Nested Class Summary
static class MailContentEntityAdapter.State
           
 
Field Summary
static java.lang.String PLUGIN_CONTENT_KEY
           
 
Constructor Summary
MailContentEntityAdapter()
           
 
Method Summary
 com.atlassian.fugue.Option<java.lang.String> getAttachmentsUrlPath(CustomContentEntityObject pluginContentEntityObject)
          Return the URL path to view the list of attachments on the content
 com.atlassian.fugue.Option<java.lang.String> getAttachmentUrlPath(CustomContentEntityObject pluginContentEntityObject, Attachment attachment)
          Return the URL path to view the a particular attachment of the content
 BodyType getDefaultBodyType(CustomContentEntityObject pluginContentEntityObject)
          Get the default type for BodyContent objects attached to this content.
 com.atlassian.fugue.Option<java.lang.String> getDisplayTitle(CustomContentEntityObject pluginContentEntityObject)
          Gets the display-friendly title for the content.
 com.atlassian.fugue.Option<java.lang.String> getExcerpt(CustomContentEntityObject pluginContentEntityObject)
          Get a text-only summary of the content that is suitable for use in activity streams, search results and other places where a short placeholder for the content is necessary.
 com.atlassian.fugue.Option<java.lang.String> getNameForComparison(CustomContentEntityObject pluginContentEntityObject)
          Return the sorting-friendly title for the content, if the content is to be sorted in alphabetical order.
 java.lang.String getUnquotedTextForSummary(CustomContentEntityObject pluginContentEntityObject)
           
 com.atlassian.fugue.Option<java.lang.String> getUrlPath(CustomContentEntityObject pluginContentEntityObject)
          Gets the URL string (relative to the Confluence application context) at which this content can be viewed.
 
Methods inherited from class com.atlassian.confluence.content.ContentEntityAdapterParent
isAllowedParent, isIndexable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PLUGIN_CONTENT_KEY

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

MailContentEntityAdapter

public MailContentEntityAdapter()
Method Detail

getUrlPath

public com.atlassian.fugue.Option<java.lang.String> getUrlPath(CustomContentEntityObject pluginContentEntityObject)
Description copied from interface: ContentEntityAdapter
Gets the URL string (relative to the Confluence application context) at which this content can be viewed.

Specified by:
getUrlPath in interface ContentEntityAdapter
Overrides:
getUrlPath in class ContentEntityAdapterParent
Parameters:
pluginContentEntityObject - the content to be viewed
Returns:
the relative URL path to that content, or none to use to the default

getDisplayTitle

public com.atlassian.fugue.Option<java.lang.String> getDisplayTitle(CustomContentEntityObject pluginContentEntityObject)
Description copied from interface: ContentEntityAdapter
Gets the display-friendly title for the content. For example, a Comment does not have a title of its own, but where the UI needs to display the title of a comment, it uses "Re: Title Of Page Being Commented On".

Specified by:
getDisplayTitle in interface ContentEntityAdapter
Overrides:
getDisplayTitle in class ContentEntityAdapterParent
Parameters:
pluginContentEntityObject - the content to calculate the display title for
Returns:
the display title of that content, or none to use to the default

getNameForComparison

public com.atlassian.fugue.Option<java.lang.String> getNameForComparison(CustomContentEntityObject pluginContentEntityObject)
Description copied from interface: ContentEntityAdapter
Return the sorting-friendly title for the content, if the content is to be sorted in alphabetical order.

Specified by:
getNameForComparison in interface ContentEntityAdapter
Overrides:
getNameForComparison in class ContentEntityAdapterParent
Parameters:
pluginContentEntityObject - the content to calculate the sorting title for
Returns:
the sorting title of that content, or none to use to the default

getAttachmentsUrlPath

public com.atlassian.fugue.Option<java.lang.String> getAttachmentsUrlPath(CustomContentEntityObject pluginContentEntityObject)
Description copied from interface: ContentEntityAdapter
Return the URL path to view the list of attachments on the content

Specified by:
getAttachmentsUrlPath in interface ContentEntityAdapter
Overrides:
getAttachmentsUrlPath in class ContentEntityAdapterParent
Parameters:
pluginContentEntityObject - the content to view attachments for
Returns:
the URL path to view attachments on the content, or none to use to the default

getAttachmentUrlPath

public com.atlassian.fugue.Option<java.lang.String> getAttachmentUrlPath(CustomContentEntityObject pluginContentEntityObject,
                                                                         Attachment attachment)
Description copied from interface: ContentEntityAdapter
Return the URL path to view the a particular attachment of the content

Specified by:
getAttachmentUrlPath in interface ContentEntityAdapter
Overrides:
getAttachmentUrlPath in class ContentEntityAdapterParent
Parameters:
pluginContentEntityObject - the content to view attachments for
attachment - the attachment to link to
Returns:
the URL path to view attachments on the content, or none to use to the default

getDefaultBodyType

public BodyType getDefaultBodyType(CustomContentEntityObject pluginContentEntityObject)
Description copied from interface: ContentEntityAdapter
Get the default type for BodyContent objects attached to this content.

Specified by:
getDefaultBodyType in interface ContentEntityAdapter
Overrides:
getDefaultBodyType in class ContentEntityAdapterParent
Parameters:
pluginContentEntityObject - the content to get the body type of
Returns:
the default BodyType for that content

getExcerpt

public com.atlassian.fugue.Option<java.lang.String> getExcerpt(CustomContentEntityObject pluginContentEntityObject)
Description copied from interface: ContentEntityAdapter
Get a text-only summary of the content that is suitable for use in activity streams, search results and other places where a short placeholder for the content is necessary. The default implementation takes the first 255 characters of the content's main body with most markup characters removed.

Specified by:
getExcerpt in interface ContentEntityAdapter
Overrides:
getExcerpt in class ContentEntityAdapterParent
Parameters:
pluginContentEntityObject - the content to excerpt
Returns:
the excerpt for that content, or none to use the default

getUnquotedTextForSummary

public java.lang.String getUnquotedTextForSummary(CustomContentEntityObject pluginContentEntityObject)


Copyright © 2003-2014 Atlassian. All Rights Reserved.