com.atlassian.confluence.rest.client
Interface RemoteContentService

All Known Implementing Classes:
RemoteContentServiceImpl

public interface RemoteContentService

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


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.
 java.util.concurrent.Future<com.atlassian.fugue.Option<Content>> find(ContentLocator locator, Expansion... expansions)
          Retrieve a piece of content by some more complex criteria (defined by the ContentLocator).
 java.util.concurrent.Future<com.atlassian.fugue.Option<Content>> findById(java.lang.String contentId, Expansion... expansions)
          Retrieve a piece of content by its id.
 java.util.concurrent.Future<Content> update(Content content)
          Updates a piece of content.
 

Method Detail

findById

java.util.concurrent.Future<com.atlassian.fugue.Option<Content>> findById(java.lang.String contentId,
                                                                          Expansion... expansions)
Retrieve a piece of content by its id.

Parameters:
contentId - the id of the content you are looking for
Returns:
the content, if one exists matching the id, or none otherwise.

find

java.util.concurrent.Future<com.atlassian.fugue.Option<Content>> find(ContentLocator locator,
                                                                      Expansion... expansions)
Retrieve a piece of content by some more complex criteria (defined by the ContentLocator).

Parameters:
locator - the locator containing the criteria for the content you are looking for
Returns:
the content, if one exists matching the criteria, or none otherwise.

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-2013 Atlassian. All Rights Reserved.