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)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected boolean
containsExperimentalExpansion(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.WebResource
newContentWebResource()
com.sun.jersey.api.client.WebResource
newExperimentalContentWebResource()
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:RemoteContentService
Create a piece of content.Valid
ContentRepresentation
s for theContentBody
can be found in the documentation on theContentBodyConversionService
.- Specified by:
create
in 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:RemoteContentService
Create a piece of content.Valid
ContentRepresentation
s for theContentBody
can be found in the documentation on theContentBodyConversionService
.- Specified by:
create
in 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: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
-
update
@Deprecated public com.atlassian.util.concurrent.Promise<Content> update(Content content)
Deprecated.since 7.0.1. UseupdateCompletionStage(Content)
instead.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:
update
in interfaceRemoteContentService
- Parameters:
content
- the updatedContent
with 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: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:
trash
in 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:RemoteContentService
Restore a trashed piece of content.- Specified by:
restore
in 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:RemoteContentService
Permanently delete a trashed piece of content.- Specified by:
purge
in 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:RemoteContentService
Removes an item of Content from the system.- Specified by:
delete
in interfaceRemoteContentService
- Parameters:
content
- if of the content to remove
-
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
-
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: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:
getChildren
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.
-
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)
-
-