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

Sling Settings deprecated - Alternative approach and best practices

Avatar

Level 9

Hi

To get rid of the usage of slingsettings to determine run mode, author or publish , what is the approach adobe might have finalized by now. I read posts and arguments with counter arguments on it's usage but do we have a permanent backfill for the api by adobe?

 

if not, is the suggested approach to use a component with config that returns author or publisher and have it in specific config.environment.author (setting the properties within the config as author and environment(stage/prod/dev)) and config.environment.pub (setting the properties within the config as pub and environment(stage/prod/dev)).This config then be used within models and servlets?

 

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/alternative-of-deprecated-...

 

Want to hear opinions thoughts and best practices around it. Do not want to create something that will not be reusable in the future.

 

thanks,

 

1 Accepted Solution

Avatar

Correct answer by
Level 8

You can have OSGi configuration and create a utility method which determines the run mode from the configuration

This would be an ideal approach and easy to refactoring in future if something comes up by Adobe

 

 

Hope this is helpful

View solution in original post

2 Replies

Avatar

Correct answer by
Level 8

You can have OSGi configuration and create a utility method which determines the run mode from the configuration

This would be an ideal approach and easy to refactoring in future if something comes up by Adobe

 

 

Hope this is helpful

Avatar

Level 9

@Manikumar Thanks.. just sent a private chat to align since i feel we are ultimately thinking the same?