Views
Replies
Total Likes
Hi,
well any modification of an existing OSGI config get's saved to /apps/system/config/. Change a config and check for yourself. The best way to deploy OSGI configurations is to create an appropriate runmode folder[1]
If this is on publish you won't have access to /apps, so best to write a servlet that reads the node and returns the json
Regards,
Opkar
[1] https://helpx.adobe.com/experience-manager/kb/RunModeDependentConfigAndInstall.html
[2] https://cqdump.wordpress.com/2015/04/21/aem-basics-runmodes/
Views
Replies
Total Likes
Hi,
Are you looking for an OOTB OSGI config or a custom config? As custom configs get saved to the repository, at /apps/system/config/. Or if you include them in runmode folders, again you can access them. Not sure about the OOTB configs.
What are you trying to achieve?
Regards,
Opkar
Views
Replies
Total Likes
You need to write a plugin & no option available OOB. But you can get in AS IS format. Does not sounds good you are trying to consume in java script. What is your usecase trying to solve
Views
Replies
Total Likes
Hi,
IIRC the OSGI console offers no way to export a single configuration as JSON or XML. You could use [1] to get all configuration settings. But this always requires admin privileges (and direct access to the OSGI webconsole, which is locked down by the security list), so it isn't the way you should go.
Exporting the config directly from /apps/myapp/config.-1.json is also not the best idea, as you might not have created configuration settings for the services you are interested in. It also requires much privileges any standard user should have.
So I would think, that implementing this on your own is likely the best idea. You can use the OSGI config admin to access every configuration in the system (as long as you know the PID).
In every case you should think of the case, that you expose system configuration to a potenteially 3rd party user!
kind regards,
Jörg
[1] http://localhost:4502/system/console/status-Configurations.json
Views
Replies
Total Likes
Hi Sham,
I need some custom osgi configuration to be consumed in javascript front end. What would be your suggestion ?
Also did not understand the 'AS IS format'. Can you please provide a little detail?
Views
Replies
Total Likes
Hi Opkar,
It's custom config.Basically these custom configs will be consumed by Javascript. So, was thinking a JSON response will be easy to handle.
Please provide your thought
Views
Replies
Total Likes
Hi,
well any modification of an existing OSGI config get's saved to /apps/system/config/. Change a config and check for yourself. The best way to deploy OSGI configurations is to create an appropriate runmode folder[1]
If this is on publish you won't have access to /apps, so best to write a servlet that reads the node and returns the json
Regards,
Opkar
[1] https://helpx.adobe.com/experience-manager/kb/RunModeDependentConfigAndInstall.html
[2] https://cqdump.wordpress.com/2015/04/21/aem-basics-runmodes/
Views
Replies
Total Likes
sumitc22 wrote...
Hi Sham,
I need some custom osgi configuration to be consumed in javascript front end. What would be your suggestion ?
Also did not understand the 'AS IS format'. Can you please provide a little detail?
Still your business case is not clear to me. There are two way config is stored in repository once saving directly from felix console which is config so example you can access like [1] which gets name value pair seperated by line feed. Another using content-nodes (sling:osgiConfig) in the repository example at [2] in which case you can access like [3] example [4] which is json format. In any case both need authentication from java script. If you are following the recommendation of content-nodes (sling:osgiConfig) then your question is answered to get json format otherwise you get as non json format.
Hope thing clarifies.
[1] http://<host>:<port>/apps/system/config/org.apache.sling.security.impl.ReferrerFilter.config
[3] http://<host>:<port>/apps/<yourProject>/config/<pid>.json
[4] http://<host>:<port>/apps/geometrixx-outdoors-app/config/com.day.cq.wcm.mobile.core.impl.MobileEmulatorProvider-topcoatconfig.json
Views
Replies
Total Likes
Views
Likes
Replies