com.atlassian.confluence.rest.client.impl
Class RemoteContentTrashServiceImpl

java.lang.Object
  extended by com.atlassian.confluence.rest.client.AbstractRemoteService<ContentTrashService>
      extended by 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.


Constructor Summary
RemoteContentTrashServiceImpl(AuthenticatedWebResourceProvider provider, com.google.common.util.concurrent.ListeningExecutorService executor)
           
 
Method Summary
 com.atlassian.util.concurrent.Promise<Void> purge(Content content)
          Permanently delete a piece of content.
 com.atlassian.util.concurrent.Promise<Content> restore(Content content)
          Restore a trashed piece of content.
 com.atlassian.util.concurrent.Promise<Void> trash(Content content)
          Trash a piece of content.
 
Methods inherited from class com.atlassian.confluence.rest.client.AbstractRemoteService
addExpansions, addPageRequest, addPageRequestParams, deleteFuture, deleteFuture, getFuture, getFutureGenericCollection, getFutureMap, getFutureMapOfPageResponses, getFutureOption, getFuturePageResponseList, newExperimentalRestWebResource, newRestWebResource, postFuture, postFuture, postFuture, postFutureToPageResponse, putFuture
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteContentTrashServiceImpl

public RemoteContentTrashServiceImpl(AuthenticatedWebResourceProvider provider,
                                     com.google.common.util.concurrent.ListeningExecutorService executor)
Method Detail

trash

public com.atlassian.util.concurrent.Promise<Void> trash(Content content)
Description copied from interface: RemoteContentTrashService
Trash a piece of content.

The RemoteContentTrashService.purge(Content) method can be used for content that doesn't support trashing. Currently, only content with types ContentType.PAGE and ContentType.BLOG_POST support trashing.

Specified by:
trash in interface RemoteContentTrashService
Parameters:
content - the content to be trashed
Returns:
the content after being trashed

restore

public com.atlassian.util.concurrent.Promise<Content> restore(Content content)
Description copied from interface: RemoteContentTrashService
Restore a trashed piece of content.

Specified by:
restore in interface RemoteContentTrashService
Parameters:
content - the content to be restored
Returns:
the content after being restored

purge

public com.atlassian.util.concurrent.Promise<Void> purge(Content content)
Description copied from interface: RemoteContentTrashService
Permanently delete a piece of content.

There are two main cases:

Specified by:
purge in interface RemoteContentTrashService
Parameters:
content - the content to be purged


Copyright © 2003–2015 Atlassian. All rights reserved.