Interface MacroSchemaMigrator
- All Known Implementing Classes:
DefaultMacroSchemaMigrator
public interface MacroSchemaMigrator
Performs macro schema migrations as part of the rendering pipeline.
A macro schema is defined as the definition of all the params and body type for a macro. If a macro's schema changes in an incompatible way, they should register a macro-schema-migrator to migrate from the given version in the macro-schema-migrator. Migrations will be performed in order as necessary.
-
Method Summary
Modifier and TypeMethodDescriptionmigrateSchemaIfNecessary
(MacroDefinition macroDefinition, ConversionContext context) Migrates the macro definition to the latest version of it's macro schema.
-
Method Details
-
migrateSchemaIfNecessary
MacroDefinition migrateSchemaIfNecessary(MacroDefinition macroDefinition, ConversionContext context) throws XhtmlException Migrates the macro definition to the latest version of it's macro schema.- Parameters:
macroDefinition
- the macro definition to migratecontext
- the context used to perform the migration- Returns:
- the migrated macro definition or the existing macro definition if no migration occured
- Throws:
XhtmlException
- if any migrations fail
-