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