org.eclipse.emf.emfstore.internal.migration
Interface EMFStoreMigrator


public interface EMFStoreMigrator

Migrates models in the given URIs to the most recent version. Users should check if this migrator can handle the given URI by calling canHandle, then checking if a migration is actually needed by calling needsMigration and if so use the migrate-Method to do so.

Author:
koegel, jfaltermeier

Method Summary
 boolean canHandle(List<org.eclipse.emf.common.util.URI> uris)
          Checks if this migrator can work with the specified URIs.
 void migrate(List<org.eclipse.emf.common.util.URI> resources, org.eclipse.core.runtime.IProgressMonitor monitor)
          Migrate the models in the given URIs from the given source version to the most recent version.
 boolean needsMigration(List<org.eclipse.emf.common.util.URI> uris)
          Checks whether the models in the specified URIs need a to be migrated.
 

Method Detail

canHandle

boolean canHandle(List<org.eclipse.emf.common.util.URI> uris)
Checks if this migrator can work with the specified URIs.

Parameters:
uris - the physical URIs
Returns:
true if migrator can handle the URI, false otherwise

needsMigration

boolean needsMigration(List<org.eclipse.emf.common.util.URI> uris)
Checks whether the models in the specified URIs need a to be migrated.

Parameters:
uris - the physical URIs
Returns:
true if migration is needed, false otherwise

migrate

void migrate(List<org.eclipse.emf.common.util.URI> resources,
             org.eclipse.core.runtime.IProgressMonitor monitor)
             throws EMFStoreMigrationException
Migrate the models in the given URIs from the given source version to the most recent version.

Parameters:
resources - the URIs of the contents to migrate
monitor - a progress monitor
Throws:
EMFStoreMigrationException - if the migration fails.


Copyright © 2015. All Rights Reserved.