public interface EditorFormatService
Modifier and Type | Method and Description |
---|---|
EmbeddedImage |
convertEditToEmbeddedImage(String editFragment,
ConversionContext context)
Returns a
EmbeddedImage from the supplied editFragment . |
Link |
convertEditToLink(String editFragment,
ConversionContext context)
Returns a
MacroDefinition from the supplied editFragment . |
MacroDefinition |
convertEditToMacroDefinition(String editFragment,
ConversionContext context)
Returns a
MacroDefinition from the supplied editFragment . |
String |
convertEditToStorage(String editFragment,
ConversionContext context)
Returns an storage format fragment for the supplied
editFragment . |
String |
convertEmbeddedImageToEdit(EmbeddedImage embeddedImage,
ConversionContext context)
Returns an edit format fragment for the supplied
embeddedImage . |
String |
convertLinkToEdit(Link link,
ConversionContext context)
Returns an edit format fragment for the supplied
link . |
String |
convertMacroDefinitionToEdit(MacroDefinition macroDefinition,
ConversionContext context)
Returns an edit format fragment for the supplied
macroDefinition . |
String |
convertStorageToEdit(String storageFragment,
ConversionContext context)
Returns an edit format fragment for the supplied
storageFragment . |
String |
convertWikiToEdit(String wikiContent,
ConversionContext context)
Returns the XHTML edit format equivalent of the supplied
wikiContent (Wiki markup). |
String convertWikiToEdit(String wikiContent, ConversionContext context) throws XhtmlException
wikiContent
(Wiki markup).wikiContent
- to be converted.context
- for the conversion.XhtmlException
- if there are any problems during the conversion.String convertStorageToEdit(String storageFragment, ConversionContext context) throws XMLStreamException, XhtmlException
storageFragment
.storageFragment
- to be converted (for example the body of a macro).context
- for the conversion.XMLStreamException
- if there was a problem reading the storage fragment.XhtmlException
- if there was a problem creating the edit fragment.String convertEditToStorage(String editFragment, ConversionContext context) throws XMLStreamException, XhtmlException
editFragment
.editFragment
- to be converted (for example the body of a macro).context
- for the conversion.XMLStreamException
- if there was a problem reading the edit fragment.XhtmlException
- if there was a problem creating the storage fragment.String convertMacroDefinitionToEdit(MacroDefinition macroDefinition, ConversionContext context) throws XhtmlException
macroDefinition
.
The body of the macro definition is expected to be in storage format. It will be transformed to editor format as part of the conversion carried out in this method.
macroDefinition
- that describes the macro. The body of this macro definition (returned by MacroDefinition.getBody()
is expected to be in storage format.context
- for the conversion.XhtmlException
- if there was a problem creating the fragment.String convertLinkToEdit(Link link, ConversionContext context) throws XhtmlException
link
.link
- that describes the link.context
- for the conversion.XhtmlException
- if there was a problem creating the fragment.String convertEmbeddedImageToEdit(EmbeddedImage embeddedImage, ConversionContext context) throws XhtmlException
embeddedImage
.embeddedImage
- that describes the resource (such as an image).context
- for the conversion.XhtmlException
- if there was a problem creating the fragment.MacroDefinition convertEditToMacroDefinition(String editFragment, ConversionContext context) throws XMLStreamException, XhtmlException
MacroDefinition
from the supplied editFragment
.editFragment
- which should be the edit format definition of the macro (as XML rather than HTML).context
- for the conversion.XMLStreamException
- if there was a problem reading the edit fragment.XhtmlException
- if there was a problem creating the MacroDefinition.Link convertEditToLink(String editFragment, ConversionContext context) throws XMLStreamException, XhtmlException
MacroDefinition
from the supplied editFragment
.editFragment
- which should be the edit format definition of the link (as XML rather than HTML).context
- for the conversion.XMLStreamException
- if there was a problem reading the edit fragment.XhtmlException
- if there was a problem creating the Link.EmbeddedImage convertEditToEmbeddedImage(String editFragment, ConversionContext context) throws XMLStreamException, XhtmlException
EmbeddedImage
from the supplied editFragment
.editFragment
- which should be the edit format definition of the embedded image (as XHTML rather than HTML).context
- for the conversion.XMLStreamException
- if there was a problem reading the edit fragment.XhtmlException
- if there was a problem creating the EmbeddedImage.Copyright © 2003–2016 Atlassian. All rights reserved.