Class MigrationManagerImpl

java.lang.Object
io.vertigo.database.impl.migration.MigrationManagerImpl
All Implemented Interfaces:
io.vertigo.core.node.component.Activeable, io.vertigo.core.node.component.Component, io.vertigo.core.node.component.CoreComponent, io.vertigo.core.node.component.Manager, MigrationManager

public final class MigrationManagerImpl extends Object implements MigrationManager, io.vertigo.core.node.component.Activeable
Implementation of the MigrationManager. At start-up we perform all the tasks tageted by the specified mode Mode supported are 'check' and 'update'
Author:
mlaroche
  • Constructor Details

    • MigrationManagerImpl

      @Inject public MigrationManagerImpl(Optional<String> modeOpt, List<MigrationPlugin> dataBaseMigrationPlugins)
      Constructor
      Parameters:
      modeOpt - mode used at startup
      dataBaseMigrationPlugins - registered dataBaseMigrationPlugins
  • Method Details

    • start

      public void start()
      Specified by:
      start in interface io.vertigo.core.node.component.Activeable
    • stop

      public void stop()
      Specified by:
      stop in interface io.vertigo.core.node.component.Activeable
    • check

      public void check(String connectionName)
      Check if database is ok.
      Specified by:
      check in interface MigrationManager
      Parameters:
      connectionName - ConnectionProviderName (in the Vertigo's way). For example @see
      invalid reference
      SqlManager.MAIN_CONNECTION_PROVIDER_NAME
    • update

      public void update(String connectionName)
      Perform all taks on database to make it up to date.
      Specified by:
      update in interface MigrationManager
      Parameters:
      connectionName - ConnectionProviderName (in the Vertigo's way). For example @see
      invalid reference
      SqlManager.MAIN_CONNECTION_PROVIDER_NAME