com.atlassian.confluence.plugins.rest.manager
Class DefaultRestContentManager

java.lang.Object
  extended by com.atlassian.confluence.plugins.rest.manager.DefaultRestContentManager
All Implemented Interfaces:
RestContentManager

public class DefaultRestContentManager
extends Object
implements RestContentManager


Constructor Summary
DefaultRestContentManager(ContentEntityManager contentEntityManager, PermissionManager permissionManager, PageManager pageManager, RestAttachmentManager restAttachmentManager, EntityBuilderFactory entityBuilderFactory)
           
 
Method Summary
 ContentEntity convertToContentEntity(ContentEntityObject object)
          Convert a Confluence model object into its REST representation.
 ContentEntity expand(ContentEntity contentEntity)
          Expands and returns the given ContentEntity.
 ContentEntity getContentEntity(Long id, boolean expand)
          Gets the ContentEntity object for the given id and expands it if requested to.
 PermissionManager getPermissionManager()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultRestContentManager

public DefaultRestContentManager(ContentEntityManager contentEntityManager,
                                 PermissionManager permissionManager,
                                 PageManager pageManager,
                                 RestAttachmentManager restAttachmentManager,
                                 EntityBuilderFactory entityBuilderFactory)
Method Detail

expand

public ContentEntity expand(ContentEntity contentEntity)
Description copied from interface: RestContentManager
Expands and returns the given ContentEntity.

Specified by:
expand in interface RestContentManager
Parameters:
contentEntity - the content entity to expand
Returns:
the expanded content entity

getContentEntity

public ContentEntity getContentEntity(Long id,
                                      boolean expand)
Description copied from interface: RestContentManager
Gets the ContentEntity object for the given id and expands it if requested to. A convenience method that packages up retrieving the Confluence content, converting it to a REST object and then optionally expanding it. null is returned if the current user is not permitted to view the content or if no content object can be found for the given id

Specified by:
getContentEntity in interface RestContentManager
Parameters:
id - the id of the content entity to retrieve
Returns:
the converted content object or null if not permitted or doesn't exist

convertToContentEntity

public ContentEntity convertToContentEntity(ContentEntityObject object)
Description copied from interface: RestContentManager
Convert a Confluence model object into its REST representation. The ContentEntity returned from this method will not be expanded.

Specified by:
convertToContentEntity in interface RestContentManager
Parameters:
object - the ContentEntityObject representation of some Confluence content
Returns:
the equivalent unexpanded ContentEntity

getPermissionManager

public PermissionManager getPermissionManager()


Copyright © 2003–2015 Atlassian. All rights reserved.