Skip to content

Package: TemplateModelWorkspaceMigrator

TemplateModelWorkspaceMigrator

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2011-2018 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.spi.view.migrator;
15:
16: import java.util.List;
17:
18: import org.eclipse.core.runtime.CoreException;
19: import org.eclipse.emf.common.util.URI;
20:
21: /**
22: * A service that provides methods to get all uris of template models in the workspace that need to be migrated and to
23: * migrate these models.
24: *
25: * @author Lucas Koehler
26: * @since 1.17
27: *
28: */
29: public interface TemplateModelWorkspaceMigrator {
30:
31:         /**
32:          * Returns a list of template model {@link URI}s that need to be migrated.
33:          *
34:          * @return the template model URIs
35:          * @throws CoreException if a problem occurred while searching the workspace
36:          **/
37:         List<URI> getURIsToMigrate() throws CoreException;
38:
39:         /**
40:          * Migrates a template model to the latest version.
41:          *
42:          * @param resourceURI The URI of the template model that should be migrated.
43:          * @throws TemplateModelMigrationException If the migration fails.
44:          */
45:         void performMigration(URI resourceURI) throws TemplateModelMigrationException;
46: }