Class WikiToStorageConverterImpl
- java.lang.Object
-
- com.atlassian.confluence.impl.content.render.xhtml.WikiToStorageConverterImpl
-
- All Implemented Interfaces:
WikiToStorageConverter
public final class WikiToStorageConverterImpl extends Object implements WikiToStorageConverter
- Since:
- 7.6
-
-
Constructor Summary
Constructors Constructor Description WikiToStorageConverterImpl(ExceptionTolerantMigrator wikiToXhtmlMigrator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T extends ContentEntityObject>
TconvertWikiBodyToStorage(T ceo)
Convert the body of the supplied ContentEntityObject to Confluence Storage Format XHTML (if necessary).String
convertWikiToStorage(String wikiContent, ConversionContext context, List<RuntimeException> migrationExceptions)
Returns the XHTML storage format equivalent of the suppliedwikiContent
(wiki markup).
-
-
-
Constructor Detail
-
WikiToStorageConverterImpl
public WikiToStorageConverterImpl(ExceptionTolerantMigrator wikiToXhtmlMigrator)
-
-
Method Detail
-
convertWikiToStorage
public String convertWikiToStorage(String wikiContent, ConversionContext context, List<RuntimeException> migrationExceptions)
Description copied from interface:WikiToStorageConverter
Returns the XHTML storage format equivalent of the suppliedwikiContent
(wiki markup).- Specified by:
convertWikiToStorage
in interfaceWikiToStorageConverter
- Parameters:
wikiContent
- to be converted.context
- for the conversion.migrationExceptions
- that will be populated with any exceptions that take place during the migration. There may be multiple exceptions if there are multiple wiki markup sections.- Returns:
- the XHTML storage format equivalent.
-
convertWikiBodyToStorage
public <T extends ContentEntityObject> T convertWikiBodyToStorage(T ceo)
Description copied from interface:WikiToStorageConverter
Convert the body of the supplied ContentEntityObject to Confluence Storage Format XHTML (if necessary).
Since for now and the near future Confluence may have both wiki formatted and XHTML formatted ContentEntityObjects in the system (wiki formatted historical versions may be present in an upgraded installation) this method provides a convenient way to ensure you only need to handle ContentEntityObjects with the new XHTML format of body.
Note that the returned ceo is a clone of the passed in version, even if no conversion was necessary.
- Specified by:
convertWikiBodyToStorage
in interfaceWikiToStorageConverter
- Parameters:
ceo
- the ContentEntityObject to be converted (if necessary).- Returns:
- a clone of the provided ContentEntityObject with its wiki formatted body converted.
-
-