Interface ExceptionTolerantMigrator

All Known Implementing Classes:
AbstractExceptionTolerantMigrator, WikiToXhtmlMigrator, XhtmlRoundTripMigrator, XhtmlWikiMarkupMacroMigrator

public interface ExceptionTolerantMigrator

Migrates / converts text from one text format to another.

Implementations should be tolerant to Exceptions that occur during the migration and still return suitably migrated content with the exceptions populated in the supplied List.


Nested Class Summary
static class ExceptionTolerantMigrator.MigrationResult
          Represents the results of an attempted migration.
Method Summary
 ExceptionTolerantMigrator.MigrationResult migrate(java.lang.String input, ConversionContext conversionContext)
          Migrate the supplied content.
 java.lang.String migrate(java.lang.String input, com.atlassian.renderer.RenderContext renderContext, java.util.List<java.lang.RuntimeException> exceptions)
          Deprecated. Since 5.3 Use migrate(String, com.atlassian.confluence.content.render.xhtml.ConversionContext)

Method Detail


java.lang.String migrate(java.lang.String input,
                                    com.atlassian.renderer.RenderContext renderContext,
                                    java.util.List<java.lang.RuntimeException> exceptions)
Deprecated. Since 5.3 Use migrate(String, com.atlassian.confluence.content.render.xhtml.ConversionContext)

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.

input - the String to be migrated
renderContext - the context for the rendering during this migration
exceptions - a List to add any migration exceptions too as they occur (this may be null if you don't care about exceptions)
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.


ExceptionTolerantMigrator.MigrationResult migrate(java.lang.String input,
                                                  ConversionContext conversionContext)
Migrate the supplied content.

input - the comtent to be migrated
conversionContext - the context to be applied for this migration
a ExceptionTolerantMigrator.MigrationResult containing the migrated content (if any), as well as indications of failures.

Copyright © 2003-2014 Atlassian. All Rights Reserved.