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<java.lang.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.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, getFutureGenericCollection, getFutureMapOfPageResponses, getFutureOption, getFuturePageResponseList, 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)
                                                      throws ServiceException
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
Throws:
ServiceException - if the content cannot be created

update

public com.atlassian.util.concurrent.Promise<Content> update(Content content)
                                                      throws ServiceException
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
Throws:
ServiceException

delete

public com.atlassian.util.concurrent.Promise<java.lang.Void> delete(Content content)
                                                             throws ServiceException
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
Throws:
ServiceException - if the content cannot be found, or cannot be deleted

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()


Copyright © 2003-2014 Atlassian. All Rights Reserved.