Interface DmrToSegmentsMigrator
-
- All Known Implementing Classes:
DmrToSegmentsMigratorImpl
public interface DmrToSegmentsMigratorService 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 interfaceDmrToSegmentsMigrator.PreReplaceProcessorProcessor 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 booleanneedsMigration(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.voidperformMigration(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 DmrToSegmentsMigrationExceptionMigrates 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.PreReplaceProcessorwhich 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
-
-