com.atlassian.confluence.rest.client
Class RemoteContentServiceImpl

java.lang.Object
  extended by com.atlassian.confluence.rest.client.AbstractRemoteService<ContentService>
      extended by com.atlassian.confluence.rest.client.RemoteContentServiceImpl
All Implemented Interfaces:
RemoteContentService

public class RemoteContentServiceImpl
extends AbstractRemoteService<ContentService>
implements RemoteContentService

ContentService implementation that communicates with Confluence remotely.


Nested Class Summary
 class RemoteContentServiceImpl.RemoteContentFinderImpl
           
 
Nested classes/interfaces inherited from interface com.atlassian.confluence.rest.client.RemoteContentService
RemoteContentService.RemoteContentFetcher, RemoteContentService.RemoteContentFinder, RemoteContentService.RemoteParameterContentFinder, RemoteContentService.RemoteSingleContentFetcher
 
Constructor Summary
RemoteContentServiceImpl(AuthenticatedWebResourceProvider provider, com.google.common.util.concurrent.ListeningExecutorService executor)
           
 
Method Summary
 com.atlassian.util.concurrent.Promise<Content> create(Content newContent)
          Create a piece of content.
 com.atlassian.util.concurrent.Promise<Void> delete(Content content)
          Removes an item of Content from the system.
 RemoteContentService.RemoteContentFinder find(Expansion... expansions)
          Create a content finder to retrieve content from the remote server
 com.atlassian.util.concurrent.Promise<PageResponse<Content>> getChildren(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)
          Permanently delete a trashed piece of content.
 com.atlassian.util.concurrent.Promise<Content> restore(Content content)
          Restore a trashed piece of content.
 com.atlassian.util.concurrent.Promise<Content> trash(Content content)
          Trash a piece of content.
 com.atlassian.util.concurrent.Promise<Content> update(Content content)
          Updates 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

RemoteContentServiceImpl

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

find

public RemoteContentService.RemoteContentFinder find(Expansion... expansions)
Description copied from interface: RemoteContentService
Create a content finder to retrieve content from the remote server

Specified by:
find in interface RemoteContentService
Returns:
the content, if one exists matching the id, or none otherwise.

create

public com.atlassian.util.concurrent.Promise<Content> create(Content newContent)
Description copied from interface: RemoteContentService
Create a piece of content.

Valid ContentRepresentations for the ContentBody can be found in the documentation on the ContentBodyConversionService.

Specified by:
create in interface RemoteContentService
Parameters:
newContent - the content to create
Returns:
the content created

update

public com.atlassian.util.concurrent.Promise<Content> update(Content content)
Description copied from interface: RemoteContentService
Updates a piece of content.

Valid ContentRepresentations for the ContentBody can be found in the documentation on the ContentBodyConversionService.

Specified by:
update in interface RemoteContentService
Parameters:
content - the updated Content with metadata about the change
Returns:
the updated content after being persisted

trash

public com.atlassian.util.concurrent.Promise<Content> trash(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:
trash in interface RemoteContentService
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: RemoteContentService
Restore a trashed piece of content.

Specified by:
restore in interface RemoteContentService
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: RemoteContentService
Permanently delete a trashed piece of content.

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

delete

public com.atlassian.util.concurrent.Promise<Void> delete(Content content)
Description copied from interface: RemoteContentService
Removes an item of Content from the system.

Specified by:
delete in interface RemoteContentService
Parameters:
content - if of the content to remove

getChildren

public com.atlassian.util.concurrent.Promise<PageResponse<Content>> getChildren(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:
getChildren in interface RemoteContentService
Parameters:
parent - - the content to retrieve the children for
pageRequest - - 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()


Copyright © 2003–2015 Atlassian. All rights reserved.