Class RemoteContentTrashServiceImpl
java.lang.Object
com.atlassian.confluence.rest.client.AbstractRemoteService<ContentTrashService>
com.atlassian.confluence.rest.client.impl.RemoteContentTrashServiceImpl
- All Implemented Interfaces:
RemoteContentTrashService
public class RemoteContentTrashServiceImpl
extends AbstractRemoteService<ContentTrashService>
implements RemoteContentTrashService
ContentTrashService
implementation that communicates with Confluence remotely.-
Field Summary
Fields inherited from class com.atlassian.confluence.rest.client.AbstractRemoteService
provider
-
Constructor Summary
ConstructorsConstructorDescriptionRemoteContentTrashServiceImpl
(AuthenticatedWebResourceProvider provider, ExecutorService executor) -
Method Summary
Modifier and TypeMethodDescriptiongetTrashContentsCompletionStage
(Space space, LimitedRequest limitedRequest, Expansion... expansions) purgeCompletionStage
(Content content) Permanently delete a piece of content.restoreCompletionStage
(Content content) Restore a trashed piece of content.trashCompletionStage
(Content content) Trash a piece of content.Methods inherited from class com.atlassian.confluence.rest.client.AbstractRemoteService
addExpansions, addPageRequest, addPageRequestParams, deleteCompletionStage, deleteCompletionStage, getCompletionStage, getCompletionStageGenericCollection, getCompletionStageMap, getCompletionStageMapOfGenericListResponse, getCompletionStageMapOfPageResponses, getCompletionStageOptional, getCompletionStagePageResponseList, getCompletionStageSearchPageResponseList, getExecutor, newExperimentalRestWebTarget, newWebTarget, postCompletionStage, postCompletionStage, postCompletionStage, postCompletionStageToPageResponse, postVoidCompletionStage, putCompletionStage, putVoidCompletionStage
-
Constructor Details
-
RemoteContentTrashServiceImpl
public RemoteContentTrashServiceImpl(AuthenticatedWebResourceProvider provider, ExecutorService executor) - Since:
- 9.0
-
-
Method Details
-
trashCompletionStage
Description copied from interface:RemoteContentTrashService
Trash a piece of content.The
RemoteContentTrashService.purgeCompletionStage(Content)
method can be used for content that doesn't support trashing. Currently, only content with typesContentType.PAGE
andContentType.BLOG_POST
support trashing.- Specified by:
trashCompletionStage
in interfaceRemoteContentTrashService
- Parameters:
content
- the content to be trashed- Returns:
- the content after being trashed
-
restoreCompletionStage
Description copied from interface:RemoteContentTrashService
Restore a trashed piece of content.- Specified by:
restoreCompletionStage
in interfaceRemoteContentTrashService
- Parameters:
content
- the content to be restored- Returns:
- the content after being restored
-
purgeCompletionStage
Description copied from interface:RemoteContentTrashService
Permanently delete a piece of content.There are two main cases:
- Trashable content (e.g. Pages, BlogPosts) must have status "trashed" to be purged.
- Non-trashable content (e.g. Comments, Attachment) can be purged with status "current".
- Specified by:
purgeCompletionStage
in interfaceRemoteContentTrashService
- Parameters:
content
- the content to be purged
-
getTrashContentsCompletionStage
public CompletionStage<PageResponse<Content>> getTrashContentsCompletionStage(Space space, LimitedRequest limitedRequest, Expansion... expansions) - Specified by:
getTrashContentsCompletionStage
in interfaceRemoteContentTrashService
- Parameters:
space
- the space where the trash contents belong tolimitedRequest
- the pagination request, with a cursor which is an identifier to skip results from a previous query when paginating and limit for the resultexpansions
- the optional properties to expand on the result- Returns:
- the contents of the trash, up to the request limit
-