Hi Team ,
We are on AEM cloud .. instance and we I an trying to push some selective asset to preview server.
So I used
Replication API.. and filter and new options . which preview agent ID as the key.
but when I am trying to get the status of activation using the below code:
ReplicationStatus publishStatus = res.adaptTo(ReplicationStatus.Class)
publishStatus.getStatusForAgent("preview"). ( compilation error -> no defined method as getStatusForAgent())
But ReplicationStatus API do not have any methods which will confirm if asset has been published on preview server.
Can you suggest on this please.
regards
Madhu
Solved! Go to Solution.
Views
Replies
Total Likes
Hi Sachin,
I too checked the same thing , it was all due to AEM SDK API version , as I switched to different SDK API version it started working ..
Thanks for responding.
Hi,
Could you please check https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/operations/replicat...
hi Arun ,
Thank you for responding ..I am actually using the same link .... where in afterStatus.getStatusForAgent("preview"). is throwing error ...
getStatusForAgent is not a method for ReplicationStatus API...
I am trying to look in the API Version ... IF API difference is causing it
https://javadoc.io/doc/com.adobe.aem/aem-sdk-api/latest/com/day/cq/replication/package-summary.html In this Link I see it is a valid method ..
Regards
MAdhu
Can you check this from IDE/bundle, which API it is considering?
This method is available in ReplicationStatus. Please refer below doc for Cloud.
Java Doc : developer.adobe.com/experience-manager/reference-materials/cloud-service/javadoc/com/day/cq/replication/ReplicationStatus.html#getStatusForAgent(java.lang.String)
Please share the bundle version you are using of aem-sdk-api. I did not get compilation error with 2022.6 version.
Hi Sachin,
I too checked the same thing , it was all due to AEM SDK API version , as I switched to different SDK API version it started working ..
Thanks for responding.
Thanks for confirmation.
Happy Learning.
Views
Likes
Replies