Hi,
Does anyone know/has implemented something that helps you to fetch the runmode in backend code. SlingSettingsService has been deprecated.
WCMMode doesn't work in this case as we need to check it on a editable template(structure), where wcmmode is disabled.
Thanks!
Solved! Go to Solution.
Views
Replies
Total Likes
Hi
Till the time we have alternative of SlingSettingService you can set run mode config value with OSGI configuration and read this in you backend code.
Thanks
Dipti
@ibishika,
it looks like the solution is still in the planning phase: https://github.com/Adobe-Consulting-Services/acs-aem-commons/issues/2476
Hi
Till the time we have alternative of SlingSettingService you can set run mode config value with OSGI configuration and read this in you backend code.
Thanks
Dipti
Hi @Dipti_Chauhan ,
Do you have any examples, which we can refer as I have also same requirement and we need to use an alternative?
Thanks!
Views
Replies
Total Likes
Your code should not reference any runmode (either directly or indirectly), instead it should get expressed via OSGI configuration. I wrote an article for it some time ago, which explains how you can/should do that: https://cqdump.joerghoh.de/2018/09/12/referencing-runmodes-in-java/
cheers,
Jörg
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies