@ExperimentalApi
public interface ContentService
Content objects such as
 Pages, BlogPosts and Comments.
 This interface provides no capability for searching content, use the SearchService instead.| 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. | 
| com.atlassian.fugue.Option<Content> | find(ContentLocator locator,
    Expansion... expansions)Retrieve a piece of content by some more complex criteria (defined by the ContentLocator). | 
| com.atlassian.fugue.Option<Content> | findById(java.lang.String contentId,
        Expansion... expansions)Retrieve a piece of content by its id. | 
| com.atlassian.fugue.Option<Macro> | findMacro(java.lang.String 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. | 
| ValidationResult | validateCreate(Content newContent)Validate that a piece of content can be included, including permission checks. | 
| ValidationResult | validateDelete(Content content)Validate that a piece of content can be deleted, including permission checks. | 
com.atlassian.fugue.Option<Content> findById(java.lang.String contentId, Expansion... expansions)
contentId - the id of the content you are looking forcom.atlassian.fugue.Option<Macro> findMacro(java.lang.String 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 macroServiceExceptioncom.atlassian.fugue.Option<Content> find(ContentLocator locator, Expansion... expansions)
locator - the locator containing the criteria for the content you are looking forValidationResult validateCreate(Content newContent) throws ServiceException
newContent - the content to be createdServiceExceptionContent 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 changeServiceExceptionValidationResult validateDelete(Content content)
content - the content to be deletedvoid delete(Content content) throws ServiceException
content - if of the content to removeServiceException - if the content cannot be found, or cannot be deletedCopyright © 2003-2014 Atlassian. All Rights Reserved.