com.atlassian.confluence.content.render.xhtml
Class DefaultFormatConverter
java.lang.Object
com.atlassian.confluence.content.render.xhtml.DefaultFormatConverter
- All Implemented Interfaces:
- FormatConverter
public class DefaultFormatConverter
- extends java.lang.Object
- implements FormatConverter
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
editConverter
protected EditorConverter editConverter
editRenderer
protected Renderer editRenderer
viewRenderer
protected Renderer viewRenderer
storageFormatCleaner
protected StorageFormatCleaner storageFormatCleaner
DefaultFormatConverter
public DefaultFormatConverter(EditorConverter editConverter,
Renderer editRenderer,
Renderer viewRenderer,
StorageFormatCleaner storageFormatCleaner)
validateAndConvertToStorageFormat
public java.lang.String validateAndConvertToStorageFormat(ConfluenceActionSupport action,
java.lang.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 java.lang.String convertToStorageFormat(java.lang.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 java.lang.String convertToEditorFormat(java.lang.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 java.lang.String convertToViewFormat(java.lang.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-2013 Atlassian. All Rights Reserved.