| java.lang.Object | |
| ↳ | com.microstrategy.web.app.utils.upgrade.AbstractModule |
Known Direct Subclasses
|
Known Indirect Subclasses
|
This is the based implementation of an UpgradeModule.
It implements the logic to enabled/disabled the module. It also defines
an abstract run(UpgradeInfo) method that is used to trigger the module's
execution.
| Protected Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
AbstractModule(UpgradeManager manager)
Default constructor.
| |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| boolean |
canChangeEnabled()
Default implementation, returns
true. | ||||||||||
| boolean |
isEnabled()
Whether the module is enabled.
| ||||||||||
| abstract void |
run(UpgradeInfo info)
Method triggered to execute the module's upgrade tasks.
| ||||||||||
| void |
setEnabled(boolean value)
Method to change the enabled status of the module.
| ||||||||||
| Protected Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| String |
getRelativePath(String baseDir, File file)
Helper method that calculates the relative path of | ||||||||||
| UpgradeManager |
getUpgradeManager()
Returns the UpgradeManager that created this AbstractModule instance.
| ||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
com.microstrategy.web.app.utils.upgrade.UpgradeModule
| |||||||||||
Default constructor. Receives the UpgradeManager instantiating this AbstractModule.
Default implementation, returns true.
Whether the module is enabled. If not enabled, the module will not be executed during the upgrade.
Method triggered to execute the module's upgrade tasks.
| info | upgrade information. |
|---|
| UpgradeException | when an unexpected error that prevents the module to cotinue occurs. Other errors should simply be logged. |
|---|
Method to change the enabled status of the module. This method can only
be invoked if the canChangeEnabled() return true,
otherwise it will throw an IllegalArgumentException
Helper method that calculates the relative path of file, based on the
given baseDir. Basically, it removes the baseDir from
the file's absolute path.
file is not within baseDir (i.e. file's absolutePath
doesn't start with baseDir it throws an IllegalArgumentException
| IllegalArgumentException |
|---|
Returns the UpgradeManager that created this AbstractModule instance.