Sign in to Community
Sign in to view all badges
I created a scheduler which is having enable / disable configuration at OSGI level. I want to move this enable / disable checkbox to Context Aware Configuration so that it can be possible to enable it for different tenants.
Is it possible to do that ?
yes, this is possible. Create a context-aware configuration and access it in the scheduler like this:
Resource contentResource = resourceResolver.getResource("/content/mysite/page1");
Resource configResource = configurationResourceResolver.getResource(contentResource, "my-bucket", "my-config");
More info here: https://sling.apache.org/documentation/bundles/context-aware-configuration/context-aware-configurati...
Hope this helps.