@ThingworxExtensionApiClass(since={7,1}) public abstract class ExtensionMigratorBase extends java.lang.Object
Constructor and Description |
---|
ExtensionMigratorBase() |
Modifier and Type | Method and Description |
---|---|
EntityVersion |
getFromVersion()
Returns the version that the extension is being migrated from. |
EntityVersion |
getToVersion()
Returns the version that the extension will be migrated to. |
abstract void |
migrate(ImportedEntityCollection imports)
Perform the migration of the extension. |
void |
postMigrate(ImportedEntityCollection imports)
Post-migrate hook to allow subclasses to perform custom logic after the migrate() has been performed. |
@ThingworxExtensionApiMethod(since={7,1}) public ExtensionMigratorBase()
@ThingworxExtensionApiMethod(since={7,1}, canOverride=true) public abstract void migrate(ImportedEntityCollection imports) throws java.lang.Exception
imports
- The collection of entities to be migrated. Once migrate() is complete, these entities will be imported.java.lang.Exception
@ThingworxExtensionApiMethod(since={7,1}, canOverride=true) public void postMigrate(ImportedEntityCollection imports) throws java.lang.Exception
migrate()
has been performed. Typically, this
would be the location for any type of cleanup work to be done. This is an optional hook to implement and is called once for each
subclass.imports
- The collection of entities that have been migrated and imported.java.lang.Exception
@ThingworxExtensionApiMethod(since={7,1}) public final EntityVersion getFromVersion()
@ThingworxExtensionApiMethod(since={7,1}) public final EntityVersion getToVersion()