Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.

where can i find js and java code of ootb publish button of aemaacs

Avatar

Level 3

Hello developers , i want to know where can i find js and java code of ootb publish button of aemaacs. 

5 Replies

Avatar

Community Advisor

@AliSyed1 : Can you please share how are you going to use this information?

I can tell what happens when you click on 'Quick Publish'

 

1. Servlet "/bin/replicate" gets invoked.

2. It has list of all the selected pages in 'payload'. cmd tells if it is activate or deactivate action.

Kamal_Kishor_0-1726753985007.png

Kamal_Kishor_2-1726754271185.png

Hope this helps to get you started with your problem.

 

thanks.

Avatar

Level 3

i need to know how these paths are sent to /bin/replicate. are they using eventListener API of java to catch published content? In network tab request is made to /bin/replicate.

Avatar

Level 3

selected paths for replication are obtained in javascript flle of quickpublish button through Granite API.

Avatar

Community Advisor

Hi @AliSyed1 
The publish button is replication the pages internally.


If you want to use the same functionality in your own code, you can create a servlet, event handler, or sling job based on your use case for replication functionality.


Go over here in the AEMaaCS documentation :https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/operations/repli...

Here navigate to the end to the topic Header Replication API

 

Here you can find the code you are looking for.

Avatar

Administrator

@AliSyed1 Did you find the suggestions helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!



Kautuk Sahni