Interface RemoteContentService
-
- All Known Implementing Classes:
AbstractRemoteContentService
,GraphQLRemoteContentServiceImpl
,RemoteContentServiceImpl
@ExperimentalApi public interface RemoteContentService
ContentService
implementation that communicates with Confluence remotely using the Confluence REST API.Provides future returning equivalents for the methods in ContentService.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
RemoteContentService.RemoteContentFetcher
static interface
RemoteContentService.RemoteContentFinder
static interface
RemoteContentService.RemoteParameterContentFinder
static interface
RemoteContentService.RemoteSingleContentFetcher
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description com.atlassian.util.concurrent.Promise<Content>
create(Content newContent)
Deprecated.since 7.0.1.com.atlassian.util.concurrent.Promise<Content>
create(Content newContent, Expansion... expansions)
Deprecated.since 7.0.1.CompletionStage<Content>
createCompletionStage(Content newContent)
Create a piece of content.CompletionStage<Content>
createCompletionStage(Content newContent, Expansion... expansions)
Create a piece of content.com.atlassian.util.concurrent.Promise<Void>
delete(Content content)
Deprecated.since 7.0.1.CompletionStage<Void>
deleteCompletionStage(Content content)
Removes an item of Content from the system.RemoteContentService.RemoteContentFinder
find(Expansion... expansions)
Create a content finder to retrieve content from the remote servercom.atlassian.util.concurrent.Promise<PageResponse<Content>>
getChildren(Content parent, PageRequest pageRequest, Expansion... expansion)
Deprecated.since 7.0.1.CompletionStage<PageResponse<Content>>
getChildrenCompletionStage(Content parent, PageRequest pageRequest, Expansion... expansion)
Retrieve the children of an item of Content.com.atlassian.util.concurrent.Promise<Void>
purge(Content content)
Deprecated.since 7.0.1.CompletionStage<Void>
purgeCompletionStage(Content content)
Permanently delete a trashed piece of content.com.atlassian.util.concurrent.Promise<Content>
restore(Content content)
Deprecated.since 7.0.1.CompletionStage<Content>
restoreCompletionStage(Content content)
Restore a trashed piece of content.com.atlassian.util.concurrent.Promise<Content>
trash(Content content)
Deprecated.since 7.0.1.CompletionStage<Content>
trashCompletionStage(Content content)
Trash a piece of content.com.atlassian.util.concurrent.Promise<Content>
update(Content content)
Deprecated.since 7.0.1.CompletionStage<Content>
updateCompletionStage(Content content)
Updates a piece of content.
-
-
-
Method Detail
-
find
RemoteContentService.RemoteContentFinder find(Expansion... expansions)
Create a content finder to retrieve content from the remote server- Returns:
- the content, if one exists matching the id, or none otherwise.
-
create
@Deprecated com.atlassian.util.concurrent.Promise<Content> create(Content newContent)
Deprecated.since 7.0.1. UsecreateCompletionStage(Content, Expansion...)
instead.Create a piece of content.Valid
ContentRepresentation
s for theContentBody
can be found in the documentation on theContentBodyConversionService
.- Parameters:
newContent
- the content to create- Returns:
- the content created
- Throws:
ServiceException
- if the content cannot be created
-
createCompletionStage
CompletionStage<Content> createCompletionStage(Content newContent)
Create a piece of content.Valid
ContentRepresentation
s for theContentBody
can be found in the documentation on theContentBodyConversionService
.- Parameters:
newContent
- the content to create- Returns:
- the content created
- Throws:
ServiceException
- if the content cannot be created- Since:
- 7.0.1
-
create
@Deprecated com.atlassian.util.concurrent.Promise<Content> create(Content newContent, Expansion... expansions) throws ServiceException
Deprecated.since 7.0.1. UsecreateCompletionStage(Content, Expansion...)
instead.Create a piece of content.Valid
ContentRepresentation
s for theContentBody
can be found in the documentation on theContentBodyConversionService
.- Parameters:
newContent
- the content to createexpansions
- the particular expansions will be applied to the new created content- Returns:
- the content created
- Throws:
ServiceException
- if the content cannot be created
-
createCompletionStage
CompletionStage<Content> createCompletionStage(Content newContent, Expansion... expansions) throws ServiceException
Create a piece of content.Valid
ContentRepresentation
s for theContentBody
can be found in the documentation on theContentBodyConversionService
.- Parameters:
newContent
- the content to createexpansions
- the particular expansions will be applied to the new created content- Returns:
- the content created
- Throws:
ServiceException
- if the content cannot be created- Since:
- 7.0.1
-
update
@Deprecated com.atlassian.util.concurrent.Promise<Content> update(Content content)
Deprecated.since 7.0.1. UseupdateCompletionStage(Content)
instead.Updates a piece of content.Valid
ContentRepresentation
s for theContentBody
can be found in the documentation on theContentBodyConversionService
.- Parameters:
content
- the updatedContent
with metadata about the change- Returns:
- the updated content after being persisted
-
trash
@Deprecated com.atlassian.util.concurrent.Promise<Content> trash(Content content)
Deprecated.since 7.0.1. UsetrashCompletionStage(Content)
instead.Trash a piece of content.The
delete(Content)
method should be used for content that doesn't support trashing. Currently Pages and Blogposts support trashing.- Parameters:
content
- the content to be trashed- Returns:
- the content after being trashed
-
restore
@Deprecated com.atlassian.util.concurrent.Promise<Content> restore(Content content)
Deprecated.since 7.0.1. UserestoreCompletionStage(Content)
instead.Restore a trashed piece of content.- Parameters:
content
- the content to be restored- Returns:
- the content after being restored
-
purge
@Deprecated com.atlassian.util.concurrent.Promise<Void> purge(Content content)
Deprecated.since 7.0.1. UsepurgeCompletionStage(Content)
instead.Permanently delete a trashed piece of content.- Parameters:
content
- the content to be purged
-
delete
@Deprecated com.atlassian.util.concurrent.Promise<Void> delete(Content content)
Deprecated.since 7.0.1. UsedeleteCompletionStage(Content)
instead.Removes an item of Content from the system.- Parameters:
content
- if of the content to remove- Throws:
ServiceException
- if the content cannot be found, or cannot be deleted
-
updateCompletionStage
CompletionStage<Content> updateCompletionStage(Content content)
Updates a piece of content.Valid
ContentRepresentation
s for theContentBody
can be found in the documentation on theContentBodyConversionService
.- Parameters:
content
- the updatedContent
with metadata about the change- Returns:
- the updated content after being persisted
- Since:
- 7.0.1
-
trashCompletionStage
CompletionStage<Content> trashCompletionStage(Content content)
Trash a piece of content.The
delete(Content)
method should be used for content that doesn't support trashing. Currently Pages and Blogposts support trashing.- Parameters:
content
- the content to be trashed- Returns:
- the content after being trashed
- Since:
- 7.0.1
-
restoreCompletionStage
CompletionStage<Content> restoreCompletionStage(Content content)
Restore a trashed piece of content.- Parameters:
content
- the content to be restored- Returns:
- the content after being restored
- Since:
- 7.0.1
-
purgeCompletionStage
CompletionStage<Void> purgeCompletionStage(Content content)
Permanently delete a trashed piece of content.- Parameters:
content
- the content to be purged- Since:
- 7.0.1
-
deleteCompletionStage
CompletionStage<Void> deleteCompletionStage(Content content)
Removes an item of Content from the system.- Parameters:
content
- if of the content to remove- Throws:
ServiceException
- if the content cannot be found, or cannot be deleted- Since:
- 7.0.1
-
getChildren
@Deprecated com.atlassian.util.concurrent.Promise<PageResponse<Content>> getChildren(Content parent, PageRequest pageRequest, Expansion... expansion)
Deprecated.since 7.0.1. UsegetChildrenCompletionStage(Content, PageRequest, Expansion...)
instead.Retrieve the children of an item of Content.Children will be
Content
items of the same type as the parent.The pageRequest limit is restricted to a maximum page size.
- Parameters:
parent
- - the content to retrieve the children forpageRequest
- - a pageRequest indicating how much content to retrieve.- Returns:
- a partial list of the top level content in this space.
-
getChildrenCompletionStage
CompletionStage<PageResponse<Content>> getChildrenCompletionStage(Content parent, PageRequest pageRequest, Expansion... expansion)
Retrieve the children of an item of Content.Children will be
Content
items of the same type as the parent.The pageRequest limit is restricted to a maximum page size.
- Parameters:
parent
- - the content to retrieve the children forpageRequest
- - a pageRequest indicating how much content to retrieve.- Returns:
- a partial list of the top level content in this space.
- Since:
- 7.0.1
-
-