public class RemoteContentServiceImpl extends AbstractRemoteService<ContentService> implements RemoteContentService
| Modifier and Type | Class and Description |
|---|---|
class |
RemoteContentServiceImpl.RemoteContentFinderImpl |
RemoteContentService.RemoteContentFetcher, RemoteContentService.RemoteContentFinder, RemoteContentService.RemoteParameterContentFinder, RemoteContentService.RemoteSingleContentFetcher| Constructor and Description |
|---|
RemoteContentServiceImpl(AuthenticatedWebResourceProvider provider,
com.google.common.util.concurrent.ListeningExecutorService executor) |
| Modifier and Type | Method and Description |
|---|---|
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<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.
|
com.atlassian.util.concurrent.Promise<PageResponse<Content>> |
getChildren(Content parent,
PageRequest pageRequest,
Expansion... expansions)
Retrieve the children of an item of Content.
|
com.atlassian.util.concurrent.Promise<Content> |
update(Content content)
Updates a piece of content.
|
addExpansions, addPageRequest, addPageRequestParams, deleteFuture, getFutureGenericCollection, getFutureMapOfPageResponses, getFutureOption, getFuturePageResponseList, newRestWebResource, postFuture, postFuture, postFuture, postFutureToPageResponse, putFuturepublic RemoteContentServiceImpl(AuthenticatedWebResourceProvider provider, com.google.common.util.concurrent.ListeningExecutorService executor)
public RemoteContentService.RemoteContentFinder find(Expansion... expansions)
RemoteContentServicefind in interface RemoteContentServicepublic com.atlassian.util.concurrent.Promise<com.atlassian.fugue.Option<Macro>> findMacroByHash(ContentId contentId, java.lang.String versionId, java.lang.String hash, Expansion... expansions) throws ServiceException
RemoteContentServicefindMacroByHash in interface RemoteContentServicecontentId - The content to scan for the macroversionId - The version of the page to scan for the macrohash - The hash identifying the body of the macroServiceExceptionpublic com.atlassian.util.concurrent.Promise<Content> create(Content newContent) throws ServiceException
RemoteContentService
Valid ContentRepresentations for the ContentBody can be found in the documentation on the
ContentBodyConversionService.
create in interface RemoteContentServicenewContent - the content to createServiceException - if the content cannot be createdpublic com.atlassian.util.concurrent.Promise<Content> update(Content content) throws ServiceException
RemoteContentService
Valid ContentRepresentations for the ContentBody can be found in the documentation on the
ContentBodyConversionService.
update in interface RemoteContentServicecontent - the updated Content with metadata about the changeServiceExceptionpublic com.atlassian.util.concurrent.Promise<java.lang.Void> delete(Content content) throws ServiceException
RemoteContentServicedelete in interface RemoteContentServicecontent - if of the content to removeServiceException - if the content cannot be found, or cannot be deletedpublic com.atlassian.util.concurrent.Promise<PageResponse<Content>> getChildren(Content parent, PageRequest pageRequest, Expansion... expansions)
RemoteContentService
Children will be Content items of the same type as the parent.
The pageRequest limit is restricted to a maximum page size.
getChildren in interface RemoteContentServiceparent - - the content to retrieve the children forpageRequest - - a pageRequest indicating how much content to retrieve.Copyright © 2003-2014 Atlassian. All Rights Reserved.