Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Storing content on the JCR

Avatar

Former Community Member

Hi,

I'm trying to develop a custom process step where it extracts metadata from from an XML file and stores it's values on a node. Just wondering what would the code be

to implement the storing process and if there is a path name involved i would appreciate it as well!

Im assuming you create a node based on the session and set the metadata properties to it?

Thanks,

Ram

1 Accepted Solution

Avatar

Correct answer by
Level 10

TO learn how to persist data in the AEM JCR -- see this AEM article:

http://helpx.adobe.com/experience-manager/using/persisting-cq-data-java-content1.html

You use the JCR API to store data - as shown in this article. You can place that logic into an OSGi bundle. 

To learn how to query data from the AEM JCR  - see this article:

http://helpx.adobe.com/experience-manager/using/querying-experience-manager-data-using1.html

TO learn how to write a custom workflow step - see this community article:

http://helpx.adobe.com/experience-manager/using/creating-custom-aem-workflow-steps.html 

That custom workflow step creates an workflow step that sends email - but once you understand how to create a custom step - you can change the application logic to meet your business requirements. 

You can also use W3C Java APIS to read and write to XML. SO you can use this logic in custom steps. I believe there is an example of dynamically creating XML in the Query article listed above. 

View solution in original post

3 Replies

Avatar

Correct answer by
Level 10

TO learn how to persist data in the AEM JCR -- see this AEM article:

http://helpx.adobe.com/experience-manager/using/persisting-cq-data-java-content1.html

You use the JCR API to store data - as shown in this article. You can place that logic into an OSGi bundle. 

To learn how to query data from the AEM JCR  - see this article:

http://helpx.adobe.com/experience-manager/using/querying-experience-manager-data-using1.html

TO learn how to write a custom workflow step - see this community article:

http://helpx.adobe.com/experience-manager/using/creating-custom-aem-workflow-steps.html 

That custom workflow step creates an workflow step that sends email - but once you understand how to create a custom step - you can change the application logic to meet your business requirements. 

You can also use W3C Java APIS to read and write to XML. SO you can use this logic in custom steps. I believe there is an example of dynamically creating XML in the Query article listed above. 

Avatar

Former Community Member

Thanks very much my next question would of been querying data from nodes but glad you answered it already!

Avatar

Level 10

Also note -- if you are using AEM 6 and want to query data -- be sure to reference this community article. A new way to create a Session object:

Querying Adobe Experience Manager 6 data using the Sling getServiceResourceResolver method