com.atlassian.confluence.rest.client
Interface RemoteContentService

All Known Implementing Classes:
RemoteContentServiceImpl

@ExperimentalApi
public interface RemoteContentService

ContentService implementation that communicates with Confluence remotely using the Confluence REST API. Provides future returning equivalents for the methods in ContentService.


Nested Class Summary
static interface RemoteContentService.RemoteContentFetcher
           
static interface RemoteContentService.RemoteContentFinder
           
static interface RemoteContentService.RemoteParameterContentFinder
           
static interface RemoteContentService.RemoteSingleContentFetcher
           
 
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.
 

Method Detail

find

RemoteContentService.RemoteContentFinder find(Expansion... expansions)
Create a content finder to retrieve content from the remote server

Returns:
the content, if one exists matching the id, or none otherwise.

findMacroByHash

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

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

java.util.concurrent.Future<Content> create(Content newContent)
                                            throws ServiceException
Create a piece of content.

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

Parameters:
newContent - the content to create
Returns:
the content created
Throws:
ServiceException - if the content cannot be created

update

java.util.concurrent.Future<Content> update(Content content)
                                            throws ServiceException
Updates a piece of content.

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

Parameters:
content - the updated Content with metadata about the change
Returns:
the updated content after being persisted
Throws:
ServiceException

delete

java.util.concurrent.Future<java.lang.Void> delete(Content content)
                                                   throws ServiceException
Removes an item of Content from the system.

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.