aem - CQ5 modify event fired on page delete -


I am trying to use the CQ5 workflow to control my resources (especially the page). I want to start various scripts at different events (add / delete / modify) I have registered a launcher on every event. When I delete a page, delete both and modify events that are removed and so both scripts run.

Thanks for any advice

delete a page, actually delete A version of the page is created before going, which means that it will actually fire a pagemodification event as VERSION_CREATED .

You can confirm this by using the following sample event handler which will only log the pageadfication.

  @Component @Service @Property (name = "event.topics", value = PageEvent.EVENT_TOPIC) The public class MyPageEventHandler implies EventHandler {Private Final Logger Log = LoggerFactory.getLogger (this. GetClass () .GetName ()); @ Override Public Wide Handel Event (Event Event) {PageEvent pgEvent = PageEvent.fromEvent (event); Iterator & LT; PageModification & gt; Modifications = pgEvent.getModifications (); While (modifications.hasNext ()) {log.info ("page modifications {}", modifications.nx (). GetType ()); }}}  

Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -