com.atlassian.confluence.content.render.xhtml
Interface FormatConverter

All Known Implementing Classes:
DefaultFormatConverter

public interface FormatConverter

Provides a convenient service for transforming to and from the storage format into the editor and view formats.

Since:
4.3

Method Summary
 String convertToEditorFormat(String storageFormat, com.atlassian.renderer.RenderContext renderContext)
          Converts the storage format into the editor format.
 String convertToStorageFormat(String wysiwygContent, com.atlassian.renderer.RenderContext renderContext)
          Returns the content that has been submitted as part of a user's attempt to add new content or edit existing content.
 String convertToViewFormat(String storageFormat, com.atlassian.renderer.RenderContext renderContext)
          Converts the storage format into the view format.
 String validateAndConvertToStorageFormat(ConfluenceActionSupport action, String wysiwygContent, com.atlassian.renderer.RenderContext renderContext)
          Validates, and adds any errors to the action.
 

Method Detail

validateAndConvertToStorageFormat

String validateAndConvertToStorageFormat(ConfluenceActionSupport action,
                                         String wysiwygContent,
                                         com.atlassian.renderer.RenderContext renderContext)
Validates, and adds any errors to the action. Returns the storage format if successful.

Parameters:
action - action to add any errors found into
wysiwygContent -
renderContext -
Returns:

convertToStorageFormat

String convertToStorageFormat(String wysiwygContent,
                              com.atlassian.renderer.RenderContext renderContext)
                              throws XhtmlParsingException,
                                     XhtmlException
Returns the content that has been submitted as part of a user's attempt to add new content or edit existing content. The content is returned in storage format ready for saving.

Returns:
the content that has been submitted as part of a user's attempt to add new content or edit existing content.
Throws:
XhtmlParsingException
XhtmlException

convertToEditorFormat

String convertToEditorFormat(String storageFormat,
                             com.atlassian.renderer.RenderContext renderContext)
Converts the storage format into the editor format.

Parameters:
storageFormat -
renderContext -
Returns:

convertToViewFormat

String convertToViewFormat(String storageFormat,
                           com.atlassian.renderer.RenderContext renderContext)
Converts the storage format into the view format.

Parameters:
storageFormat -
renderContext -
Returns:


Copyright © 2003-2013 Atlassian. All Rights Reserved.