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
 java.util.concurrent.Future<Content> create(Content newContent)
          Create a piece of content.
 java.util.concurrent.Future<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
 java.util.concurrent.Future<com.atlassian.fugue.Option<Macro>> findMacroByHash(ContentId contentId, java.lang.String versionId, java.lang.String hash, Expansion... expansions)
          Retrieve details about a macro matching the page, version and macro hash.
 java.util.concurrent.Future<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.

findMacroByHash

public java.util.concurrent.Future<com.atlassian.fugue.Option<Macro>> findMacroByHash(ContentId contentId,
                                                                                      java.lang.String versionId,
                                                                                      java.lang.String hash,
                                                                                      Expansion... expansions)
                                                                               throws ServiceException
Description copied from interface: RemoteContentService
Retrieve details about a macro matching the page, version and macro hash.

Specified by:
findMacroByHash in interface RemoteContentService
Parameters:
contentId - The content to scan for the macro
versionId - The version of the page to scan for the macro
hash - The hash identifying the body of the macro
Returns:
Optionally return a Macro matching the given criteria
Throws:
ServiceException

create

public java.util.concurrent.Future<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 java.util.concurrent.Future<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 java.util.concurrent.Future<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


Copyright © 2003-2014 Atlassian. All Rights Reserved.