com.atlassian.confluence.content.render.xhtml
Class DefaultFormatConverter

java.lang.Object
  extended by com.atlassian.confluence.content.render.xhtml.DefaultFormatConverter
All Implemented Interfaces:
FormatConverter

public class DefaultFormatConverter
extends Object
implements FormatConverter


Field Summary
protected  EditorConverter editConverter
           
protected  Renderer editRenderer
           
protected  Renderer viewRenderer
           
protected  XhtmlCleaner xhtmlCleaner
           
 
Constructor Summary
DefaultFormatConverter(EditorConverter editConverter, Renderer editRenderer, Renderer viewRenderer, XhtmlCleaner xhtmlCleaner)
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

editConverter

protected EditorConverter editConverter

editRenderer

protected Renderer editRenderer

viewRenderer

protected Renderer viewRenderer

xhtmlCleaner

protected XhtmlCleaner xhtmlCleaner
Constructor Detail

DefaultFormatConverter

public DefaultFormatConverter(EditorConverter editConverter,
                              Renderer editRenderer,
                              Renderer viewRenderer,
                              XhtmlCleaner xhtmlCleaner)
Method Detail

validateAndConvertToStorageFormat

public String validateAndConvertToStorageFormat(ConfluenceActionSupport action,
                                                String wysiwygContent,
                                                com.atlassian.renderer.RenderContext renderContext)
Description copied from interface: FormatConverter
Validates, and adds any errors to the action. Returns the storage format if successful.

Specified by:
validateAndConvertToStorageFormat in interface FormatConverter
Parameters:
action - action to add any errors found into
Returns:

convertToStorageFormat

public String convertToStorageFormat(String wysiwygContent,
                                     com.atlassian.renderer.RenderContext renderContext)
                              throws XhtmlParsingException,
                                     XhtmlException
Description copied from interface: FormatConverter
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.

Specified by:
convertToStorageFormat in interface FormatConverter
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

public String convertToEditorFormat(String storageFormat,
                                    com.atlassian.renderer.RenderContext renderContext)
Description copied from interface: FormatConverter
Converts the storage format into the editor format.

Specified by:
convertToEditorFormat in interface FormatConverter
Returns:

convertToViewFormat

public String convertToViewFormat(String storageFormat,
                                  com.atlassian.renderer.RenderContext renderContext)
Description copied from interface: FormatConverter
Converts the storage format into the view format.

Specified by:
convertToViewFormat in interface FormatConverter
Returns:


Copyright © 2003-2012 Atlassian. All Rights Reserved.