Interface MacroSchemaMigrator

  • All Known Implementing Classes:

    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 Detail

      • migrateSchemaIfNecessary

        MacroDefinition migrateSchemaIfNecessary​(MacroDefinition macroDefinition,
                                                 ConversionContext context)
                                          throws XhtmlException
        Migrates the macro definition to the latest version of it's macro schema.
        macroDefinition - the macro definition to migrate
        context - the context used to perform the migration
        the migrated macro definition or the existing macro definition if no migration occured
        XhtmlException - if any migrations fail