Class RemoteContentDraftServiceImpl
java.lang.Object
com.atlassian.confluence.rest.client.AbstractRemoteService<ContentDraftService>
com.atlassian.confluence.rest.client.RemoteContentDraftServiceImpl
- All Implemented Interfaces:
RemoteContentDraftService
public class RemoteContentDraftServiceImpl
extends AbstractRemoteService<ContentDraftService>
implements RemoteContentDraftService
ContentService implementation that communicates with Confluence remotely.
-
Field Summary
Fields inherited from class com.atlassian.confluence.rest.client.AbstractRemoteService
provider
-
Constructor Summary
ConstructorsConstructorDescriptionRemoteContentDraftServiceImpl
(AuthenticatedWebResourceProvider provider, ExecutorService executor) -
Method Summary
Modifier and TypeMethodDescriptiondeleteDraftCompletionStage
(ContentId contentId) Deletes the draft.publishEditDraftCompletionStage
(Content content, ContentDraftService.ConflictPolicy conflictPolicy) Update contentpublishNewDraftCompletionStage
(Content content, Expansion... expansions) Publishes the draft.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
-
RemoteContentDraftServiceImpl
public RemoteContentDraftServiceImpl(AuthenticatedWebResourceProvider provider, ExecutorService executor) - Since:
- 9.0
-
-
Method Details
-
publishNewDraftCompletionStage
public CompletionStage<Content> publishNewDraftCompletionStage(Content content, Expansion... expansions) Description copied from interface:RemoteContentDraftService
Publishes the draft. This will change the status of the current draft to current.- Specified by:
publishNewDraftCompletionStage
in interfaceRemoteContentDraftService
- Parameters:
content
- new content to be createdexpansions
- An array list of properties to expand on the content.- Returns:
- the newly published content
-
publishEditDraftCompletionStage
public CompletionStage<Content> publishEditDraftCompletionStage(Content content, ContentDraftService.ConflictPolicy conflictPolicy) Description copied from interface:RemoteContentDraftService
Update content- Specified by:
publishEditDraftCompletionStage
in interfaceRemoteContentDraftService
- Parameters:
content
- page/blogpost contentconflictPolicy
- the policy to apply on a conflict, either abort or automerge. No mergeable conflicts will still return a 409 even if policy is automerge- Returns:
- the updated content
-
deleteDraftCompletionStage
Description copied from interface:RemoteContentDraftService
Deletes the draft. In the case of shared drafts, the draft is not allowed to be deleted if there is a corresponding published page- Specified by:
deleteDraftCompletionStage
in interfaceRemoteContentDraftService
- Parameters:
contentId
- id of the page/blogpost content
-