Interface RestContentManager
- All Known Implementing Classes:
DefaultRestContentManager
public interface RestContentManager
Responsible for managing
ContentEntity
objects.
This manager responsible for
- doing any permission checking
- conversion from Confluence's API objects (eg
Page
,BlogPost
) to a REST levelContentEntity
. - providing a generic content interface
-
Method Summary
Modifier and TypeMethodDescriptionConvert a Confluence model object into its REST representation.expand
(ContentEntity contentEntity) Expands and returns the givenContentEntity
.getContentEntity
(Long id, boolean expand) Gets theContentEntity
object for the given id and expands it if requested to.
-
Method Details
-
getContentEntity
Gets theContentEntity
object for the given id and expands it if requested to. A convenience method that packages up retrieving the Confluence content, converting it to a REST object and then optionally expanding it.null
is returned if the current user is not permitted to view the content or if no content object can be found for the given id- Parameters:
id
- the id of the content entity to retrieve- Returns:
- the converted content object or null if not permitted or doesn't exist
-
convertToContentEntity
Convert a Confluence model object into its REST representation. The ContentEntity returned from this method will not be expanded.- Parameters:
object
- the ContentEntityObject representation of some Confluence content- Returns:
- the equivalent unexpanded ContentEntity
-
expand
Expands and returns the givenContentEntity
.- Parameters:
contentEntity
- the content entity to expand- Returns:
- the expanded content entity
-