--- /dev/null
+/*******************************************************************************\r
+ * Copyright (c) 2012 Association for Decentralized Information Management in\r
+ * Industry THTH ry.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ * VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
+package org.simantics.db.layer0.migration;\r
+\r
+import java.io.PrintWriter;\r
+\r
+import org.eclipse.core.runtime.IProgressMonitor;\r
+import org.simantics.db.Session;\r
+\r
+public interface MigrationStateKeys {\r
+\r
+ /**\r
+ * @see Session\r
+ */\r
+ public final static String SESSION = "session";\r
+ /**\r
+ * @see IProgressMonitor\r
+ */\r
+ public final static String PROGRESS_MONITOR = "progressMonitor";\r
+ public final static String BASE_URI = "baseURI";\r
+ public final static String MODEL_FILE = "modelFile";\r
+ public final static String CURRENT_TG = "currentTG";\r
+ public final static String CURRENT_TGS = "currentTGS";\r
+ \r
+ public final static String GET_RESOURCE_IDS = "getResourceIds";\r
+ public final static String RESOURCE_IDS = "resourceIds";\r
+\r
+ /**\r
+ * If this key is set, any messages logged by the migration process shall be\r
+ * written into the associated {@link PrintWriter} instance.\r
+ * \r
+ * @see NullWriter\r
+ */\r
+ public final static String MESSAGE_LOG_WRITER = "messageLogWriter";\r
+\r
+ /**\r
+ * The reader used to support {@link #CURRENT_TGS}. Must be closed when\r
+ * state is disposed.\r
+ */\r
+ public final static String CURRENT_TGS_READER = "currentTGSReader";\r
+ public final static String CURRENT_DATA_CONTAINER = "currentDataContainer";\r
+ public final static String TG_EXTENSIONS = "tgExtensions";\r
+ public final static String CURRENT_RESOURCE = "currentResource";\r
+ public final static String IMPORT_ADVISOR = "importAdvisor";\r
+ /**\r
+ * All root resources of the imported material as\r
+ * Collection<Resource>.\r
+ */\r
+ public final static String CURRENT_ROOT_RESOURCES = "currentRootResources";\r
+ /**\r
+ * This is a hint that informs migration procedures whether they should\r
+ * disable dependency index updates in database requests they perform.\r
+ * Expects Boolean value and defaults to <code>true</code> if not defined.\r
+ */\r
+ public final static String UPDATE_DEPENDENCIES = "updateDependencies";\r
+\r
+ /**\r
+ * The database revision ID right after importing the transferable graph (\r
+ * {@link #CURRENT_TG} or {@link #CURRENT_TGS}) into the database which\r
+ * occurs when {@link #CURRENT_RESOURCE} or {@link #CURRENT_ROOT_RESOURCES}\r
+ * is asked for the first time.\r
+ */\r
+ public final static String DATABASE_REVISION_AFTER_TG_IMPORT = "revisionAfterTgImport";\r
+\r
+}\r