Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

AEM Sling Content Distribution Event Listener

Avatar

Level 5

Hi All,

 

As AEM as a Cloud Service is based on Sling Content Distribution mechanism, are there any references on how to create a custom event handler that can capture the content distribution event and whether it was an ADD or a DELETE that was triggered?

 

I am going through the sling documentation but if there is anyone who has already done this, would appreciate your support.

 

Thanks,

Ram

1 Accepted Solution

Avatar

Correct answer by
Community Advisor
 
 

Hi @rampai ,

 

The Sling event handler can be utilized for this requirement which is org.osgi.service.event.EventHandler.

Eventually we are touching the node (ADDED/REMOVED, etc) and sling event will be able to capture that. In handler itself you can check the type of event.

 

You can watch this video for more understanding.

Git - https://github.com/riteshmittal/aemscheduler-even-handling

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor
 
 

Hi @rampai ,

 

The Sling event handler can be utilized for this requirement which is org.osgi.service.event.EventHandler.

Eventually we are touching the node (ADDED/REMOVED, etc) and sling event will be able to capture that. In handler itself you can check the type of event.

 

You can watch this video for more understanding.

Git - https://github.com/riteshmittal/aemscheduler-even-handling