Class DefaultFormatConverter
java.lang.Object
com.atlassian.confluence.content.render.xhtml.DefaultFormatConverter
- All Implemented Interfaces:
FormatConverter
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected EditorConverterprotected Rendererprotected RenderingEventPublisherprotected StorageFormatCleanerprotected Renderer -
Constructor Summary
ConstructorsConstructorDescriptionDefaultFormatConverter(EditorConverter editConverter, Renderer editRenderer, Renderer viewRenderer, StorageFormatCleaner storageFormatCleaner) Deprecated.DefaultFormatConverter(EditorConverter editConverter, Renderer editRenderer, Renderer viewRenderer, StorageFormatCleaner storageFormatCleaner, RenderingEventPublisher renderingEventPublisher) -
Method Summary
Modifier and TypeMethodDescriptioncleanEditorFormat(String wysiwygContent, 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.
-
Field Details
-
editConverter
-
editRenderer
-
viewRenderer
-
storageFormatCleaner
-
renderingEventPublisher
-
-
Constructor Details
-
DefaultFormatConverter
@Deprecated public DefaultFormatConverter(EditorConverter editConverter, Renderer editRenderer, Renderer viewRenderer, StorageFormatCleaner storageFormatCleaner) -
DefaultFormatConverter
public DefaultFormatConverter(EditorConverter editConverter, Renderer editRenderer, Renderer viewRenderer, StorageFormatCleaner storageFormatCleaner, RenderingEventPublisher renderingEventPublisher)
-
-
Method Details
-
validateAndConvertToStorageFormat
public String validateAndConvertToStorageFormat(ConfluenceActionSupport action, String wysiwygContent, com.atlassian.renderer.RenderContext renderContext) Description copied from interface:FormatConverterValidates, and adds any errors to the action. Returns the storage format if successful.- Specified by:
validateAndConvertToStorageFormatin interfaceFormatConverter- Parameters:
action- action to add any errors found into- Returns:
-
validateAndConvertToStorageFormat
public String validateAndConvertToStorageFormat(String wysiwygContent, com.atlassian.renderer.RenderContext renderContext) throws BadRequestException Description copied from interface:FormatConverterValidates, throwing exceptions if failures found. Returns the storage format if successful.- Specified by:
validateAndConvertToStorageFormatin interfaceFormatConverter- Returns:
- Throws:
BadRequestException
-
convertToStorageFormat
public String convertToStorageFormat(String wysiwygContent, com.atlassian.renderer.RenderContext renderContext) throws XhtmlException Description copied from interface:FormatConverterReturns 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:
convertToStorageFormatin interfaceFormatConverter- Returns:
- the content that has been submitted as part of a user's attempt to add new content or edit existing content.
- Throws:
XhtmlParsingExceptionXhtmlException
-
convertToEditorFormat
public String convertToEditorFormat(String storageFormat, com.atlassian.renderer.RenderContext renderContext) Description copied from interface:FormatConverterConverts the storage format into the editor format.- Specified by:
convertToEditorFormatin interfaceFormatConverter- Returns:
-
convertToEditorFormatWithResult
public RenderResult convertToEditorFormatWithResult(String storageFormat, com.atlassian.renderer.RenderContext renderContext) Description copied from interface:FormatConverterConverts the storage format into the editor format.- Specified by:
convertToEditorFormatWithResultin interfaceFormatConverter- Returns:
-
convertToViewFormat
public String convertToViewFormat(String storageFormat, com.atlassian.renderer.RenderContext renderContext) Description copied from interface:FormatConverterConverts the storage format into the view format.- Specified by:
convertToViewFormatin interfaceFormatConverter- Returns:
-
cleanEditorFormat
public String cleanEditorFormat(String wysiwygContent, com.atlassian.renderer.RenderContext renderContext) throws XhtmlException Description copied from interface:FormatConverterCleans the editor format- Specified by:
cleanEditorFormatin interfaceFormatConverter- Returns:
- a cleaned version of the editorFormat
- Throws:
XhtmlException
-
cleanStorageFormat
Description copied from interface:FormatConverterCleans the storage format- Specified by:
cleanStorageFormatin interfaceFormatConverter- Returns:
- a cleaned version of the storageFormat
-
DefaultFormatConverter(com.atlassian.confluence.content.render.xhtml.editor.EditorConverter, Renderer, Renderer, StorageFormatCleaner, RenderingEventPublisher)