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
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

AEM Sling Content Distribution Event Listener

rampai
Level 4
Level 4

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
Ritesh_M
Correct answer by
Community Advisor
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
Ritesh_M
Correct answer by
Community Advisor
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