com.atlassian.confluence.api.impl.service.content
Class ContentServiceImpl

java.lang.Object
  extended by com.atlassian.confluence.api.impl.service.content.ContentServiceImpl
All Implemented Interfaces:
ContentService

public class ContentServiceImpl
extends java.lang.Object
implements ContentService

Server implementation of the ContentService. Contrast with the RemoteContentService.


Nested Class Summary
 class ContentServiceImpl.ValidatorImpl
           
 
Nested classes/interfaces inherited from interface com.atlassian.confluence.api.service.content.ContentService
ContentService.ContentFetcher, ContentService.ContentFinder, ContentService.ParameterContentFinder, ContentService.SingleContentFetcher, ContentService.Validator
 
Constructor Summary
ContentServiceImpl(PageManagerInternal pageManager, CommentManagerInternal commentManager, PermissionManager permissionManager, ContentFactory contentFactory, SpaceManager spaceManager, PageService pageService, BlogPostService blogPostService, CommentService commentService, ContentBodyConversionService contentBodyConversionService, AttachmentService attachmentService, ContentFinderFactory contentFinderFactory)
           
 
Method Summary
 Content buildContent(ContentEntityObject entity, Expansion... expansions)
           
 Content create(Content newContent)
          Create a piece of content.
 void delete(Content content)
          Removes a piece 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.
 void setPermissionManager(PermissionManager permissionManager)
           
 Content update(Content updatedContent)
          Updates a piece of content.
 ContentServiceImpl.ValidatorImpl validator()
          Get the validator view of the ContentService.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContentServiceImpl

public ContentServiceImpl(PageManagerInternal pageManager,
                          CommentManagerInternal commentManager,
                          PermissionManager permissionManager,
                          ContentFactory contentFactory,
                          SpaceManager spaceManager,
                          PageService pageService,
                          BlogPostService blogPostService,
                          CommentService commentService,
                          ContentBodyConversionService contentBodyConversionService,
                          AttachmentService attachmentService,
                          ContentFinderFactory contentFinderFactory)
Method Detail

find

public ContentService.ContentFinder find(Expansion... expansions)
Description copied from interface: ContentService
Create a ContentFinder for locating content, the expansions will be applied to each piece of content that matches the finder. Content will be retrieved by using the fetch methods on the returned ContentFinder. For example, to fetch the first 50 blog posts in the DEV Space :
     contentService.find()
     .withSpace("DEV")
     .withType(ContentType.BLOG_POST)
     .fetchMany(new SimplePageRequest(0,50);
     
 

Specified by:
find in interface ContentService
Returns:

create

public Content create(Content newContent)
               throws ServiceException
Description copied from interface: ContentService
Create a piece of content.

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

Specified by:
create in interface ContentService
Parameters:
newContent - the content to create
Returns:
the content created
Throws:
ServiceException - if the content cannot be created

update

public Content update(Content updatedContent)
               throws ServiceException
Description copied from interface: ContentService
Updates a piece of content.

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

Specified by:
update in interface ContentService
Parameters:
updatedContent - the updated Content
Returns:
the updated content after being persisted
Throws:
ServiceException

delete

public void delete(Content content)
            throws ServiceException
Description copied from interface: ContentService
Removes a piece of Content from the system.

Specified by:
delete in interface ContentService
Parameters:
content - the content to remove
Throws:
ServiceException - if the content cannot be found, or cannot be deleted

validator

public ContentServiceImpl.ValidatorImpl validator()
Description copied from interface: ContentService
Get the validator view of the ContentService.

Specified by:
validator in interface ContentService
Returns:
a Validator that can be used to validate service requests.

buildContent

public Content buildContent(ContentEntityObject entity,
                            Expansion... expansions)

setPermissionManager

public void setPermissionManager(PermissionManager permissionManager)


Copyright © 2003-2014 Atlassian. All Rights Reserved.