Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Create Live Copy in Java Code?

Avatar

Level 5

    I'm trying to create a live copy of a page but in a java class in my Core bundle. I'm struggling to find the correct java classes to do this. So far I have found the TemplateRolloutService in com.adobe.cq.social.blueprint.api which looks the most promosing although not sure why it is in the social package!

However I can't find any documentation, I have got the unobfuscated JAR from Daycare but the class has no javaDoc and the input params to the methods are not named helpfully in my decompiler e.g. 

Page createLiveCopy(SlingRepository var1, ResourceResolver var2, RolloutManager var3, String var4, String var5, String var6, String var7, ValueMap var8) throws OperationException, RepositoryException, WCMException;

 So two questions really:

  1. How can I create a live copy in my java code
  2. What is the best way to understand the java API's available to me in these sort of situations? I tend to struggle with AEM when trying to figure out how to do more complex operations in the backend java code and often am resorting to decompiling the JAR, which in this case isn't helping!
1 Accepted Solution

Avatar

Correct answer by
Level 9

Hi Sutty,

     Apart from legal terms,  Decompile is good and bad .  If you are reverse engineering some features which is legacy & no support then only go with decompile otherwise you end up wrong implementation which will break later. So avoid decompile.

  • Using social api is not correct unless you are live coping communites,   in the sense you might pay up for additional licence in production for using it.
  • Following are  approaches to create a live copy
  • Best way to understand api is

Thanks,

View solution in original post

3 Replies

Avatar

Correct answer by
Level 9

Hi Sutty,

     Apart from legal terms,  Decompile is good and bad .  If you are reverse engineering some features which is legacy & no support then only go with decompile otherwise you end up wrong implementation which will break later. So avoid decompile.

  • Using social api is not correct unless you are live coping communites,   in the sense you might pay up for additional licence in production for using it.
  • Following are  approaches to create a live copy
  • Best way to understand api is

Thanks,

Avatar

Level 1

Hi MC Stuff,

Please, could you provide the equivalent class or method for AEM6.3 Java API ?

  • com.day.cq.wcm.msm.common.LiveCommand seems to be not available anymore with AEM.

Thanks

Avatar

Level 10

I would open a support ticket against the AEM Docs and ask if this API is still applicable:

com.day.cq.wcm.msm.api (Adobe CQ 5.6.1 Java Documentation 5.6.1 API)

In a lot of cases - they Java APIs do not change from version to version. This should be clear in the docs.