Class MigrationTask


  • public abstract class MigrationTask
    extends Object
    • Field Detail

      • logger

        protected static final org.slf4j.Logger logger
      • asOfVersion

        protected final step.core.Version asOfVersion
      • migrationContext

        protected final step.migration.MigrationContext migrationContext
      • collectionFactory

        protected final step.core.collections.CollectionFactory collectionFactory
    • Constructor Detail

      • MigrationTask

        public MigrationTask​(step.core.Version asOfVersion,
                             step.core.collections.CollectionFactory collectionFactory,
                             step.migration.MigrationContext migrationContext)
    • Method Detail

      • getAsOfVersion

        public step.core.Version getAsOfVersion()
      • runUpgradeScript

        public abstract void runUpgradeScript()
        Script to be executed when migrating from a version lower than asOfVersion to the version asOfVersion
      • runDowngradeScript

        public abstract void runDowngradeScript()
        Script to be executed when migrating from the version asOfVersion to a version lower than asOfVersion
      • getDocumentCollection

        protected step.core.collections.Collection<step.core.collections.Document> getDocumentCollection​(String name)