public class DefaultFormatConverter extends Object implements FormatConverter
Modifier and Type | Field and Description |
---|---|
protected EditorConverter |
editConverter |
protected Renderer |
editRenderer |
protected RenderingEventPublisher |
renderingEventPublisher |
protected StorageFormatCleaner |
storageFormatCleaner |
protected Renderer |
viewRenderer |
Constructor and Description |
---|
DefaultFormatConverter(EditorConverter editConverter,
Renderer editRenderer,
Renderer viewRenderer,
StorageFormatCleaner storageFormatCleaner)
|
DefaultFormatConverter(EditorConverter editConverter,
Renderer editRenderer,
Renderer viewRenderer,
StorageFormatCleaner storageFormatCleaner,
RenderingEventPublisher renderingEventPublisher) |
Modifier and Type | Method and Description |
---|---|
String |
cleanEditorFormat(String wysiwygContent,
com.atlassian.renderer.RenderContext renderContext)
Cleans the editor format
|
String |
convertToEditorFormat(String storageFormat,
com.atlassian.renderer.RenderContext renderContext)
Converts the storage format into the editor format.
|
RenderResult |
convertToEditorFormatWithResult(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.
|
String |
validateAndConvertToStorageFormat(String wysiwygContent,
com.atlassian.renderer.RenderContext renderContext)
Validates, throwing exceptions if failures found.
|
protected EditorConverter editConverter
protected Renderer editRenderer
protected Renderer viewRenderer
protected StorageFormatCleaner storageFormatCleaner
protected RenderingEventPublisher renderingEventPublisher
@Deprecated public DefaultFormatConverter(EditorConverter editConverter, Renderer editRenderer, Renderer viewRenderer, StorageFormatCleaner storageFormatCleaner)
public DefaultFormatConverter(EditorConverter editConverter, Renderer editRenderer, Renderer viewRenderer, StorageFormatCleaner storageFormatCleaner, RenderingEventPublisher renderingEventPublisher)
public String validateAndConvertToStorageFormat(ConfluenceActionSupport action, String wysiwygContent, com.atlassian.renderer.RenderContext renderContext)
FormatConverter
validateAndConvertToStorageFormat
in interface FormatConverter
action
- action to add any errors found intopublic String validateAndConvertToStorageFormat(String wysiwygContent, com.atlassian.renderer.RenderContext renderContext) throws BadRequestException
FormatConverter
validateAndConvertToStorageFormat
in interface FormatConverter
BadRequestException
public String convertToStorageFormat(String wysiwygContent, com.atlassian.renderer.RenderContext renderContext) throws XhtmlException
FormatConverter
convertToStorageFormat
in interface FormatConverter
XhtmlParsingException
XhtmlException
public String convertToEditorFormat(String storageFormat, com.atlassian.renderer.RenderContext renderContext)
FormatConverter
convertToEditorFormat
in interface FormatConverter
public RenderResult convertToEditorFormatWithResult(String storageFormat, com.atlassian.renderer.RenderContext renderContext)
FormatConverter
convertToEditorFormatWithResult
in interface FormatConverter
public String convertToViewFormat(String storageFormat, com.atlassian.renderer.RenderContext renderContext)
FormatConverter
convertToViewFormat
in interface FormatConverter
public String cleanEditorFormat(String wysiwygContent, com.atlassian.renderer.RenderContext renderContext) throws XhtmlException
FormatConverter
cleanEditorFormat
in interface FormatConverter
XhtmlException
Copyright © 2003–2020 Atlassian. All rights reserved.