Promoting Launch Using Api | Community
Skip to main content
Level 2
Dec 14, 2020 7:36 PM UTC
Solved

Promoting Launch Using Api

Hi,

I am trying to use LaunchManager Api to Promote the launch, but I am unable to set LaunchPromotion Parameters.

https://helpx.adobe.com/experience-manager/6-3/sites/developing/using/reference-materials/javadoc/com/adobe/cq/launches/api/LaunchManager.html#promoteLaunch(com.adobe.cq.launches.api.Launch,%20com.adobe.cq.launches.api.LaunchPromotionParameters)

 

Code : 

Launch launch = res.adaptTo(Launch.class); // Launch Path

LaunchManager launchManager = res.adaptTo(LaunchManager.class); // LaunchManager object

launchManager.promoteLaunch(launch, launchParameters?);

 

if anyone has a sample code snippet, that would be helpful.

 

Thanks in advance.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
shelly-goel
shelly-goelAccepted solution
Employee
Dec 28, 2020 5:49 AM UTC

@pmahiske19 

Here's the sample implementation for promoting a launch programmatically, which you can refer to:

 

https://github.com/terrabeata/promote-launch/blob/master/bundle/src/main/java/com/adobe/daycare/example/LaunchServlet.java

4 replies

shelly-goel
shelly-goelAccepted solution
Employee
Dec 28, 2020 5:49 AM UTC

@pmahiske19 

Here's the sample implementation for promoting a launch programmatically, which you can refer to:

 

https://github.com/terrabeata/promote-launch/blob/master/bundle/src/main/java/com/adobe/daycare/example/LaunchServlet.java

Translate
Kunal_Gaba_
New Participant
Dec 16, 2020 4:05 AM UTC

I believe you just have to create a new Java POJO class which will implement LaunchPromotionParameters interface. Implement the methods of the interface and pass the POJO object to the promoteLaunch method. 

Translate
Level 2
Dec 17, 2020 6:05 PM UTC
LaunchPromotionParameters has all getters. I tried to get it using Impl but unable to do it. do we have any other option to get the LaunchPromotionParameters ?
Translate