We have OOTB feature to GET notification incase of duplicate Asset uploaded ,If we enable the Asset duplicate detector configuration . Can we extend this com.adobe.cq.assetcompute.impl.assetprocessor.AssetDuplicationDetector class to send email instead of notification in AEM as cloud. Please suggest solution for the same.
Solved! Go to Solution.
Views
Replies
Total Likes
hi @sanketd27011989,
I would try one of the following approaches:
Event-driven via Adobe I/O Events for AEM Assets: Subscribe to assets events such as “asset ready” to receive payloads that include repository metadata like dam:sha1, then query AEM for assets with the same hash; if duplicates are found, send email via a service of choice. Reference: here
AEM-side listener after processing: Implement a listener that reacts once the asset state is processed (for example, checking jcr:content/dam:assetState), look up duplicates by dam:sha1, and send an email using the Day CQ Mail Service configuration.
Hi @sanketd27011989,
I think, you can’t directly extend or override com.adobe.cq.assetcompute.impl.assetprocessor.AssetDuplicationDetector in AEM as a Cloud Service, because:
It’s an internal OSGi implementation class managed by Adobe inside the Asset Compute pipeline.
In AEMaaCS, you don’t have control over modifying or subclassing these OOTB services.
That said, you can build a supported extension pattern:
You can register an OSGi EventHandler or Sling Job Consumer that listens for:
com.day.cq.dam.api.DamEvent.ASSET_DUPLICATE (event type fired on duplicate).
In your handler, trigger an Email Service (com.day.cq.mailer.DefaultMailService) to send an email.
OR
Configure a custom workflow step after the duplication check in your asset ingestion workflow model.
In that step, use the Email Service to notify recipients with asset details.
hi @sanketd27011989,
I would try one of the following approaches:
Event-driven via Adobe I/O Events for AEM Assets: Subscribe to assets events such as “asset ready” to receive payloads that include repository metadata like dam:sha1, then query AEM for assets with the same hash; if duplicates are found, send email via a service of choice. Reference: here
AEM-side listener after processing: Implement a listener that reacts once the asset state is processed (for example, checking jcr:content/dam:assetState), look up duplicates by dam:sha1, and send an email using the Day CQ Mail Service configuration.
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies