|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface EditorFormatService
Provides methods that convert between edit and storage formats.
Method Summary | |
---|---|
EmbeddedImage |
convertEditToEmbeddedImage(java.lang.String editFragment,
ConversionContext context)
Returns a EmbeddedImage from the supplied editFragment . |
Link |
convertEditToLink(java.lang.String editFragment,
ConversionContext context)
Returns a MacroDefinition from the supplied editFragment . |
MacroDefinition |
convertEditToMacroDefinition(java.lang.String editFragment,
ConversionContext context)
Returns a MacroDefinition from the supplied editFragment . |
java.lang.String |
convertEditToStorage(java.lang.String editFragment,
ConversionContext context)
Returns an storage format fragment for the supplied editFragment . |
java.lang.String |
convertEmbeddedImageToEdit(EmbeddedImage embeddedImage,
ConversionContext context)
Returns an edit format fragment for the supplied embeddedImage . |
java.lang.String |
convertLinkToEdit(Link link,
ConversionContext context)
Returns an edit format fragment for the supplied link . |
java.lang.String |
convertMacroDefinitionToEdit(MacroDefinition macroDefinition,
ConversionContext context)
Returns an edit format fragment for the supplied macroDefinition . |
java.lang.String |
convertStorageToEdit(java.lang.String storageFragment,
ConversionContext context)
Returns an edit format fragment for the supplied storageFragment . |
java.lang.String |
convertWikiToEdit(java.lang.String wikiContent,
ConversionContext context)
Returns the XHTML edit format equivalent of the supplied wikiContent (Wiki markup). |
Method Detail |
---|
java.lang.String convertWikiToEdit(java.lang.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.java.lang.String convertStorageToEdit(java.lang.String storageFragment, ConversionContext context) throws javax.xml.stream.XMLStreamException, XhtmlException
storageFragment
.
storageFragment
- to be converted (for example the body of a macro).context
- for the conversion.
javax.xml.stream.XMLStreamException
- if there was a problem reading the storage fragment.
XhtmlException
- if there was a problem creating the edit fragment.java.lang.String convertEditToStorage(java.lang.String editFragment, ConversionContext context) throws javax.xml.stream.XMLStreamException, XhtmlException
editFragment
.
editFragment
- to be converted (for example the body of a macro).context
- for the conversion.
javax.xml.stream.XMLStreamException
- if there was a problem reading the edit fragment.
XhtmlException
- if there was a problem creating the storage fragment.java.lang.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.java.lang.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.java.lang.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(java.lang.String editFragment, ConversionContext context) throws javax.xml.stream.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.
javax.xml.stream.XMLStreamException
- if there was a problem reading the edit fragment.
XhtmlException
- if there was a problem creating the MacroDefinition.Link convertEditToLink(java.lang.String editFragment, ConversionContext context) throws javax.xml.stream.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.
javax.xml.stream.XMLStreamException
- if there was a problem reading the edit fragment.
XhtmlException
- if there was a problem creating the Link.EmbeddedImage convertEditToEmbeddedImage(java.lang.String editFragment, ConversionContext context) throws javax.xml.stream.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.
javax.xml.stream.XMLStreamException
- if there was a problem reading the edit fragment.
XhtmlException
- if there was a problem creating the EmbeddedImage.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |