How to check the replication status through java API in AEM/Adobe CQ5
This post will explain how to check the replication status through java API in Adobe Experiance Manager(AEM)/Adobe CQ5Maven dependency:
Add the following dependency to the pom.xml<dependency>
<groupId>com.adobe.granite</groupId>
<artifactId>com.adobe.granite.replication.core</artifactId>
<version>5.12.2</version>
<scope>provided</scope>
</dependency>
API's:
@ReferenceReplicator replicator;
@Reference
SlingRepository repository;
Session session = repository.loginAdministrative(null);
ReplicationStatus status=replicator.getReplicationStatus(session, “nodepath”);
status.isDelivered();//Checks if the content is delivered
Other methods to get the different status
isActivated()
isDeactivated
isPending()
No comments:
Post a Comment