@ExperimentalApi
public interface ContentService
Content objects such as
Pages, BlogPosts and Comments.| Modifier and Type | Interface and Description |
|---|---|
static interface |
ContentService.ContentFetcher |
static interface |
ContentService.ContentFinder |
static interface |
ContentService.ParameterContentFinder |
static interface |
ContentService.SingleContentFetcher |
static interface |
ContentService.Validator
Provides methods for validating the create, update and delete methods.
|
| Modifier and Type | Method and Description |
|---|---|
Content |
create(Content newContent)
Create a piece of content.
|
void |
delete(Content content)
Removes an item of Content from the system.
|
ContentService.ContentFinder |
find(Expansion... expansions)
Create a ContentFinder for locating content, the expansions will be applied to each piece of content that matches the
finder.
|
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.
|
Content |
update(Content content)
Updates a piece of content.
|
ContentService.Validator |
validator()
get the validator view of the ContentService.
|
com.atlassian.fugue.Option<Macro> findMacroByHash(ContentId contentId, java.lang.String versionId, java.lang.String hash, Expansion... expansions) throws ServiceException
contentId - The content to scan for the macroversionId - The version of the page to scan for the macrohash - The hash identifying the body of the macroServiceExceptionContentService.ContentFinder find(Expansion... expansions)
expansions - Content create(Content newContent) throws ServiceException
Valid ContentRepresentations for the ContentBody can be found in the documentation on the
ContentBodyConversionService.
newContent - the content to createServiceException - if the content cannot be createdContent update(Content content) throws ServiceException
Valid ContentRepresentations for the ContentBody can be found in the documentation on the
ContentBodyConversionService.
content - the updated Content with metadata about the changeServiceExceptionvoid delete(Content content) throws ServiceException
content - the content to removeServiceException - if the content cannot be found, or cannot be deletedContentService.Validator validator()
Copyright © 2003-2014 Atlassian. All Rights Reserved.