April 14, 2020
Estimated Post Reading Time ~

Extending the Multi Site Manager using the Experience Manager MSM API

You can use the Adobe Experience Manager Multi-Site Manager (MSM) API to create a custom service that is invoked when you perform an MSM operation such as create a LiveCopy page. Multi-Site Manager enables you to easily manage multiple web sites that share common content. MSM lets you define relations between the sites so that content changes in one site are automatically replicated in other sites.

For example, web sites are often provided in multiple languages for international audiences. When the number of sites in the same language is low (three to five), a manual process for synchronizing content across sites is possible. However, as soon as the number of sites grows or when multiple languages are involved, it becomes more efficient to automate the process.

A service that works with Experience Manager MSM functionality is implemented as an OSGi bundle and uses APIs located in the com.day.cq.wcm.api package.

Note: For information about MSM functionality, see Multi-Site Management.

The main MSM API objects interact as follows:
Blueprint
A Blueprint defines the pages from which a live copy can inherit content. The use of a blueprint is optional but is required to push modifications to live copies that are inheriting from this blueprint or to define the default rollout configuration for the live copy that is in relation to the blueprint.

LiveCopy
A LiveCopy is the configuration of the relationship (LiveRelationship) between a page and its blueprint page. Use the LiveCopy class to access to the path of the page, the path of the blueprint page, the Rollout Configs, and whether child pages are also included in the LiveCopy.

LiveRelationship
The LiveRelationship represents the relationship between a resource and a blueprint. LiveRelationship objects provide access to the Rollout Configs, LiveCopy, and LiveStatus objects of the relationship. It also provides access to the paths of the target and source pages.

For example, a Live Copy is created in /content/copy from the blueprint at /content/geometrixx. The resources /content/geometrixx/en/jcr:content and /content/copy/en/jcr:content form a relationship.

LiveStatus
LiveStatus objects provide access to the runtime status of a LiveRelationship. Use to query the synchronization status of a Live Copy.

LiveAction
A LiveAction is an action that is executed on each resource that is involved in the rollout.

LiveActionFactory
Creates LiveAction objects given a LiveAction configuration. Configurations are stored as resources in the repository.

This development article steps you through how to use the MSM API. 



By aem4beginner

No comments:

Post a Comment

If you have any doubts or questions, please let us know.