I would have a general question of the architecture ob my AEM application.
I have to do a simple task -> show an external .csv file at a page of an AEM application - there should be no author actions or something else.
Using Java : From java WcmUSe class you will return map or list based on that which datastructure will fullfill your need and iterate that list or map into your component and display the data either in table format or whatever ways you want to display.
Thanks a lot for the answer - its really helpful, In my case this one is relevant for me:
>> If the file updated any time and many time in the day for this you have to fetch the file directly from the external TFS for this you can write java code or js for fetching and get the data and parse the .csv file and get those data into the component UI and display it.
Therefore I will write an OSBi Bundle which reads the csv file from the external TFS.
This is no problem and easy to implement.
Actually I don't know how to store this data into the componentUI and how to display it.
From the OSGi Bundle I have to get an instance of a Component UI and set data as property of this node?
Can I do it like this. I have a missing link between OSGi Bundle and viewing this data.
Every time reading the data from external file from NTFS or TFS will somehow degrade the performance.If the .csv file is not updated regularly and the file size is not huge then you can provide the option to upload the .csv file into the particular folder into DAM and then on upload write a workflow to read the file and create the node and update the node in some location and set all value of CSv in the property of nodes.For triggering the workflow you have to create workflow launcher and set the event type and path of the dam where .csv file is updated.
Read the Csv data from node and display into page for this you can create the component.
If the file updated on regular interval of time(cron job) for this you have to write Schedular that will start on the bases of cron job expression and do the same process to fetch and create or update node and read the value as same as above.
If the file updated any time and many time in the day for this you have to fetch the file directly from the external TFS for this you can write java code or js for fetching and get the data and parse the .csv file and get those data into the component UI and display it.