|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.confluence.content.render.xhtml.DefaultEditorFormatService
public class DefaultEditorFormatService
| Constructor Summary | |
|---|---|
DefaultEditorFormatService(Marshaller<MacroDefinition> editorMacroMarshaller,
Marshaller<Link> editorLinkMarshaller,
Marshaller<EmbeddedImage> editorEmbeddedImageMarshaller,
Unmarshaller<MacroDefinition> editorMacroUnmarshaller,
Unmarshaller<Link> editorLinkUnmarshaller,
Unmarshaller<EmbeddedImage> editorEmbeddedImageUnmarshaller,
FragmentTransformer editorToStorageFragmentTransformer,
FragmentTransformer storageToEditorFragmentTransformer,
XmlEventReaderFactory xmlEventReaderFactory,
ExceptionThrowingMigrator wikiToEditorHtmlMigrator)
|
|
| 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). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultEditorFormatService(Marshaller<MacroDefinition> editorMacroMarshaller,
Marshaller<Link> editorLinkMarshaller,
Marshaller<EmbeddedImage> editorEmbeddedImageMarshaller,
Unmarshaller<MacroDefinition> editorMacroUnmarshaller,
Unmarshaller<Link> editorLinkUnmarshaller,
Unmarshaller<EmbeddedImage> editorEmbeddedImageUnmarshaller,
FragmentTransformer editorToStorageFragmentTransformer,
FragmentTransformer storageToEditorFragmentTransformer,
XmlEventReaderFactory xmlEventReaderFactory,
ExceptionThrowingMigrator wikiToEditorHtmlMigrator)
| Method Detail |
|---|
public java.lang.String convertWikiToEdit(java.lang.String wikiContent,
ConversionContext context)
throws XhtmlException
EditorFormatServicewikiContent (Wiki markup).
convertWikiToEdit in interface EditorFormatServicewikiContent - to be converted.context - for the conversion.
XhtmlException - if there are any problems during the conversion.
public java.lang.String convertStorageToEdit(java.lang.String storageFragment,
ConversionContext context)
throws javax.xml.stream.XMLStreamException,
XhtmlException
EditorFormatServicestorageFragment.
convertStorageToEdit in interface EditorFormatServicestorageFragment - 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.
public java.lang.String convertEditToStorage(java.lang.String editFragment,
ConversionContext context)
throws javax.xml.stream.XMLStreamException,
XhtmlException
EditorFormatServiceeditFragment.
convertEditToStorage in interface EditorFormatServiceeditFragment - 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.
public java.lang.String convertMacroDefinitionToEdit(MacroDefinition macroDefinition,
ConversionContext context)
throws XhtmlException
EditorFormatServicemacroDefinition.
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.
convertMacroDefinitionToEdit in interface EditorFormatServicemacroDefinition - 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.
public java.lang.String convertLinkToEdit(Link link,
ConversionContext context)
throws XhtmlException
EditorFormatServicelink.
convertLinkToEdit in interface EditorFormatServicelink - that describes the link.context - for the conversion.
XhtmlException - if there was a problem creating the fragment.
public java.lang.String convertEmbeddedImageToEdit(EmbeddedImage embeddedImage,
ConversionContext context)
throws XhtmlException
EditorFormatServiceembeddedImage.
convertEmbeddedImageToEdit in interface EditorFormatServiceembeddedImage - that describes the resource (such as an image).context - for the conversion.
XhtmlException - if there was a problem creating the fragment.
public MacroDefinition convertEditToMacroDefinition(java.lang.String editFragment,
ConversionContext context)
throws javax.xml.stream.XMLStreamException,
XhtmlException
EditorFormatServiceMacroDefinition from the supplied editFragment.
convertEditToMacroDefinition in interface EditorFormatServiceeditFragment - 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.
public Link convertEditToLink(java.lang.String editFragment,
ConversionContext context)
throws javax.xml.stream.XMLStreamException,
XhtmlException
EditorFormatServiceMacroDefinition from the supplied editFragment.
convertEditToLink in interface EditorFormatServiceeditFragment - 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.
public EmbeddedImage convertEditToEmbeddedImage(java.lang.String editFragment,
ConversionContext context)
throws javax.xml.stream.XMLStreamException,
XhtmlException
EditorFormatServiceEmbeddedImage from the supplied editFragment.
convertEditToEmbeddedImage in interface EditorFormatServiceeditFragment - 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 | |||||||||