de.deepamehta.core.impl
Class MigrationManager
java.lang.Object
de.deepamehta.core.impl.MigrationManager
class MigrationManager
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CORE_MIGRATIONS_PACKAGE
private static final String CORE_MIGRATIONS_PACKAGE
- See Also:
- Constant Field Values
REQUIRED_CORE_MIGRATION
private static final int REQUIRED_CORE_MIGRATION
- See Also:
- Constant Field Values
dms
private EmbeddedService dms
logger
private Logger logger
MigrationManager
MigrationManager(EmbeddedService dms)
runPluginMigrations
void runPluginMigrations(PluginImpl plugin,
boolean isCleanInstall)
- Determines the migrations to be run for the specified plugin and run them.
runCoreMigrations
void runCoreMigrations(boolean isCleanInstall)
- Determines the core migrations to be run and run them.
runCoreMigration
private void runCoreMigration(int migrationNr,
boolean isCleanInstall)
runPluginMigration
private void runPluginMigration(PluginImpl plugin,
int migrationNr,
boolean isCleanInstall)
runMigration
private void runMigration(int migrationNr,
PluginImpl plugin,
boolean isCleanInstall)
- Runs a core migration or a plugin migration.
- Parameters:
migrationNr
- Number of the migration to run.plugin
- The plugin that provides the migration to run.
null
for a core migration.isCleanInstall
- true
if the migration is run as part of a clean install,
false
if the migration is run as part of an update.
injectServices
private void injectServices(Migration migration,
String migrationInfo,
PluginImpl plugin)
readMigrationFile
private void readMigrationFile(InputStream in,
String migrationFileName)
- Creates types and topics from a JSON formatted input stream.
- Parameters:
migrationFileName
- The origin migration file. Used for logging only.
readEntities
private void readEntities(org.codehaus.jettison.json.JSONArray entities)
throws org.codehaus.jettison.json.JSONException
- Throws:
org.codehaus.jettison.json.JSONException
readEntities
private void readEntities(org.codehaus.jettison.json.JSONObject entities)
throws org.codehaus.jettison.json.JSONException
- Throws:
org.codehaus.jettison.json.JSONException
createTopicTypes
private void createTopicTypes(org.codehaus.jettison.json.JSONArray topicTypes)
throws org.codehaus.jettison.json.JSONException
- Throws:
org.codehaus.jettison.json.JSONException
createAssociationTypes
private void createAssociationTypes(org.codehaus.jettison.json.JSONArray assocTypes)
throws org.codehaus.jettison.json.JSONException
- Throws:
org.codehaus.jettison.json.JSONException
createTopics
private void createTopics(org.codehaus.jettison.json.JSONArray topics)
throws org.codehaus.jettison.json.JSONException
- Throws:
org.codehaus.jettison.json.JSONException
createAssociations
private void createAssociations(org.codehaus.jettison.json.JSONArray assocs)
throws org.codehaus.jettison.json.JSONException
- Throws:
org.codehaus.jettison.json.JSONException
Copyright © 2015. All Rights Reserved.