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 SummaryModifier and TypeMethodDescriptioncleanEditorFormat(String editorFormat, com.atlassian.renderer.RenderContext renderContext) Cleans the editor formatcleanStorageFormat(String storageFormat) Cleans the storage formatconvertToEditorFormat(String storageFormat, com.atlassian.renderer.RenderContext renderContext) Converts the storage format into the editor format.convertToEditorFormatWithResult(String storageFormat, com.atlassian.renderer.RenderContext renderContext) Converts the storage format into the editor format.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.convertToViewFormat(String storageFormat, com.atlassian.renderer.RenderContext renderContext) Converts the storage format into the view format.validateAndConvertToStorageFormat(ConfluenceActionSupport action, String wysiwygContent, com.atlassian.renderer.RenderContext renderContext) Validates, and adds any errors to the action.validateAndConvertToStorageFormat(String wysiwygContent, com.atlassian.renderer.RenderContext renderContext) Validates, throwing exceptions if failures found.
- 
Method Details- 
validateAndConvertToStorageFormatString 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:
 
- 
validateAndConvertToStorageFormatString validateAndConvertToStorageFormat(String wysiwygContent, com.atlassian.renderer.RenderContext renderContext) throws BadRequestException Validates, throwing exceptions if failures found. Returns the storage format if successful.- Parameters:
- wysiwygContent-
- renderContext-
- Returns:
- Throws:
- BadRequestException
 
- 
convertToStorageFormatString 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
 
- 
convertToEditorFormatString convertToEditorFormat(String storageFormat, com.atlassian.renderer.RenderContext renderContext) Converts the storage format into the editor format.- Parameters:
- storageFormat-
- renderContext-
- Returns:
 
- 
convertToEditorFormatWithResultRenderResult convertToEditorFormatWithResult(String storageFormat, com.atlassian.renderer.RenderContext renderContext) Converts the storage format into the editor format.- Parameters:
- storageFormat-
- renderContext-
- Returns:
 
- 
convertToViewFormatString convertToViewFormat(String storageFormat, com.atlassian.renderer.RenderContext renderContext) Converts the storage format into the view format.- Parameters:
- storageFormat-
- renderContext-
- Returns:
 
- 
cleanEditorFormatString cleanEditorFormat(String editorFormat, com.atlassian.renderer.RenderContext renderContext) throws XhtmlException Cleans the editor format- Parameters:
- editorFormat-
- renderContext-
- Returns:
- a cleaned version of the editorFormat
- Throws:
- XhtmlException
 
- 
cleanStorageFormatCleans the storage format- Parameters:
- storageFormat-
- Returns:
- a cleaned version of the storageFormat
 
 
-