java.lang.Object | ||
↳ | com.microstrategy.web.app.utils.upgrade.AbstractModule | |
↳ | com.microstrategy.web.app.utils.upgrade.AbstractXMLConfigModule |
![]() |
Extends AbstractModule
by providing specific support to upgrade xml configuration files.
This files have to use the AbstractConfigurationElement to parse the file's content in order
to be upgraded by this class.
Running this module involves three main tasks:
The location of all xml configuration files is specified through a parameter in the web.xml,
subclasses need to implement initParameterName()
to identify the name of such parameter.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
AbstractXMLConfigModule(UpgradeManager manager)
Default constructor.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void |
run(UpgradeInfo info)
It checks in the target application for the value of the
initParameterName() to
see if it's defined (globally and on every controller); whenever the value is defined, it calls
processConfigFile(String) to process the correspoding configuration file. |
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
AbstractConfigurationElement |
calculateDeltas(AbstractConfigurationElement base, AbstractConfigurationElement custom)
Calculate deltas between the base and the custom element.
| ||||||||||
String |
calculateNewPath(String path, String newRelativePath)
Returns the new relative path for the given file, as should be defined in Microstrategy Web.
| ||||||||||
abstract Class |
elementClass()
Subclasses must implement this method to identify the AbstractConfigurationElement class that
represents the root node of the xml.
| ||||||||||
AbstractConfigurationElement |
getBaseElement(String controllerName)
Returns the AbstractConfigurationElement as defined in the base Microstrategy Web installation.
| ||||||||||
AbstractConfigurationElement |
getCustomElement(String controllerName)
Returns the AbstractConfigurationElement as defined in the customized Microstrategy Web version.
| ||||||||||
UpgradeInfo | getUpgradeInfo() | ||||||||||
abstract String |
initParameterName()
Subclasses must implement this method to identify the name of the init-parameter that
defines the location of the xml configuration file.
| ||||||||||
void |
processConfigFile(String controllerName)
Process the configuration file for the given
controllerName . | ||||||||||
AbstractConfigurationElement |
processDeltas(AbstractConfigurationElement deltas)
Modifies deltas so in the new plugin they reflect Microstrategy's recommended best practices.
| ||||||||||
AbstractConfigurationElement |
saveDeltas(AbstractConfigurationElement deltas)
Saves deltas into the plugin folder.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() |
Default constructor. Receives the UpgradeManager instantiating this AbstractModule.
It checks in the target application for the value of the initParameterName()
to
see if it's defined (globally and on every controller); whenever the value is defined, it calls
processConfigFile(String)
to process the correspoding configuration file.
info | upgrade information. |
---|
UpgradeException |
---|
Calculate deltas between the base and the custom element. If equals, it returns null;
UpgradeException |
---|
Returns the new relative path for the given file, as should be defined in Microstrategy Web. This file is also marked as processed in the upgrade-manager so it gets copied to the correct new relative location when copying files.
path | The path of the file being processed. This path needs to point to an existing file. |
---|---|
newRelativePath | The path relative to the customization's root folder where the file will be placed when upgrade is complete |
Subclasses must implement this method to identify the AbstractConfigurationElement class that represents the root node of the xml.
Returns the AbstractConfigurationElement as defined in the base Microstrategy Web installation. Returns an empty object if the parameter is not defined in the base Microstrategy Web version.
ConfigException |
---|
Returns the AbstractConfigurationElement as defined in the customized Microstrategy Web version. Returns an empty object if the parameter is not defined in this version.
ConfigException |
---|
Subclasses must implement this method to identify the name of the init-parameter that defines the location of the xml configuration file.
Process the configuration file for the given controllerName
. It calculate deltas from
the base-element and the custom-element (as specified by the parameter value for this controller),
modifies the deltas as necessary and then saves them in the corresponding plugin folder.
If both elements are equal, it returns with no further changes.
UpgradeException |
---|
Modifies deltas so in the new plugin they reflect Microstrategy's recommended best practices.
Saves deltas into the plugin folder.
UpgradeException |
---|