|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.partnersoft.update.ModuleMigration
public class ModuleMigration
Runs scripted updates to module data after the main update program is complete.
The installation update simply replaces configuration, module, and platform files; however it does not touch data files, which are assumed to be unique to an installation and to contain precious user data.
These files cannot be updated in a generic manner; instead scripts can be provided by a module to modify them as needed - for example, to apply cascade updates to lookup values, or change file formats.
Each module can specify a "config version", this is an integer that is incremented each time the config changes in a non-backwards-compatible way that will require scripts to accomodate. This should not be confused with the module's own version, which specifies the version of the module's code but not its configuration.
The module's config version is stored in config/FOO/modules/BAR/update/ConfigVersion.txt. The file contains only a single integer. The scripts required to update local data from e.g. version 3 to version 4 are stored in config/FOO/modules/BAR/update/migrations/4/scripts. The scripts are run in alphabetical order and have the module variable defined.
The current config version of the module's data is stored in data/BAR/update/ConfigVersion.txt. This is updated after an update to the same as the one in config/.
Copyright 2008 Partner Software, Inc.
| Constructor Summary | |
|---|---|
ModuleMigration(Module module)
Create a StakerVersionUpdate. |
|
| Method Summary | |
|---|---|
void |
migrate()
Runs version update scripts. |
void |
migrateImportedJobFile(int currentVersion)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ModuleMigration(Module module)
| Method Detail |
|---|
public void migrate()
throws java.io.IOException
java.io.IOException
public void migrateImportedJobFile(int currentVersion)
throws java.io.IOException
java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||