Package com.atlassian.confluence.content
Class DefaultContentAdapter
- java.lang.Object
- 
- com.atlassian.confluence.content.DefaultContentAdapter
 
- 
- All Implemented Interfaces:
- ContentEntityAdapter
 
 public class DefaultContentAdapter extends Object implements ContentEntityAdapter This gets set on content if the plugin content adapter for that content type can't be found (it's broken, disabled or deleted)
- 
- 
Field SummaryFields Modifier and Type Field Description static ContentEntityAdapterINSTANCE
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description com.atlassian.fugue.Option<String>getAttachmentsUrlPath(CustomContentEntityObject pluginContentEntityObject)Deprecated.since 7.0.1.com.atlassian.fugue.Option<String>getAttachmentUrlPath(CustomContentEntityObject pluginContentEntityObject, Attachment attachment)Deprecated.since 7.0.1.BodyTypegetDefaultBodyType(CustomContentEntityObject pluginContentEntityObject)Get the default type for BodyContent objects attached to this content.com.atlassian.fugue.Option<String>getDisplayTitle(CustomContentEntityObject pluginContentEntityObject)Deprecated.since 7.0.1.com.atlassian.fugue.Option<String>getExcerpt(CustomContentEntityObject pluginContentEntityObject)Deprecated.since 7.0.1.com.atlassian.fugue.Option<String>getNameForComparison(CustomContentEntityObject pluginContentEntityObject)Deprecated.since 7.0.1.com.atlassian.fugue.Option<String>getUrlPath(CustomContentEntityObject pluginContentEntityObject)Deprecated.since 7.0.1.VersionChildOwnerPolicygetVersionChildPolicy(ContentType contentType)This will be called byVersioned.getVersionChildPolicy(com.atlassian.confluence.api.model.content.ContentType)to determine the policy to be used when saving the CCEO.booleanisAllowedContainer(ContentEntityObject child, ContentEntityObject owner)Determine if a particular content is an acceptable container for a particular child.booleanisAllowedParent(CustomContentEntityObject child, CustomContentEntityObject parent)Determine if a particular content is an acceptable parent for this content.booleanisIndexable(CustomContentEntityObject pluginContentEntityObject, boolean isDefaultIndexable)Determine if a particular content should be indexed.booleanshouldConvertToContent(CustomContentEntityObject pluginContentEntityObject)Determine if a particular content is going to be part of the core API.- 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface com.atlassian.confluence.content.ContentEntityAdapterattachmentsUrlPath, attachmentUrlPath, displayTitle, excerpt, nameForComparison, urlPath
 
- 
 
- 
- 
- 
Field Detail- 
INSTANCEpublic static final ContentEntityAdapter INSTANCE 
 
- 
 - 
Method Detail- 
getUrlPath@Deprecated public com.atlassian.fugue.Option<String> getUrlPath(CustomContentEntityObject pluginContentEntityObject) Deprecated.since 7.0.1. UseContentEntityAdapter.urlPath(CustomContentEntityObject)Description copied from interface:ContentEntityAdapterGets the URL string (relative to the Confluence application context) at which this content can be viewed.- Specified by:
- getUrlPathin interface- ContentEntityAdapter
- Parameters:
- pluginContentEntityObject- the content to be viewed
- Returns:
- the relative URL path to that content, or none to use to the default
 
 - 
getDisplayTitle@Deprecated public com.atlassian.fugue.Option<String> getDisplayTitle(CustomContentEntityObject pluginContentEntityObject) Deprecated.since 7.0.1. UseContentEntityAdapter.displayTitle(CustomContentEntityObject)Description copied from interface:ContentEntityAdapterGets 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:
- getDisplayTitlein interface- ContentEntityAdapter
- 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@Deprecated public com.atlassian.fugue.Option<String> getNameForComparison(CustomContentEntityObject pluginContentEntityObject) Deprecated.since 7.0.1. UseContentEntityAdapter.nameForComparison(CustomContentEntityObject)Description copied from interface:ContentEntityAdapterReturn the sorting-friendly title for the content, if the content is to be sorted in alphabetical order.- Specified by:
- getNameForComparisonin interface- ContentEntityAdapter
- 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@Deprecated public com.atlassian.fugue.Option<String> getAttachmentsUrlPath(CustomContentEntityObject pluginContentEntityObject) Deprecated.since 7.0.1. UseContentEntityAdapter.attachmentsUrlPath(CustomContentEntityObject)Description copied from interface:ContentEntityAdapterReturn the URL path to view the list of attachments on the content- Specified by:
- getAttachmentsUrlPathin interface- ContentEntityAdapter
- 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@Deprecated public com.atlassian.fugue.Option<String> getAttachmentUrlPath(CustomContentEntityObject pluginContentEntityObject, Attachment attachment) Deprecated.Description copied from interface:ContentEntityAdapterReturn the URL path to view the a particular attachment of the content- Specified by:
- getAttachmentUrlPathin interface- ContentEntityAdapter
- 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
 
 - 
getDefaultBodyTypepublic BodyType getDefaultBodyType(CustomContentEntityObject pluginContentEntityObject) Description copied from interface:ContentEntityAdapterGet the default type for BodyContent objects attached to this content.- Specified by:
- getDefaultBodyTypein interface- ContentEntityAdapter
- Parameters:
- pluginContentEntityObject- the content to get the body type of
- Returns:
- the default BodyType for that content
 
 - 
getExcerpt@Deprecated public com.atlassian.fugue.Option<String> getExcerpt(CustomContentEntityObject pluginContentEntityObject) Deprecated.since 7.0.1. UseContentEntityAdapter.excerpt(CustomContentEntityObject)Description copied from interface:ContentEntityAdapterGet 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:
- getExcerptin interface- ContentEntityAdapter
- Parameters:
- pluginContentEntityObject- the content to excerpt
- Returns:
- the excerpt for that content, or none to use the default
 
 - 
isAllowedParentpublic boolean isAllowedParent(CustomContentEntityObject child, CustomContentEntityObject parent) Description copied from interface:ContentEntityAdapterDetermine if a particular content is an acceptable parent for this content. The content object will ensure that there are no loops in the parent/child chain, and that the parent is in the same space as the child (if any), so implementations do not need to check that.Parent and child are required to be CustomContentEntityObjects. Typically this should be used ifCustomContentEntityObject.getPluginModuleKey()returns the same value for both objects.- Specified by:
- isAllowedParentin interface- ContentEntityAdapter
- See Also:
- ContentEntityAdapter.isAllowedContainer(ContentEntityObject, ContentEntityObject)
 
 - 
isAllowedContainerpublic boolean isAllowedContainer(ContentEntityObject child, ContentEntityObject owner) Description copied from interface:ContentEntityAdapterDetermine if a particular content is an acceptable container for a particular child. The content object will ensure that there are no loops in the container/child chain, and that the container is in the same space as the child (if any), so implementations do not need to check that.Will be invoked for the child adapter and the container adapter, if applicable. Only one of container or child are required to be CustomContentEntityObjects. If both types areCustomContentEntityObjects, this must only be used ifCustomContentEntityObject.getPluginModuleKey()also returns distinct values for both objects.- Specified by:
- isAllowedContainerin interface- ContentEntityAdapter
- See Also:
- ContentEntityAdapter.isAllowedParent(CustomContentEntityObject, CustomContentEntityObject)
 
 - 
isIndexablepublic boolean isIndexable(CustomContentEntityObject pluginContentEntityObject, boolean isDefaultIndexable) Description copied from interface:ContentEntityAdapterDetermine if a particular content should be indexed. The isDefaultIndexable parameter will contain the value of super.isIndexable(), so the plugin may choose to follow or override the standard reasons not to index SpaceContentEntityObject (trashed content, content that is not in a space, content that is an old version are all not indexed by default)- Specified by:
- isIndexablein interface- ContentEntityAdapter
- Parameters:
- pluginContentEntityObject- the entity to check
- isDefaultIndexable- if the entity would be indexed absent of this check.
 
 - 
shouldConvertToContentpublic boolean shouldConvertToContent(CustomContentEntityObject pluginContentEntityObject) Description copied from interface:ContentEntityAdapterDetermine if a particular content is going to be part of the core API. Defaults to true.- Specified by:
- shouldConvertToContentin interface- ContentEntityAdapter
- Parameters:
- pluginContentEntityObject- the entity to check
 
 - 
getVersionChildPolicypublic VersionChildOwnerPolicy getVersionChildPolicy(ContentType contentType) Description copied from interface:ContentEntityAdapterThis will be called byVersioned.getVersionChildPolicy(com.atlassian.confluence.api.model.content.ContentType)to determine the policy to be used when saving the CCEO.- Specified by:
- getVersionChildPolicyin interface- ContentEntityAdapter
- See Also:
- VersionChildOwnerPolicy
 
 
- 
 
-