Allan, CJ (Chris) wrote:
Hi,
I installed mymodule-1.0.jar, then removed the jar, replacing it with
mymodule-1.1.jar. I did not remove any of the files from
/modules/mymodule
The mgnl-bootstrap directory in mymodule-1.0.jar only contained an xml
export of a commands folder. In mymodule-1.1.jar I added two new xml
files; exports of the new dialogs and paragraphs folder. These did not
get bootstrapped during the installation of mymodule-1.1.jar -there were
only 2 installation steps - updating the module version number, and
copying files e.g. jsp's.
What I would like is that:
1) all new xml files get bootstrapped
2) and if any updates have been made to xml files already present in
previous module version, the updated xml file is bootstrapped (I presume
this new xml file will have the same UUID as the old version?)
So, both of these requirements need to implemented via the
ModuleVersionHandler?
Yes.
You suggest using NodeExistsDelegateTask. I see that this will work for
bootstrapping new xml files, but if I want to update existing sections
of the module configuration, how would be best to achieve that?
Kinda depends what the change is. If it's a simple property then a
SetPropertyTask will probably do. If it's more complex then a
BootstrapSingleResource with an importUUIDBehavior of
IMPORT_UUID_COLLISION_REPLACE_EXISTING is probably the simplest. That is
of course only if you haven't changed the node since it was bootstrapped.
I would have thought that my requirements are fairly standard when
installing/updating a module, but from looking at
DMSModuleVersionHandler there doesn't seem to be any generic way of
achieving this - you have to specifically state what should happen for
every case. Is this correct?
All thoughts and helps are greatly appreciated!
Cheers
Philippe
----------------------------------------------------------------
for list details see
http://documentation.magnolia.info/
----------------------------------------------------------------