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
Constructors Constructor Description RemoteContentDraftServiceImpl(AuthenticatedWebResourceProvider provider, com.google.common.util.concurrent.ListeningExecutorService executor)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description com.atlassian.util.concurrent.Promise<Void>
deleteDraft(ContentId contentId)
Deprecated.since 7.0.1.CompletionStage<Void>
deleteDraftCompletionStage(ContentId contentId)
Deletes the draft.com.atlassian.util.concurrent.Promise<Content>
publishEditDraft(Content content, ContentDraftService.ConflictPolicy conflictPolicy)
Deprecated.since 7.0.1.CompletionStage<Content>
publishEditDraftCompletionStage(Content content, ContentDraftService.ConflictPolicy conflictPolicy)
Update contentcom.atlassian.util.concurrent.Promise<Content>
publishNewDraft(Content content, Expansion... expansions)
Deprecated.since 7.0.1.CompletionStage<Content>
publishNewDraftCompletionStage(Content content, Expansion... expansions)
Publishes the draft.-
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
-
-
-
-
Constructor Detail
-
RemoteContentDraftServiceImpl
public RemoteContentDraftServiceImpl(AuthenticatedWebResourceProvider provider, com.google.common.util.concurrent.ListeningExecutorService executor)
-
-
Method Detail
-
publishNewDraft
@Deprecated public com.atlassian.util.concurrent.Promise<Content> publishNewDraft(Content content, Expansion... expansions)
Deprecated.since 7.0.1. UsepublishNewDraftCompletionStage(Content, Expansion...)
instead.Description copied from interface:RemoteContentDraftService
Publishes the draft. This will change the status of the current draft to current.- Specified by:
publishNewDraft
in interfaceRemoteContentDraftService
- Parameters:
content
- new content to be createdexpansions
- An array list of properties to expand on the content.- Returns:
- the newly published content
-
publishEditDraft
@Deprecated public com.atlassian.util.concurrent.Promise<Content> publishEditDraft(Content content, ContentDraftService.ConflictPolicy conflictPolicy)
Deprecated.since 7.0.1. UsepublishEditDraftCompletionStage(Content, ContentDraftService.ConflictPolicy)
instead.Description copied from interface:RemoteContentDraftService
Update content- Specified by:
publishEditDraft
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
-
deleteDraft
@Deprecated public com.atlassian.util.concurrent.Promise<Void> deleteDraft(ContentId contentId)
Deprecated.since 7.0.1. UsedeleteDraftCompletionStage(ContentId)
instead.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:
deleteDraft
in interfaceRemoteContentDraftService
- Parameters:
contentId
- id of the page/blogpost content
-
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
public CompletionStage<Void> deleteDraftCompletionStage(ContentId contentId)
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
-
-