Package org.nuxeo.runtime.migration
Interface MigrationService
-
- All Known Implementing Classes:
MigrationServiceImpl
public interface MigrationService
Migration Service.- Since:
- 9.3
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
MigrationService.MigrationContext
Interface for a migration context, passed to theMigrationService.Migrator
.static class
MigrationService.MigrationStatus
The status of a migration.static interface
MigrationService.Migrator
Interface for the implementation of a migrator.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Migration
getMigration(String id)
Gets a migration object.List<Migration>
getMigrations()
Gets all the migration objects.MigrationService.MigrationStatus
getStatus(String id)
Gets the current status for a migration.void
probeAndRun(String id)
Probes the migration state and runs a migration.String
probeAndSetState(String id)
Probes the current state of a migration by analyzing persistent data, and sets it as the new current state.void
runStep(String id, String step)
Runs a migration step for a migration.
-
-
-
Method Detail
-
getMigration
Migration getMigration(String id)
Gets a migration object.- Parameters:
id
- the migration id- Returns:
- the migration, or
null
if the migration is unknown - Since:
- 11.2
-
getMigrations
List<Migration> getMigrations()
Gets all the migration objects.- Returns:
- a list of all migrations
- Since:
- 11.2
-
getStatus
MigrationService.MigrationStatus getStatus(String id)
Gets the current status for a migration.- Parameters:
id
- the migration id- Returns:
- the status, or
null
if the migration is unknown
-
probeAndSetState
String probeAndSetState(String id)
Probes the current state of a migration by analyzing persistent data, and sets it as the new current state.THIS METHOD MAY TAKE A WHILE as it needs to get information from persistent storage.
- Parameters:
id
- the migration id- Returns:
- the new state, or
null
if it cannot be determined - Since:
- 10.3
-
probeAndRun
void probeAndRun(String id)
Probes the migration state and runs a migration.THIS METHOD MAY TAKE A WHILE as it may call
probeAndSetState(String)
.- Parameters:
id
- the migration id- Since:
- 11.2
-
runStep
void runStep(String id, String step)
Runs a migration step for a migration.This launches the migration asynchronously. The status of the migration can be checked with
getStatus(java.lang.String)
.- Parameters:
id
- the migration idstep
- the step id
-
-