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
 java.lang.String convertToEditorFormat(java.lang.String storageFormat, com.atlassian.renderer.RenderContext renderContext)
          Converts the storage format into the editor format.
 java.lang.String convertToStorageFormat(java.lang.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.
 java.lang.String convertToViewFormat(java.lang.String storageFormat, com.atlassian.renderer.RenderContext renderContext)
          Converts the storage format into the view format.
 java.lang.String validateAndConvertToStorageFormat(ConfluenceActionSupport action, java.lang.String wysiwygContent, com.atlassian.renderer.RenderContext renderContext)
          Validates, and adds any errors to the action.
 

Method Detail

validateAndConvertToStorageFormat

java.lang.String validateAndConvertToStorageFormat(ConfluenceActionSupport action,
                                                   java.lang.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

java.lang.String convertToStorageFormat(java.lang.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

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

Parameters:
storageFormat -
renderContext -
Returns:

convertToViewFormat

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

Parameters:
storageFormat -
renderContext -
Returns:


Copyright © 2003-2014 Atlassian. All Rights Reserved.