Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Promoting Launch Using Api

pranalim1653274
Level 2
Level 2

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/co...

 

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.

1 Accepted Solution
shelly-goel
Correct answer by
Community Advisor
Community Advisor

@pranalim1653274 

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/exam...

View solution in original post

4 Replies
kunal23
Level 10
Level 10

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. 

pranalim1653274
Level 2
Level 2
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 ?
kunal23
Level 10
Level 10

Just override those getters in your implementation class and pass the instance to the API method.

shelly-goel
Correct answer by
Community Advisor
Community Advisor

@pranalim1653274 

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/exam...

View solution in original post