public class DefaultContentAdapter extends Object implements ContentEntityAdapter
| Modifier and Type | Field and Description |
|---|---|
static ContentEntityAdapter |
INSTANCE |
| Modifier and Type | Method and Description |
|---|---|
com.atlassian.fugue.Option<String> |
getAttachmentsUrlPath(CustomContentEntityObject pluginContentEntityObject)
Return the URL path to view the list of attachments on the content
|
com.atlassian.fugue.Option<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<String> |
getDisplayTitle(CustomContentEntityObject pluginContentEntityObject)
Gets the display-friendly title for the content.
|
com.atlassian.fugue.Option<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<String> |
getNameForComparison(CustomContentEntityObject pluginContentEntityObject)
Return the sorting-friendly title for the content, if the content is to be sorted in alphabetical order.
|
com.atlassian.fugue.Option<String> |
getUrlPath(CustomContentEntityObject pluginContentEntityObject)
Gets the URL string (relative to the Confluence application context) at which this content can be viewed.
|
VersionChildOwnerPolicy |
getVersionChildPolicy(ContentType contentType)
This will be called by
Versioned.getVersionChildPolicy(com.atlassian.confluence.api.model.content.ContentType) to determine the policy
to be used when saving the CCEO. |
boolean |
isAllowedContainer(ContentEntityObject child,
ContentEntityObject owner)
Determine if a particular content is an acceptable container for a particular child.
|
boolean |
isAllowedParent(CustomContentEntityObject child,
CustomContentEntityObject parent)
Determine if a particular content is an acceptable parent for this content.
|
boolean |
isIndexable(CustomContentEntityObject pluginContentEntityObject,
boolean isDefaultIndexable)
Determine if a particular content should be indexed.
|
boolean |
shouldConvertToContent(CustomContentEntityObject pluginContentEntityObject)
Determine if a particular content is going to be part of the core API.
|
public static final ContentEntityAdapter INSTANCE
public com.atlassian.fugue.Option<String> getUrlPath(CustomContentEntityObject pluginContentEntityObject)
ContentEntityAdaptergetUrlPath in interface ContentEntityAdapterpluginContentEntityObject - the content to be viewedpublic com.atlassian.fugue.Option<String> getDisplayTitle(CustomContentEntityObject pluginContentEntityObject)
ContentEntityAdaptergetDisplayTitle in interface ContentEntityAdapterpluginContentEntityObject - the content to calculate the display title forpublic com.atlassian.fugue.Option<String> getNameForComparison(CustomContentEntityObject pluginContentEntityObject)
ContentEntityAdaptergetNameForComparison in interface ContentEntityAdapterpluginContentEntityObject - the content to calculate the sorting title forpublic com.atlassian.fugue.Option<String> getAttachmentsUrlPath(CustomContentEntityObject pluginContentEntityObject)
ContentEntityAdaptergetAttachmentsUrlPath in interface ContentEntityAdapterpluginContentEntityObject - the content to view attachments forpublic com.atlassian.fugue.Option<String> getAttachmentUrlPath(CustomContentEntityObject pluginContentEntityObject, Attachment attachment)
ContentEntityAdaptergetAttachmentUrlPath in interface ContentEntityAdapterpluginContentEntityObject - the content to view attachments forattachment - the attachment to link topublic BodyType getDefaultBodyType(CustomContentEntityObject pluginContentEntityObject)
ContentEntityAdaptergetDefaultBodyType in interface ContentEntityAdapterpluginContentEntityObject - the content to get the body type ofpublic com.atlassian.fugue.Option<String> getExcerpt(CustomContentEntityObject pluginContentEntityObject)
ContentEntityAdaptergetExcerpt in interface ContentEntityAdapterpluginContentEntityObject - the content to excerptpublic boolean isAllowedParent(CustomContentEntityObject child, CustomContentEntityObject parent)
ContentEntityAdapterCustomContentEntityObjects. Typically this should be used if
CustomContentEntityObject.getPluginModuleKey() returns the same value for both objects.isAllowedParent in interface ContentEntityAdapterContentEntityAdapter.isAllowedContainer(ContentEntityObject, ContentEntityObject)public boolean isAllowedContainer(ContentEntityObject child, ContentEntityObject owner)
ContentEntityAdapterCustomContentEntityObjects. If both types are
CustomContentEntityObjects, this must only be used if CustomContentEntityObject.getPluginModuleKey()
also returns distinct values for both objects.isAllowedContainer in interface ContentEntityAdapterContentEntityAdapter.isAllowedParent(CustomContentEntityObject, CustomContentEntityObject)public boolean isIndexable(CustomContentEntityObject pluginContentEntityObject, boolean isDefaultIndexable)
ContentEntityAdapterisIndexable in interface ContentEntityAdapterpluginContentEntityObject - the entity to checkisDefaultIndexable - if the entity would be indexed absent of this check.public boolean shouldConvertToContent(CustomContentEntityObject pluginContentEntityObject)
ContentEntityAdaptershouldConvertToContent in interface ContentEntityAdapterpluginContentEntityObject - the entity to checkpublic VersionChildOwnerPolicy getVersionChildPolicy(ContentType contentType)
ContentEntityAdapterVersioned.getVersionChildPolicy(com.atlassian.confluence.api.model.content.ContentType) to determine the policy
to be used when saving the CCEO.getVersionChildPolicy in interface ContentEntityAdapterVersionChildOwnerPolicyCopyright © 2003–2015 Atlassian. All rights reserved.