public interface ContentEntityAdapter
In case of change to this interface, plugins should extend ContentEntityAdapterParent
which will
get default implementations of any new methods as they are created
Methods that return Option represent an optional feature. If an adapter returns None from these methods, some default value will be used instead.
Modifier and Type | Method and Description |
---|---|
default Optional<String> |
attachmentsUrlPath(CustomContentEntityObject pluginContentEntityObject)
Return the URL path to view the list of attachments on the content
|
default Optional<String> |
attachmentUrlPath(CustomContentEntityObject pluginContentEntityObject,
Attachment attachment)
Return the URL path to view the a particular attachment of the content
|
default Optional<String> |
displayTitle(CustomContentEntityObject pluginContentEntityObject)
Gets the display-friendly title for the content.
|
default Optional<String> |
excerpt(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> |
getAttachmentsUrlPath(CustomContentEntityObject pluginContentEntityObject)
Deprecated.
since 7.0.1. Use
attachmentsUrlPath(CustomContentEntityObject) |
com.atlassian.fugue.Option<String> |
getAttachmentUrlPath(CustomContentEntityObject pluginContentEntityObject,
Attachment attachment)
Deprecated.
since 7.0.1. Use
attachmentUrlPath(CustomContentEntityObject, Attachment) |
BodyType |
getDefaultBodyType(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. Use
displayTitle(CustomContentEntityObject) |
com.atlassian.fugue.Option<String> |
getExcerpt(CustomContentEntityObject pluginContentEntityObject)
Deprecated.
since 7.0.1. Use
excerpt(CustomContentEntityObject) |
com.atlassian.fugue.Option<String> |
getNameForComparison(CustomContentEntityObject pluginContentEntityObject)
Deprecated.
since 7.0.1. Use
nameForComparison(CustomContentEntityObject) |
com.atlassian.fugue.Option<String> |
getUrlPath(CustomContentEntityObject pluginContentEntityObject)
Deprecated.
since 7.0.1. Use
urlPath(CustomContentEntityObject) |
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 container)
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.
|
default Optional<String> |
nameForComparison(CustomContentEntityObject pluginContentEntityObject)
Return the sorting-friendly title for the content, if the content is to be sorted in alphabetical order.
|
boolean |
shouldConvertToContent(CustomContentEntityObject pluginContentEntityObject)
Determine if a particular content is going to be part of the core API.
|
default Optional<String> |
urlPath(CustomContentEntityObject pluginContentEntityObject)
Gets the URL string (relative to the Confluence application context) at which this content can be viewed.
|
@Deprecated com.atlassian.fugue.Option<String> getUrlPath(CustomContentEntityObject pluginContentEntityObject)
urlPath(CustomContentEntityObject)
pluginContentEntityObject
- the content to be vieweddefault Optional<String> urlPath(CustomContentEntityObject pluginContentEntityObject)
pluginContentEntityObject
- the content to be viewed@Deprecated com.atlassian.fugue.Option<String> getDisplayTitle(CustomContentEntityObject pluginContentEntityObject)
displayTitle(CustomContentEntityObject)
pluginContentEntityObject
- the content to calculate the display title fordefault Optional<String> displayTitle(CustomContentEntityObject pluginContentEntityObject)
pluginContentEntityObject
- the content to calculate the display title for@Deprecated com.atlassian.fugue.Option<String> getNameForComparison(CustomContentEntityObject pluginContentEntityObject)
nameForComparison(CustomContentEntityObject)
pluginContentEntityObject
- the content to calculate the sorting title fordefault Optional<String> nameForComparison(CustomContentEntityObject pluginContentEntityObject)
pluginContentEntityObject
- the content to calculate the sorting title for@Deprecated com.atlassian.fugue.Option<String> getAttachmentsUrlPath(CustomContentEntityObject pluginContentEntityObject)
attachmentsUrlPath(CustomContentEntityObject)
pluginContentEntityObject
- the content to view attachments fordefault Optional<String> attachmentsUrlPath(CustomContentEntityObject pluginContentEntityObject)
pluginContentEntityObject
- the content to view attachments for@Deprecated com.atlassian.fugue.Option<String> getAttachmentUrlPath(CustomContentEntityObject pluginContentEntityObject, Attachment attachment)
attachmentUrlPath(CustomContentEntityObject, Attachment)
pluginContentEntityObject
- the content to view attachments forattachment
- the attachment to link todefault Optional<String> attachmentUrlPath(CustomContentEntityObject pluginContentEntityObject, Attachment attachment)
pluginContentEntityObject
- the content to view attachments forattachment
- the attachment to link toBodyType getDefaultBodyType(CustomContentEntityObject pluginContentEntityObject)
pluginContentEntityObject
- the content to get the body type of@Deprecated com.atlassian.fugue.Option<String> getExcerpt(CustomContentEntityObject pluginContentEntityObject)
excerpt(CustomContentEntityObject)
pluginContentEntityObject
- the content to excerptdefault Optional<String> excerpt(CustomContentEntityObject pluginContentEntityObject)
pluginContentEntityObject
- the content to excerptboolean isAllowedParent(CustomContentEntityObject child, CustomContentEntityObject parent)
Parent and child are required to be CustomContentEntityObject
s. Typically this should be used if
CustomContentEntityObject.getPluginModuleKey()
returns the same value for both objects.
boolean isAllowedContainer(ContentEntityObject child, ContentEntityObject container)
Will be invoked for the child adapter and the container adapter, if applicable.
Only one of container or child are required to be CustomContentEntityObject
s. If both types are
CustomContentEntityObject
s, this must only be used if CustomContentEntityObject.getPluginModuleKey()
also returns distinct values for both objects.
boolean isIndexable(CustomContentEntityObject pluginContentEntityObject, boolean isDefaultIndexable)
pluginContentEntityObject
- the entity to checkisDefaultIndexable
- if the entity would be indexed absent of this check.boolean shouldConvertToContent(CustomContentEntityObject pluginContentEntityObject)
pluginContentEntityObject
- the entity to checkVersionChildOwnerPolicy getVersionChildPolicy(ContentType contentType)
Versioned.getVersionChildPolicy(com.atlassian.confluence.api.model.content.ContentType)
to determine the policy
to be used when saving the CCEO.VersionChildOwnerPolicy
Copyright © 2003–2020 Atlassian. All rights reserved.