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

AEM Sling Content Distribution Event Listener

Avatar

Avatar
Ignite 1
Level 3
rampai
Level 3

Likes

25 likes

Total Posts

54 posts

Correct Reply

9 solutions
Top badges earned
Ignite 1
Validate 1
Give Back 5
Give Back 3
Give Back 10
View profile

Avatar
Ignite 1
Level 3
rampai
Level 3

Likes

25 likes

Total Posts

54 posts

Correct Reply

9 solutions
Top badges earned
Ignite 1
Validate 1
Give Back 5
Give Back 3
Give Back 10
View profile
rampai
Level 3

07-05-2021

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

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Boost 5
Level 5
Ritesh_M
Level 5

Likes

101 likes

Total Posts

85 posts

Correct Reply

26 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
Applaud 5
Affirm 1
View profile

Avatar
Boost 5
Level 5
Ritesh_M
Level 5

Likes

101 likes

Total Posts

85 posts

Correct Reply

26 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
Applaud 5
Affirm 1
View profile
Ritesh_M
Level 5

08-05-2021

 
 

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

Answers (1)

Answers (1)

Avatar

Avatar
Boost 100
Level 7
rush_pawan
Level 7

Likes

120 likes

Total Posts

192 posts

Correct Reply

77 solutions
Top badges earned
Boost 100
Validate 1
Ignite 1
Give Back 5
Give Back 3
View profile

Avatar
Boost 100
Level 7
rush_pawan
Level 7

Likes

120 likes

Total Posts

192 posts

Correct Reply

77 solutions
Top badges earned
Boost 100
Validate 1
Ignite 1
Give Back 5
Give Back 3
View profile
rush_pawan
Level 7

07-05-2021