Class ContentResource
java.lang.Object
com.atlassian.confluence.plugins.restapi.resources.ContentResource
REST wrapper for the ContentService. Provides methods for finding, creating, modifying and deleting Content.
-
Constructor Summary
ConstructorDescriptionContentResource
(ContentService contentService, SpaceService spaceService, ContentMacroService contentMacroService, ContentTrashService contentTrashService, CQLSearchService searchService, ContentDraftService contentDraftService) -
Method Summary
Modifier and TypeMethodDescriptioncreateContent
(Content content, ContentStatus status, String expand) javax.ws.rs.core.Response
delete
(ContentId contentId, ContentStatus status) getContent
(String type, String spaceKey, String title, List<ContentStatus> statuses, String postingDay, String expand, int start, int limit, javax.ws.rs.core.UriInfo uriInfo) getContentByGraph
(ContentId id, String expand, String type, String spaceKey, String title, String postingDay, List<ContentStatus> statuses, Integer version, int offset, String afterOffset, int limit, javax.ws.rs.core.UriInfo uriInfo) getContentById
(ContentId id, List<ContentStatus> statuses, Integer version, String expand) getHistory
(ContentId contentId, String expand) getMacroBodyByHash
(ContentId contentId, int versionId, String hash) Deprecated.getMacroBodyByMacroId
(ContentId contentId, int versionId, String macroId) scanContent
(String spaceKey, List<ContentStatus> statuses, String expand, int limit, String cursor, javax.ws.rs.core.UriInfo uriInfo) search
(String cql, String cqlcontext, String expand, int start, int limit, javax.ws.rs.core.UriInfo uriInfo) update
(ContentId contentId, Content content, ContentStatus status, ContentDraftService.ConflictPolicy conflictPolicy)
-
Constructor Details
-
ContentResource
@Inject public ContentResource(ContentService contentService, SpaceService spaceService, ContentMacroService contentMacroService, ContentTrashService contentTrashService, CQLSearchService searchService, ContentDraftService contentDraftService)
-
-
Method Details
-
getContentByGraph
-
getContentById
@PublicApi public Content getContentById(ContentId id, List<ContentStatus> statuses, Integer version, String expand) throws ServiceException - Throws:
ServiceException
-
createContent
@PublicApi public Content createContent(Content content, ContentStatus status, String expand) throws ServiceException - Throws:
ServiceException
-
getContent
@PublicApi public PageResponse<Content> getContent(String type, String spaceKey, String title, List<ContentStatus> statuses, String postingDay, String expand, int start, int limit, @Context javax.ws.rs.core.UriInfo uriInfo) throws ServiceException - Throws:
ServiceException
-
scanContent
@PublicApi public PageResponse<Content> scanContent(String spaceKey, List<ContentStatus> statuses, String expand, int limit, String cursor, @Context javax.ws.rs.core.UriInfo uriInfo) throws ServiceException - Throws:
ServiceException
-
search
@PublicApi public PageResponse<Content> search(String cql, String cqlcontext, String expand, int start, int limit, @Context javax.ws.rs.core.UriInfo uriInfo) -
getHistory
- Throws:
ServiceException
-
getMacroBodyByHash
@Deprecated @PublicApi public MacroInstance getMacroBodyByHash(ContentId contentId, int versionId, String hash) throws ServiceException Deprecated.- Throws:
ServiceException
-
getMacroBodyByMacroId
@PublicApi public MacroInstance getMacroBodyByMacroId(ContentId contentId, int versionId, String macroId) throws ServiceException - Throws:
ServiceException
-
update
@PublicApi public Content update(ContentId contentId, Content content, ContentStatus status, ContentDraftService.ConflictPolicy conflictPolicy) throws ServiceException - Throws:
ServiceException
-
delete
@PublicApi public javax.ws.rs.core.Response delete(ContentId contentId, ContentStatus status) throws ServiceException - Throws:
ServiceException
-