Hi Raj

The bootstraps are intended to be installed during module installation. 
Sometimes you may want to change existing "content" (e.g. configuration data) 
during a module update. That's the "idea".
Re-installation of bootsrapped data on every startup was not the original idea 
of the magnolia bootstrap files ... however, if you need that, should not be a 
big deal to implement.

Magnolia provides a bunch of classes implementing 
info.magnolia.module.delta.Task which you may want to use (or to subclass, 
whatever) when writiing your specific task to re-install bootstraps.
There are also classes such as delegate and conditional tasks which could be 
helpfull in your context.

One thing you should take into consideration when re-installing bootstrap data 
with some tasks is "ImportUUIDBehavior" (see interface 
javax.jcr.ImportUUIDBehavior). Depending on the task, you can specify the 
ImportUUIDBehavior ... so ... think about whether the reinstalled JCR nodes 
MUST have the same UUID as before or not.

And how to force bootstrap manipulation during startup?  If you have a Magnolia 
Maven module, you most probably have a "module class".
See:
- https://documentation.magnolia-cms.com/display/DOCS/Modules
- https://documentation.magnolia-cms.com/display/DOCS/Module+descriptor
If your module class implements info.magnolia.module.ModuleLifecycle, you will 
have to implement the methods #start and #stop.
You could add some tasks to the #start method. The start method will be 
executed always during the startup phase of your module (which occurs during 
the startup phase of the magnolia instance).

I hope this helps a bit,
cheers,
 Christoph

-- 
Context is everything: 
http://forum.magnolia-cms.com/forum/thread.html?threadId=ab992615-999e-4380-aa38-920de3d75e0b


----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <user-list-unsubscr...@magnolia-cms.com>
----------------------------------------------------------------

Reply via email to