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
ContentServiceimplementation that communicates with Confluence remotely.- Since:
- 6.12.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classAbstractRemoteContentService.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)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected booleancontainsExperimentalExpansion(Expansion[] expansions)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.com.atlassian.util.concurrent.Promise<PageResponse<Content>>getChildren(Content parent, PageRequest pageRequest, Expansion... expansions)Deprecated.since 7.0.1.CompletionStage<PageResponse<Content>>getChildrenCompletionStage(Content parent, PageRequest pageRequest, Expansion... expansions)Retrieve the children of an item of Content.com.sun.jersey.api.client.WebResourcenewContentWebResource()com.sun.jersey.api.client.WebResourcenewExperimentalContentWebResource()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.-
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, 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
find
-
-
-
-
Constructor Detail
-
AbstractRemoteContentService
public AbstractRemoteContentService(AuthenticatedWebResourceProvider provider, com.google.common.util.concurrent.ListeningExecutorService executor)
-
-
Method Detail
-
create
@Deprecated public com.atlassian.util.concurrent.Promise<Content> create(Content newContent)
Deprecated.since 7.0.1. UsecreateCompletionStage(Content)instead.Description copied from interface:RemoteContentServiceCreate a piece of content.Valid
ContentRepresentations for theContentBodycan be found in the documentation on theContentBodyConversionService.- Specified by:
createin interfaceRemoteContentService- Parameters:
newContent- the content to create- Returns:
- the content created
-
create
@Deprecated public com.atlassian.util.concurrent.Promise<Content> create(Content newContent, Expansion... expansions)
Deprecated.since 7.0.1. UsecreateCompletionStage(Content, Expansion...)instead.Description copied from interface:RemoteContentServiceCreate a piece of content.Valid
ContentRepresentations for theContentBodycan be found in the documentation on theContentBodyConversionService.- Specified by:
createin interfaceRemoteContentService- Parameters:
newContent- the content to createexpansions- the particular expansions will be applied to the new created content- Returns:
- the content created
-
createCompletionStage
public CompletionStage<Content> createCompletionStage(Content newContent)
Description copied from interface:RemoteContentServiceCreate a piece of content.Valid
ContentRepresentations for theContentBodycan be found in the documentation on theContentBodyConversionService.- Specified by:
createCompletionStagein 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:RemoteContentServiceCreate a piece of content.Valid
ContentRepresentations for theContentBodycan be found in the documentation on theContentBodyConversionService.- Specified by:
createCompletionStagein 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
-
update
@Deprecated public com.atlassian.util.concurrent.Promise<Content> update(Content content)
Deprecated.since 7.0.1. UseupdateCompletionStage(Content)instead.Description copied from interface:RemoteContentServiceUpdates a piece of content.Valid
ContentRepresentations for theContentBodycan be found in the documentation on theContentBodyConversionService.- Specified by:
updatein interfaceRemoteContentService- Parameters:
content- the updatedContentwith metadata about the change- Returns:
- the updated content after being persisted
-
trash
@Deprecated public com.atlassian.util.concurrent.Promise<Content> trash(Content content)
Deprecated.since 7.0.1. UsetrashCompletionStage(Content)instead.Description copied from interface:RemoteContentServiceTrash 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:
trashin interfaceRemoteContentService- Parameters:
content- the content to be trashed- Returns:
- the content after being trashed
-
restore
@Deprecated public com.atlassian.util.concurrent.Promise<Content> restore(Content content)
Deprecated.since 7.0.1. UserestoreCompletionStage(Content)instead.Description copied from interface:RemoteContentServiceRestore a trashed piece of content.- Specified by:
restorein interfaceRemoteContentService- Parameters:
content- the content to be restored- Returns:
- the content after being restored
-
purge
@Deprecated public com.atlassian.util.concurrent.Promise<Void> purge(Content content)
Deprecated.since 7.0.1. UsepurgeCompletionStage(Content)instead.Description copied from interface:RemoteContentServicePermanently delete a trashed piece of content.- Specified by:
purgein interfaceRemoteContentService- Parameters:
content- the content to be purged
-
delete
@Deprecated public com.atlassian.util.concurrent.Promise<Void> delete(Content content)
Deprecated.since 7.0.1. UsedeleteCompletionStage(Content)instead.Description copied from interface:RemoteContentServiceRemoves an item of Content from the system.- Specified by:
deletein interfaceRemoteContentService- Parameters:
content- if of the content to remove
-
updateCompletionStage
public CompletionStage<Content> updateCompletionStage(Content content)
Description copied from interface:RemoteContentServiceUpdates a piece of content.Valid
ContentRepresentations for theContentBodycan be found in the documentation on theContentBodyConversionService.- Specified by:
updateCompletionStagein interfaceRemoteContentService- Parameters:
content- the updatedContentwith metadata about the change- Returns:
- the updated content after being persisted
-
trashCompletionStage
public CompletionStage<Content> trashCompletionStage(Content content)
Description copied from interface:RemoteContentServiceTrash 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:
trashCompletionStagein 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:RemoteContentServiceRestore a trashed piece of content.- Specified by:
restoreCompletionStagein 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:RemoteContentServicePermanently delete a trashed piece of content.- Specified by:
purgeCompletionStagein interfaceRemoteContentService- Parameters:
content- the content to be purged
-
deleteCompletionStage
public CompletionStage<Void> deleteCompletionStage(Content content)
Description copied from interface:RemoteContentServiceRemoves an item of Content from the system.- Specified by:
deleteCompletionStagein interfaceRemoteContentService- Parameters:
content- if of the content to remove
-
getChildren
@Deprecated public com.atlassian.util.concurrent.Promise<PageResponse<Content>> getChildren(Content parent, PageRequest pageRequest, Expansion... expansions)
Deprecated.since 7.0.1. UsegetChildrenCompletionStage(Content, PageRequest, Expansion...)instead.Description copied from interface:RemoteContentServiceRetrieve the children of an item of Content.Children will be
Contentitems of the same type as the parent.The pageRequest limit is restricted to a maximum page size.
- Specified by:
getChildrenin 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.
-
getChildrenCompletionStage
public CompletionStage<PageResponse<Content>> getChildrenCompletionStage(Content parent, PageRequest pageRequest, Expansion... expansions)
Description copied from interface:RemoteContentServiceRetrieve the children of an item of Content.Children will be
Contentitems of the same type as the parent.The pageRequest limit is restricted to a maximum page size.
- Specified by:
getChildrenCompletionStagein 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)
-
-