org.jedit.migration

## Class OneTimeMigrationService

- java.lang.Object
- - org.jedit.migration.OneTimeMigrationService

- All Implemented Interfaces:
    MigrationService
  Direct Known Subclasses:
    CheckFileStatus

      public abstract class OneTimeMigrationService
      extends java.lang.Object
      implements MigrationService

  Base class from which one can more easily implement a migration step that should be executed only once per installation.

  Concrete implementations of this class should register themselves in services.xml. jEdit will call doMigration() on each object, which will skip the ones that have been done before.

  The time that these services are automatically executed by jEdit is during the "initializing properties" step. This means that implementations that need to update or remove certain properties during upgrades can take advantage of this class.

  Example:

          <SERVICE CLASS="org.jedit.migration.OneTimeMigrationService" NAME="checkFileStatus" >
                new org.jedit.migration.CheckFileStatus();
              </SERVICE>

  Since:
    jEdit 5.1

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected java.lang.String` | `name`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `OneTimeMigrationService(java.lang.String name)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `doMigration()` Calls migrate() but only once per installation.
    `static void` | `execute()` Performs doMigrate() on each installed OneTimeMigrationService

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.jedit.core.MigrationService

      `migrate`

- - ### Field Detail

    - #### name

          protected java.lang.String name

  - ### Constructor Detail

    - #### OneTimeMigrationService

          public OneTimeMigrationService(java.lang.String name)

      Parameters:
        `name` - of this service. Used to identify and determine if it's been done eariler.

  - ### Method Detail

    - #### execute

          public static void execute()

      Performs doMigrate() on each installed OneTimeMigrationService

    - #### doMigration

          public void doMigration()

      Calls migrate() but only once per installation.