Class AbstractRemoteContentService
- java.lang.Object
-
- com.atlassian.confluence.rest.client.AbstractRemoteService<ContentService>
-
- com.atlassian.confluence.rest.client.AbstractRemoteContentService
-
- All Implemented Interfaces:
RemoteContentService
- Direct Known Subclasses:
GraphQLRemoteContentServiceImpl
,RemoteContentServiceImpl
public abstract class AbstractRemoteContentService extends AbstractRemoteService<ContentService> implements RemoteContentService
ContentService
implementation that communicates with Confluence remotely.- Since:
- 6.12.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
AbstractRemoteContentService.AbstractRemoteContentFinder
-
Nested classes/interfaces inherited from interface com.atlassian.confluence.rest.client.RemoteContentService
RemoteContentService.RemoteContentFetcher, RemoteContentService.RemoteContentFinder, RemoteContentService.RemoteParameterContentFinder, RemoteContentService.RemoteSingleContentFetcher
-
-
Field Summary
-
Fields inherited from class com.atlassian.confluence.rest.client.AbstractRemoteService
provider
-
-
Constructor Summary
Constructors Constructor Description AbstractRemoteContentService(AuthenticatedWebResourceProvider provider, com.google.common.util.concurrent.ListeningExecutorService executor)
Deprecated.since 8.8AbstractRemoteContentService(AuthenticatedWebResourceProvider provider, ExecutorService executor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
containsExperimentalExpansion(Expansion[] expansions)
CompletionStage<Content>
createCompletionStage(Content newContent)
Create a piece of content.CompletionStage<Content>
createCompletionStage(Content newContent, Expansion... expansions)
Create a piece of content.CompletionStage<Void>
deleteCompletionStage(Content content)
Removes an item of Content from the system.CompletionStage<PageResponse<Content>>
getChildrenCompletionStage(Content parent, PageRequest pageRequest, Expansion... expansions)
Retrieve the children of an item of Content.com.sun.jersey.api.client.WebResource
newContentWebResource()
com.sun.jersey.api.client.WebResource
newExperimentalContentWebResource()
CompletionStage<Void>
purgeCompletionStage(Content content)
Permanently delete a trashed piece of content.CompletionStage<Content>
restoreCompletionStage(Content content)
Restore a trashed piece of content.CompletionStage<Content>
trashCompletionStage(Content content)
Trash a piece of content.CompletionStage<Content>
updateCompletionStage(Content content)
Updates a piece of content.-
Methods inherited from class com.atlassian.confluence.rest.client.AbstractRemoteService
addExpansions, addPageRequest, addPageRequestParams, deleteCompletionStage, deleteCompletionStage, deleteFuture, deleteFuture, getCompletionStage, getCompletionStageGenericCollection, getCompletionStageMap, getCompletionStageMapOfPageResponses, getCompletionStageOptional, getCompletionStagePageResponseList, getCompletionStageSearchPageResponseList, getExecutor, getFuture, getFutureGenericCollection, getFutureMap, getFutureMapOfPageResponses, getFutureOption, getFutureOptional, getFuturePageResponseList, newExperimentalRestWebResource, newRestWebResource, postCompletionStage, postCompletionStage, postCompletionStage, postCompletionStageToPageResponse, postFuture, postFuture, postFuture, postFutureToPageResponse, postVoidCompletionStage, putCompletionStage, putFuture
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.atlassian.confluence.rest.client.RemoteContentService
create, create, delete, find, getChildren, purge, restore, trash, update
-
-
-
-
Constructor Detail
-
AbstractRemoteContentService
public AbstractRemoteContentService(AuthenticatedWebResourceProvider provider, ExecutorService executor)
- Since:
- 8.8
-
AbstractRemoteContentService
@Deprecated public AbstractRemoteContentService(AuthenticatedWebResourceProvider provider, com.google.common.util.concurrent.ListeningExecutorService executor)
Deprecated.since 8.8
-
-
Method Detail
-
createCompletionStage
public CompletionStage<Content> createCompletionStage(Content newContent)
Description copied from interface:RemoteContentService
Create a piece of content.Valid
ContentRepresentation
s for theContentBody
can be found in the documentation on theContentBodyConversionService
.- Specified by:
createCompletionStage
in interfaceRemoteContentService
- Parameters:
newContent
- the content to create- Returns:
- the content created
-
createCompletionStage
public CompletionStage<Content> createCompletionStage(Content newContent, Expansion... expansions) throws ServiceException
Description copied from interface:RemoteContentService
Create a piece of content.Valid
ContentRepresentation
s for theContentBody
can be found in the documentation on theContentBodyConversionService
.- Specified by:
createCompletionStage
in interfaceRemoteContentService
- 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
-
updateCompletionStage
public CompletionStage<Content> updateCompletionStage(Content content)
Description copied from interface:RemoteContentService
Updates a piece of content.Valid
ContentRepresentation
s for theContentBody
can be found in the documentation on theContentBodyConversionService
.- Specified by:
updateCompletionStage
in interfaceRemoteContentService
- Parameters:
content
- the updatedContent
with metadata about the change- Returns:
- the updated content after being persisted
-
trashCompletionStage
public CompletionStage<Content> trashCompletionStage(Content content)
Description copied from interface:RemoteContentService
Trash a piece of content.The
RemoteContentService.delete(Content)
method should be used for content that doesn't support trashing. Currently Pages and Blogposts support trashing.- Specified by:
trashCompletionStage
in interfaceRemoteContentService
- Parameters:
content
- the content to be trashed- Returns:
- the content after being trashed
-
restoreCompletionStage
public CompletionStage<Content> restoreCompletionStage(Content content)
Description copied from interface:RemoteContentService
Restore a trashed piece of content.- Specified by:
restoreCompletionStage
in interfaceRemoteContentService
- Parameters:
content
- the content to be restored- Returns:
- the content after being restored
-
purgeCompletionStage
public CompletionStage<Void> purgeCompletionStage(Content content)
Description copied from interface:RemoteContentService
Permanently delete a trashed piece of content.- Specified by:
purgeCompletionStage
in interfaceRemoteContentService
- Parameters:
content
- the content to be purged
-
deleteCompletionStage
public CompletionStage<Void> deleteCompletionStage(Content content)
Description copied from interface:RemoteContentService
Removes an item of Content from the system.- Specified by:
deleteCompletionStage
in interfaceRemoteContentService
- Parameters:
content
- if of the content to remove
-
getChildrenCompletionStage
public CompletionStage<PageResponse<Content>> getChildrenCompletionStage(Content parent, PageRequest pageRequest, Expansion... expansions)
Description copied from interface:RemoteContentService
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.
- Specified by:
getChildrenCompletionStage
in interfaceRemoteContentService
- 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.
-
newContentWebResource
public com.sun.jersey.api.client.WebResource newContentWebResource()
-
newExperimentalContentWebResource
public com.sun.jersey.api.client.WebResource newExperimentalContentWebResource()
-
containsExperimentalExpansion
protected boolean containsExperimentalExpansion(Expansion[] expansions)
-
-