com.atlassian.confluence.rest.resources
Class ContentBodyResource

java.lang.Object
  extended by com.atlassian.confluence.rest.resources.ContentBodyResource

public class ContentBodyResource
extends java.lang.Object

Used for converting ContentBody objects from one format to another.


Constructor Summary
ContentBodyResource(ContentBodyConversionService service)
           
 
Method Summary
 ContentBody convert(ContentBody body, ContentRepresentation toRepresentation)
          Converts between content body representations.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContentBodyResource

public ContentBodyResource(ContentBodyConversionService service)
Method Detail

convert

@PublicApi
public ContentBody convert(ContentBody body,
                                     ContentRepresentation toRepresentation)
                    throws ServiceException

Converts between content body representations.

Not all representations can be converted to/from other formats. Supported conversions:

Source RepresentationDestination Representation Supported
storageview,export_view,editor
editorstorage
viewNone
export_viewNone

Example request URI(s):

  • http://example.com/rest/api/contentbody/convert/view

Parameters:
body - the body to convert from
toRepresentation - the representation to convert to
Returns:
the representation
Throws:
ServiceException


Copyright © 2003-2014 Atlassian. All Rights Reserved.