Hi Isomorphic,
I have a DataSource where I dynamically configure the uploadFieldName with a DynamicDSGenerator.
This is working fine. I'm using the same DataSource serverside to periodically import eMails with a servlet.
In the end, the servlet feeds the data to a DataImport instance via dataImport.importDataSourceRecords(emailContentReader, importDS);
In order to translate csv->.ds.xml-fieldname as well I need to use a different overload with columnRemap-parameter. I assume this is what the serverside component of the BatchUploader does as well.
My question is how do I get an instance of my Upload-DataSource where I can loop though the fields can create the columnRemap?
ServerDataSourceImplementation warns that one should not use "new DataSource()". But how to get a DataSource then? On the serverside, there is no static DataSource.get().
I'd call getFieldNames() and getField() on the instance to generate my map. How do I destroy the instance afterwards? Do I have to do anything in order not to leak memory?
Thank you & Best regards
Blama
I have a DataSource where I dynamically configure the uploadFieldName with a DynamicDSGenerator.
This is working fine. I'm using the same DataSource serverside to periodically import eMails with a servlet.
In the end, the servlet feeds the data to a DataImport instance via dataImport.importDataSourceRecords(emailContentReader, importDS);
In order to translate csv->.ds.xml-fieldname as well I need to use a different overload with columnRemap-parameter. I assume this is what the serverside component of the BatchUploader does as well.
My question is how do I get an instance of my Upload-DataSource where I can loop though the fields can create the columnRemap?
ServerDataSourceImplementation warns that one should not use "new DataSource()". But how to get a DataSource then? On the serverside, there is no static DataSource.get().
I'd call getFieldNames() and getField() on the instance to generate my map. How do I destroy the instance afterwards? Do I have to do anything in order not to leak memory?
Thank you & Best regards
Blama
Comment