Interface DmrToSegmentsMigrator
-
- All Known Implementing Classes:
DmrToSegmentsMigratorImpl
public interface DmrToSegmentsMigrator
Service which replaces all legacy domain model references of a view model with equivalent plain DMRs containing the corresponding segments.- Since:
- 1.22
- Author:
- Lucas Koehler
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
DmrToSegmentsMigrator.PreReplaceProcessor
Processor that is executed after segments have been generated for the new segment based dmr but before the legacy dmr is replaced in the model.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
needsMigration(org.eclipse.emf.common.util.URI resourceUri)
Checks whether a view model still contains legacy domain model references that need to be migrated to segments.void
performMigration(org.eclipse.emf.common.util.URI resourceUri, DmrToSegmentsMigrator.PreReplaceProcessor... preReplaceProcessors)
Migrates a view model to use segment based DMRs.
-
-
-
Method Detail
-
needsMigration
boolean needsMigration(org.eclipse.emf.common.util.URI resourceUri)
Checks whether a view model still contains legacy domain model references that need to be migrated to segments.- Parameters:
resourceUri
- The URI of the view model that should be checked.- Returns:
- true, if the view model requires a migration, false otherwise.
-
performMigration
void performMigration(org.eclipse.emf.common.util.URI resourceUri, DmrToSegmentsMigrator.PreReplaceProcessor... preReplaceProcessors) throws DmrToSegmentsMigrationException
Migrates a view model to use segment based DMRs. This replaces all legacy DMRs from the view model and replaces them with segment based DMRs. This is not undoable!- Parameters:
resourceUri
- The URI of the view model that should be migrated.preReplaceProcessors
-DmrToSegmentsMigrator.PreReplaceProcessor
which are executed just before a legacy dmr is replaced with the corresponding segment dmr. The processors are always executed in the given order- Throws:
DmrToSegmentsMigrationException
- if the migration fails
-
-