This article walks you through how to use the AEM MSM API to retrieve LiveRelationship information. A LiveRelationship defines a live relationship of a synced resource between its blueprint and livecopy. For example, if a site (blueprint) "/content/geometrixx" has a livecopy in "/content/copy", then the resource of "/content/geometrixx/en/jcr:content" and "/content/copy/en/jcr:content" form a relationship. See Interface LiveRelationship.
Note: For information about MSM functionality, see Multi-Site Management.
Using an OSGi bundle that contains these APIs, you can retrieve LiveRelationship information. In this development article, the LiveRelationship values are written to the Adobe CQ log file.
1.07.2016 13:08:26.768 *INFO* [0:0:0:0:0:0:0:1 [1469120906760] GET /content/MsmAPI.html HTTP/1.1] foo.service.aem.msm.MsmExampleImpl **** Inside before try LiveCopy Status MSM Example Impl class
21.07.2016 13:08:26.768 *INFO* [0:0:0:0:0:0:0:1 [1469120906760] GET /content/MsmAPI.html HTTP/1.1] foo.service.aem.msm.MsmExampleImpl Inside LiveCopy Status MSM Example Impl class
21.07.2016 13:08:26.792 *INFO* [0:0:0:0:0:0:0:1 [1469120906760] GET /content/MsmAPI.html HTTP/1.1] foo.service.aem.msm.MsmExampleImpl Key is: msm:isTargetFromDifferentTree
21.07.2016 13:08:26.792 *INFO* [0:0:0:0:0:0:0:1 [1469120906760] GET /content/MsmAPI.html HTTP/1.1] foo.service.aem.msm.MsmExampleImpl Value is: false
21.07.2016 13:08:26.792 *INFO* [0:0:0:0:0:0:0:1 [1469120906760] GET /content/MsmAPI.html HTTP/1.1] foo.service.aem.msm.MsmExampleImpl Key is: msm:isTargetManuallyCreated
21.07.2016 13:08:26.792 *INFO* [0:0:0:0:0:0:0:1 [1469120906760] GET /content/MsmAPI.html HTTP/1.1] foo.service.aem.msm.MsmExampleImpl Value is: false
21.07.2016 13:08:26.792 *INFO* [0:0:0:0:0:0:0:1 [1469120906760] GET /content/MsmAPI.html HTTP/1.1] foo.service.aem.msm.MsmExampleImpl Key is: msm:isTargetCancelledChild
To read this development article, click https://helpx.adobe.com/experience-manager/using/msm_api.html.