This article will help you to do any post processing activity on copy/paste of an asset/page — here, I explain one of the important use cases which I have experienced, for which I needed this.
When we integrate AEM with any cloud solution (Adobe or third party) for synchronizing assets or pages, we use some kind of reference ID for linking the content between AEM and the cloud service. For example, in the case of exporting an Experience Fragment to Adobe Target, we use Offer ID for linking the AEM XF and the corresponding offer in Adobe Target for further synchronization or updates to the offer. We usually save this reference ID in the content or metadata node of the page/asset.
Now, the problem is, what if I copy/paste the asset/page in AEM for reuse? The metadata or properties also get pasted in the newly created page/asset. Now we have two assets/pages with same reference ID, which is problematic while synchronizing. We can solve this by removing the reference ID from the pasted asset/page. But, how do we remove the reference ID automatically when someone copy/pastes the asset/page? How can we listen to copy/paste event in AEM? Is there a event like that in AEM? Read further to get all your answers.