Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session
SOLVED

Live copy original page path

Avatar

Level 2

How can I get the original (source) path of a live copied page?

Thanks!

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

As  smacdonald2008 said it's very good article to get detail information over MSM API.

Here you have direct API url which helps you to achieve your requirement and code snippet.


LiveRelationshipManager ("The Adobe AEM Quickstart and Web Application.")

LiveRelationship ("The Adobe AEM Quickstart and Web Application.")

@Reference
private LiveRelationshipManager liveRelationshipManager;
try {

  String sourcePath = liveRelationshipManager.getLiveRelationship(resource, true).getSourcePath();
} catch (WCMException exception) {

  exception.printStackTrace();
}

View solution in original post

8 Replies

Avatar

Level 10

Using the MSM API - you can get a lot of information.

See - Adobe Experience Manager Help | Retrieving Adobe Experience Manager LiveCopy information using the M...

This artilce will show you how to use this API to obtain information from MSM. You can look at the Javadocs for learn about other methods and functionality.

Avatar

Correct answer by
Community Advisor

As  smacdonald2008 said it's very good article to get detail information over MSM API.

Here you have direct API url which helps you to achieve your requirement and code snippet.


LiveRelationshipManager ("The Adobe AEM Quickstart and Web Application.")

LiveRelationship ("The Adobe AEM Quickstart and Web Application.")

@Reference
private LiveRelationshipManager liveRelationshipManager;
try {

  String sourcePath = liveRelationshipManager.getLiveRelationship(resource, true).getSourcePath();
} catch (WCMException exception) {

  exception.printStackTrace();
}

Avatar

Level 2

Thank you!

Do you have a sightly example?  No luck with the following:

const liveRelationshipManager = resource.adaptTo(com.day.cq.wcm.msm.api.LiveRelationshipManager);

sourcePath = liveRelationshipManager.getLiveRelationship(resource, true).getSourcePath();

Avatar

Level 10

Do you mean an artilce of running the MSM API in a HTL Java backend?

Avatar

Level 10

In the Article i listed the names of the main MSM objects are listed. See LiveCopy for example in the Javadocs:

"The CQ5 Quickstart and Web Application."

Avatar

Level 10

Not possible - the MSM is a Java Strongly typed API - you have to use it within an OSGi bundle and use the MSM API as discussed in the article.

Avatar

Level 2

Thank you.  Is it possible to get the master of a language copy with this API?