Class WizardMigrator

java.lang.Object
org.bidib.wizard.migration.migrator.WizardMigrator

public class WizardMigrator extends Object
  • Constructor Details

    • WizardMigrator

      public WizardMigrator()
  • Method Details

    • migrateLabels

      protected org.bidib.jbidibc.core.schema.bidiblabels.NodeLabels migrateLabels(ApplicationContext context, Class<?> migratorClass, long uniqueId, String... searchpaths)
      Migrate the labels.

      The new (bidib2) labels are stored in the labels subfolder, e.g. <user.home>\.bidib\labels. The older labels are stored under <user.home>\.BiDiBWizard or at a customized location.

      Parameters:
      context - the migration context
      uniqueId - the uniqueId of the node
      searchpath - the search path. The provided paths are the root path of the locations of the labels, e.g. <user.home>\.bidib or <user.home>\.BiDiBWizard.
      Returns:
      the node labels
    • findAllNodesInWizardLabels

      public Nodes findAllNodesInWizardLabels(Class<?>[] migratorClassHolder, String... searchpaths)
      Find all nodes in wizard labels.
      Parameters:
      searchpath - the search path
      Returns:
      the node labels with all nodes
    • checkAndPerformMigration

      public String checkAndPerformMigration(String targetPath, File migrationLogFile, String... searchRoots)
      Check if migration is required and perform the migration is necessary.
      Parameters:
      targetPath - the target path were the migration file s are stored
      migrationLogFile - the migration log file
      searchRoots - the search roots
    • executeMigrationTask

      protected void executeMigrationTask(String targetPath, org.bidib.wizard.migration.migrator.WizardMigrator.MigrationTaskType migrationTask, File migrationLogFile, String... searchRoots)
    • getMigrationLogfile

      public File getMigrationLogfile(String path)
    • getForcedBackupLogfile

      public File getForcedBackupLogfile(String path)
    • checkAndPerformForcedBackup

      public String checkAndPerformForcedBackup(String targetPath, File forcedBackupLogFile)