Monday, 18 July 2016

Retrieving AEM LiveCopy information using the MSM API

You can use the Adobe Experience Manager Multi-Site Manager (MSM) API to retrieve information about LiveCopys. AEM MSM functionality lets you define relations between AEM sites and also lets you define to what degree re-use or control is exerted on the different sites. Using MSM, once configure MSM, you can update multi site with little effort.

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.

Join the Experience League

To become an Experience Business, you need more than just great tools and online help. You need a partner. Experience League is a new enablement program with guided learning to help you get the most out of Adobe Experience Cloud. With training materials, one-to-one expert support, and a thriving community of fellow professionals, Experience League is a comprehensive program designed to help you become your best.

Join the Adobe Experience League by clicking this banner.




I (Scott Macdonald) am a Senior Experience League Community Manager at Adobe Systems with 20 years in the high tech industry. I am also a programmer with knowledge in Java, JavaScript, C#,C++, HTML, XML and ActionScript. If  you would like to see more AEM or other end to end articles like this, then leave a comment and let me know what content you would like to see.


Twitter: Follow the Digital Marketing Customer Care team on Twitter @AdobeExpCare.