1 /*******************************************************************************
2 * Copyright (c) 2012 Association for Decentralized Information Management in
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * which accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * VTT Technical Research Centre of Finland - initial API and implementation
11 *******************************************************************************/
12 package org.simantics.db.layer0.migration;
14 import java.io.PrintWriter;
16 import org.eclipse.core.runtime.IProgressMonitor;
17 import org.simantics.db.Session;
18 import org.simantics.graph.db.ImportResult;
20 public interface MigrationStateKeys {
25 public final static String SESSION = "session";
27 * @see IProgressMonitor
29 public final static String PROGRESS_MONITOR = "progressMonitor";
30 public final static String BASE_URI = "baseURI";
31 public final static String MODEL_FILE = "modelFile";
32 public final static String CURRENT_TG = "currentTG";
33 public final static String CURRENT_TGS = "currentTGS";
35 public final static String GET_RESOURCE_IDS = "getResourceIds";
36 public final static String RESOURCE_IDS = "resourceIds";
39 * If this key is set, any messages logged by the migration process shall be
40 * written into the associated {@link PrintWriter} instance.
44 public final static String MESSAGE_LOG_WRITER = "messageLogWriter";
47 * The reader used to support {@link #CURRENT_TGS}. Must be closed when
50 public final static String CURRENT_TGS_READER = "currentTGSReader";
51 public final static String CURRENT_DATA_CONTAINER = "currentDataContainer";
52 public final static String TG_EXTENSIONS = "tgExtensions";
53 public final static String CURRENT_RESOURCE = "currentResource";
54 public final static String IMPORT_ADVISOR = "importAdvisor";
57 * Used for storing the {@link ImportResult} resulting from the TG import.
59 public final static String IMPORT_RESULT = "importResult";
62 * All root resources of the imported material as
63 * Collection<Resource>.
65 public final static String CURRENT_ROOT_RESOURCES = "currentRootResources";
67 * This is a hint that informs migration procedures whether they should
68 * disable dependency index updates in database requests they perform.
69 * Expects Boolean value and defaults to <code>true</code> if not defined.
71 public final static String UPDATE_DEPENDENCIES = "updateDependencies";
74 * The database revision ID right after importing the transferable graph (
75 * {@link #CURRENT_TG} or {@link #CURRENT_TGS}) into the database which
76 * occurs when {@link #CURRENT_RESOURCE} or {@link #CURRENT_ROOT_RESOURCES}
77 * is asked for the first time.
79 public final static String DATABASE_REVISION_AFTER_TG_IMPORT = "revisionAfterTgImport";