Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events
SOLVED

Curl to create OsigConfig nodes

Avatar

Level 3

I have two questions:

1) When I apply settings via the felix console, they get saved as nodes of nt:file with a jcr:content node underneath. I see everywhere else to use osgiconfig nodes instead. Which one of the two is preferred when setting these configurations using curl

2) I have issues creating nodes underneath a parent node of the format: config.author or map.publish if there already is a config or map node. Sling is just mapping my request to config / map, rather than config.author / map.publish. Anyone any idea how I can work around this?

Many thanks,

Katrien

1 Accepted Solution

Avatar

Correct answer by
Level 10

1)   Currently configuration changes from felix console is always to .config files. You can track at [A] to support all options. For now I would say follow osgiconfig nodes as documented in the official document[B].

2)    Paste the complete command you are using?

[A]  
https://issues.apache.org/jira/browse/SLING-2477
https://issues.apache.org/jira/browse/SLING-2752
 
[B]
http://dev.day.com/docs/en/cq/current/deploying/configuring_osgi.html#OSGi%20Configuration%20in%20th...

View solution in original post

4 Replies

Avatar

Correct answer by
Level 10

1)   Currently configuration changes from felix console is always to .config files. You can track at [A] to support all options. For now I would say follow osgiconfig nodes as documented in the official document[B].

2)    Paste the complete command you are using?

[A]  
https://issues.apache.org/jira/browse/SLING-2477
https://issues.apache.org/jira/browse/SLING-2752
 
[B]
http://dev.day.com/docs/en/cq/current/deploying/configuring_osgi.html#OSGi%20Configuration%20in%20th...

Avatar

Level 1

1) Always give values from config node instead of giving values from felix console

2) for taking values from map.publish 

    go to Configuration tab -> Apache Sling JCR resource resolver -> Mapping location 

    eg. /etc/map.publish

 

   for taking values from config.author

   goto cq-instllation-dir/crx-quckstart/launchpad/sling.properties

   add properties

  sling.jcrinstall.folder.name.regexp=.*/(install|config)?

  sling.run.modes=author  

Avatar

Level 10

Also -- here an older thread on a similar topic that may help you:

http://forums.adobe.com/thread/1093660

Avatar

Level 10

What about using either the Sling API or the JCR API to create nodes instead of CURL. You have much finer control when using APIs. 

http://scottsdigitalcommunity.blogspot.ca/2012/03/programmatically-accessing-day-cq.html (this is just a basic one that talks about using the JCR API)

http://scottsdigitalcommunity.blogspot.ca/2013/10/automating-process-of-uploading-digital.html (this one talks about how to upload binary content to the JCR - in the example - the AEM DAM)

However -- both show how to create new nodes in the AEM JCR.