I see that we can use environment specific configuration using confg.runmodes for OSGI. Is there anyway to do for a components?
Solved! Go to Solution.
Views
Replies
Total Likes
Are you interested in controlling the configurations that are managed on the component's definition node (things like component group or sling resource super type) or configurations for the custom code you write in the JSP/Sightly of the component? I agree with Scott that you can't do that for the component definition node, but if you interested in controlling the behavior of your custom code there are a variety of ways to do that:
There are multiple variations of those two approaches. Each of them has some pros and cons depending on exactly what kind of configurations you are trying manage.
Views
Replies
Total Likes
Components do not have the same environment config settings as OSGi bundles. All settings for components are documented here:
http://docs.adobe.com/docs/en/cq/5-6-1/developing/components.html
Views
Replies
Total Likes
Are you interested in controlling the configurations that are managed on the component's definition node (things like component group or sling resource super type) or configurations for the custom code you write in the JSP/Sightly of the component? I agree with Scott that you can't do that for the component definition node, but if you interested in controlling the behavior of your custom code there are a variety of ways to do that:
There are multiple variations of those two approaches. Each of them has some pros and cons depending on exactly what kind of configurations you are trying manage.
Views
Replies
Total Likes
I have created a configurable OSGI bundle.I am using sightly components(where env specific controls are present). I have created the sling:osginode based on different run modes. How can I access the properties of OSGI Bundle in Java-WCMUse of sightly component. Any interface/Class should i use ? It will be helpful if you could share some code snippet for accessing the OSGI properties external to bundle
Views
Replies
Total Likes
When you say you have created a configurable OSGI bundle do you mean you have a service or component in that bundle that is configurable? I am assuming that's what you mean. In that case you need to define getters for any configurable values on your service's interface. Then your use bean gets a reference to your service either through the SlingScriptHelper.getService method.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Like
Replies