Skip to content

Package: ViewModelMigrator

ViewModelMigrator

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2011-2014 EclipseSource Muenchen GmbH and others.
3: *
4: * All rights reserved. This program and the accompanying materials
5: * are made available under the terms of the Eclipse Public License 2.0
6: * which accompanies this distribution, and is available at
7: * https://www.eclipse.org/legal/epl-2.0/
8: *
9: * SPDX-License-Identifier: EPL-2.0
10: *
11: * Contributors:
12: * Lucas Koehler- initial API and implementation
13: ******************************************************************************/
14: package org.eclipse.emf.ecp.view.migrator;
15:
16: import org.eclipse.emf.common.util.URI;
17:
18: /**
19: * @author Lucas Koehler
20: *
21: */
22: public interface ViewModelMigrator {
23:
24:         /**
25:          * Checks whether a view model needs to be migrated.
26:          *
27:          * @param resourceURI The URI of the view model that should be checked.
28:          * @return true, if the view model does not require a migration, false otherwise.
29:          */
30:         boolean checkMigration(URI resourceURI);
31:
32:         /**
33:          * Migrates a view model to the latest version.
34:          *
35:          * @param resourceURI The URI of the view model that should be migrated.
36:          * @throws ViewModelMigrationException in case of an error
37:          */
38:         void performMigration(URI resourceURI) throws ViewModelMigrationException;
39: }