Expand my Community achievements bar.

Catching AEM Content installation event

Avatar

Level 2

The use case here is to get the information of content with type cq:Page and dam:Asset that is being installed/updated in the JCR using package manager in AEM.

I would like to know if there are any event listener or API's that can be used for this purpose.

AEM 6.2 is being used here.

Thanks!!

3 Replies

Avatar

Level 10

Pages are just nodes. You can write an event handler that uses the javax.jcr.observation.EventListener.

See: Scott's Digital Community: Creating an AEM JCR Event Listener using a Maven Archetype 12 Project

Hope this helps...

Avatar

Level 4

The same can be done using workflow launchers as well which would trigger on creation/modification of node types 'cq:Page' and 'dam:Asset'.

Have a custom process step that generates a report consolidating the information about the workflow payloads in action.

Avatar

Level 2

It seems I missed a point in my questions, is there a way to know if the content was installed/updated using the package manager.

Rima Mittal smacdonald2008 - Both the solution can be used.