Hi,
I have a servlet written with path and when executed I want it to unpublish a page in AEM Cloud. As AEM Cloud uses sling distribution and not replication agent anymore, I am not sure how to write the JAVA code to unpublish a page.
Below is the servlet path. I have the page hard-coded in the code for testing purposes. And I want to execute it only on Author and want the page to be unpublished.
Servlet path: http://localhost:4502/bin/deactivate
Could someone please help with sharing the java code snippet to unpublish the page in AEM cloud?. Thank you
Solved! Go to Solution.
Views
Replies
Total Likes
@karthicksridharan you can use the replication API.
The actual operation will look something like this -
replicator.replicate(session,ReplicationActionType.DEACTIVATE,"/content/abc/def");
@karthicksridharan you can use the replication API.
The actual operation will look something like this -
replicator.replicate(session,ReplicationActionType.DEACTIVATE,"/content/abc/def");
Thanks @Harwinder-singh for the response. Let me try that out.
Views
Likes
Replies