]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/migration/MigrationStateKeys.java
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.db.layer0 / src / org / simantics / db / layer0 / migration / MigrationStateKeys.java
1 /*******************************************************************************\r
2  * Copyright (c) 2012 Association for Decentralized Information Management in\r
3  * Industry THTH ry.\r
4  * All rights reserved. This program and the accompanying materials\r
5  * are made available under the terms of the Eclipse Public License v1.0\r
6  * which accompanies this distribution, and is available at\r
7  * http://www.eclipse.org/legal/epl-v10.html\r
8  *\r
9  * Contributors:\r
10  *     VTT Technical Research Centre of Finland - initial API and implementation\r
11  *******************************************************************************/\r
12 package org.simantics.db.layer0.migration;\r
13 \r
14 import java.io.PrintWriter;\r
15 \r
16 import org.eclipse.core.runtime.IProgressMonitor;\r
17 import org.simantics.db.Session;\r
18 \r
19 public interface MigrationStateKeys {\r
20 \r
21     /**\r
22      * @see Session\r
23      */\r
24     public final static String SESSION = "session";\r
25     /**\r
26      * @see IProgressMonitor\r
27      */\r
28     public final static String PROGRESS_MONITOR = "progressMonitor";\r
29         public final static String BASE_URI = "baseURI";\r
30     public final static String MODEL_FILE = "modelFile";\r
31         public final static String CURRENT_TG = "currentTG";\r
32     public final static String CURRENT_TGS = "currentTGS";\r
33     \r
34     public final static String GET_RESOURCE_IDS = "getResourceIds";\r
35     public final static String RESOURCE_IDS = "resourceIds";\r
36 \r
37     /**\r
38      * If this key is set, any messages logged by the migration process shall be\r
39      * written into the associated {@link PrintWriter} instance.\r
40      * \r
41      * @see NullWriter\r
42      */\r
43     public final static String MESSAGE_LOG_WRITER = "messageLogWriter";\r
44 \r
45     /**\r
46      * The reader used to support {@link #CURRENT_TGS}. Must be closed when\r
47      * state is disposed.\r
48      */\r
49     public final static String CURRENT_TGS_READER = "currentTGSReader";\r
50         public final static String CURRENT_DATA_CONTAINER = "currentDataContainer";\r
51         public final static String TG_EXTENSIONS = "tgExtensions";\r
52         public final static String CURRENT_RESOURCE = "currentResource";\r
53         public final static String IMPORT_ADVISOR = "importAdvisor";\r
54     /**\r
55      * All root resources of the imported material as\r
56      * Collection<Resource>.\r
57      */\r
58     public final static String CURRENT_ROOT_RESOURCES = "currentRootResources";\r
59     /**\r
60      * This is a hint that informs migration procedures whether they should\r
61      * disable dependency index updates in database requests they perform.\r
62      * Expects Boolean value and defaults to <code>true</code> if not defined.\r
63      */\r
64     public final static String UPDATE_DEPENDENCIES = "updateDependencies";\r
65 \r
66     /**\r
67      * The database revision ID right after importing the transferable graph (\r
68      * {@link #CURRENT_TG} or {@link #CURRENT_TGS}) into the database which\r
69      * occurs when {@link #CURRENT_RESOURCE} or {@link #CURRENT_ROOT_RESOURCES}\r
70      * is asked for the first time.\r
71      */\r
72     public final static String DATABASE_REVISION_AFTER_TG_IMPORT = "revisionAfterTgImport";\r
73 \r
74 }\r