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