Class AbstractExceptionTolerantMigrator
- java.lang.Object
-
- com.atlassian.confluence.content.render.xhtml.migration.AbstractExceptionTolerantMigrator
-
- All Implemented Interfaces:
ExceptionTolerantMigrator
- Direct Known Subclasses:
XhtmlRoundTripMigrator
,XhtmlWikiMarkupMacroMigrator
public abstract class AbstractExceptionTolerantMigrator extends Object implements ExceptionTolerantMigrator
A partial implementation ofExceptionTolerantMigrator
which provides a default implementation of the deprecatedmigrate(String, com.atlassian.renderer.RenderContext, java.util.List)
method, which delegates to theExceptionTolerantMigrator.migrate(String, com.atlassian.confluence.content.render.xhtml.ConversionContext)
method.- Since:
- 5.3
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.atlassian.confluence.content.render.xhtml.migration.ExceptionTolerantMigrator
ExceptionTolerantMigrator.MigrationResult
-
-
Constructor Summary
Constructors Constructor Description AbstractExceptionTolerantMigrator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
migrate(String content, com.atlassian.renderer.RenderContext renderContext, List<RuntimeException> exceptions)
Migrate the supplied text to a different text format.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.atlassian.confluence.content.render.xhtml.migration.ExceptionTolerantMigrator
migrate
-
-
-
-
Method Detail
-
migrate
public String migrate(String content, com.atlassian.renderer.RenderContext renderContext, List<RuntimeException> exceptions)
Description copied from interface:ExceptionTolerantMigrator
Migrate the supplied text to a different text format.
It should be noted that if the exceptions parameter is populated during execution then you cannot necessarily guarantee that the returned content is of a format you expect to deal with. You must check the implementation of this interface for details on the exception behaviour with respect to the return value.
- Specified by:
migrate
in interfaceExceptionTolerantMigrator
- Parameters:
content
- the String to be migratedrenderContext
- the context for the rendering during this migrationexceptions
- a List to add any migration exceptions too as they occur (this may be null if you don't care about exceptions)- Returns:
- the converted version of the supplied input text in the case of no exceptions reported (in the exceptions parameters list). Should exceptions have occurred then you must consult the implementation to learn what will be returned.
-
-