Live Copy Synchronization Status | Adobe Higher Education
Skip to main content
Singaiah_Chintalapudi
Level 7
June 8, 2016
Resuelto

Live Copy Synchronization Status

  • June 8, 2016
  • 5 respuestas
  • 1635 visualizaciones

Hi,

I am making changes to the English pages programatically and live copy will copy those changes to Spanish. I would like to know when the live copy is completed copying the changes to Spanish. So I can make changes on top of them in Spanish. Is there anyway to get the live copy synchronization status in Java?

Thanks.

Este tema ha sido cerrado para respuestas.
Mejor respuesta de Singaiah_Chintalapudi

bsloki wrote...

Are you looking to make the changes to the live copy programatically ??

 

No. Basically I am doing replication in both English and Spanish locales programatically. Live copy will copy the content from English to Spanish. Before I kick off the replication in Spanish, I want to know if the live copy is completed copying the content from English to Spanish. So I am looking for a flag to know whether live copy is completed copying that content.

I have written the below code to get the live status. I think it will work but not sure.

@Reference
private LiveRelationshipManager liveRelManager;


LiveRelationship liveRelationship;
try {
 liveRelationship = liveRelManager.getLiveRelationship([LIVE COPY PATH], true);
 Map < String, Boolean > map = liveRelationship.getStatus().getAdvancedStatus();
 for (Entry < String, Boolean > element: map.entrySet()) {
  System.out.println("Key is: " + element.getKey());
  System.out.println("Value is: " + element.getValue());
 }

}

5 respuestas

Singaiah_Chintalapudi
Level 7
June 8, 2016

I see in MSM API that if we have LiveRelationship reference variable then we can get the live copy status.

com.day.cq.wcm.msm.api 
Interface LiveRelationship

Can you let me know how to get this reference variable?

smacdonald2008
Level 10
June 9, 2016

I will look for sample code. As far as I know - there are no articles on this subject. 

Lokesh_Shivalingaiah
Level 10
June 9, 2016

Are you looking to make the changes to the live copy programatically ??

Singaiah_Chintalapudi
Singaiah_ChintalapudiAutorRespuesta
Level 7
June 9, 2016

bsloki wrote...

Are you looking to make the changes to the live copy programatically ??

 

No. Basically I am doing replication in both English and Spanish locales programatically. Live copy will copy the content from English to Spanish. Before I kick off the replication in Spanish, I want to know if the live copy is completed copying the content from English to Spanish. So I am looking for a flag to know whether live copy is completed copying that content.

I have written the below code to get the live status. I think it will work but not sure.

@Reference
private LiveRelationshipManager liveRelManager;


LiveRelationship liveRelationship;
try {
 liveRelationship = liveRelManager.getLiveRelationship([LIVE COPY PATH], true);
 Map < String, Boolean > map = liveRelationship.getStatus().getAdvancedStatus();
 for (Entry < String, Boolean > element: map.entrySet()) {
  System.out.println("Key is: " + element.getKey());
  System.out.println("Value is: " + element.getValue());
 }

}

Lokesh_Shivalingaiah
Level 10
June 9, 2016

Yes... that should work !! Let us know if you were able to get it !