[batchimport] First version of the batch import, with server side Api and xar application. Can handle import of xls and csv files in xwiki documents with objects, with various settings.
[batchimport] Removed some testing configurations from the wizard.
[batchimport] * Added storage of import preferences such as file to import and mapping, to be reused by the next import * Reused the class that the old BatchImport was using to save configuration so that old applications that use the import can sort of use the same configurations * Added method in the API to read import configuration from this stored object * Fixed the order of the wizard step form fields so that old params don't overwrite new params
[batchimport] Added proper exception display in the UI for the exceptions thrown on the serverside, through the service.
[batchimport] * Removed parameter to allow converting document names to upper case, it's a particular case and can be handled as a customization in groovy. * Prepared the batch import to be customized from groovy (changing the implementation of the BatchImport from groovy)
[batchimport] * Fixed the way the file is saved after office import since it was causing an exception (wrong document saved) * Ported the cleanUp function, which is supposed to clean the temp file after the office import, since it was like that in the original BatchImport (not sure it's needed though).
[batchimport] Moved saving data from file to a document in a separate function, so that it could be overwritten, if needed. And also because it makes the code slightly easier to read.
[batchimport] Splitting further the function to save data in the document, to a function that handles objects and a function that handles files. NOTE that this code is failing for the case when fileupload is enabled but not fileimport, with a very ugly exception, which does not reproduce on debug. This is why I commit the code in this state, to be able to still debug it somewhere in the future, since now I can make the fix but I cannot identify the cause.
[batchimport] Finished splitting the objects update and file update in different functions, fixed the bugs that the previous commit had. Behaviour is now the same as before the split.
[batchimport] * Impemented overwrite and deduplication strategy for the import, to handle duplicate document names coming from the document and behaviour wrt existing documents in the wiki. * Fixed little issue with irregular length rows in the source file, provided especially by the excel reader * Fixed comments, formatting. * Added translations document with translations for the overwrite wizard step.
[batchimport] Fixed the way debugging takes place, unified all in a function, conditioned by the variable, removed all other occurences of System.out.println.
[batchimport] Removed usage of System.out and used LOGGER.info instead.
[batchimport] Reverted to the usage of public api.Document instead of XWikiDcument, to prevent cache issues (and other potential issues). Because of this, file import will work only if the performer of the import has programming rights.
[batchimport] Added list of standard document metadata to map in a list in the UI, with all displayed by default.
[batchimport] Added reporting implementation with logger class, to handle translations and grouping of error logs separately.
[batchimport] * Overloaded the import and delete functions with log hint versions, to be able to change reporting log. * Added reporting with BatchImportLog for the delete existing documents function.
[batchimport] * Fixed log hint passing for the delete existing documents methods * Activated i18n hints for logging in the UI * Added try-catch sequence for handling "unexpected" XWikiExceptions for document manipulation, so that if one row fails to import, all the others will work fine.
[batchimport] Fixed error messages for caught xwiki exceptions on import and delete.
[batchimport] Added validation of data before it's marshaled in the page, to make sure it will fit (type conversion, length, etc). * Added exceptions logging to warn logging of unexpected exceptions (e.g. XWikiException on delete, not being able to create an object, saving a document, etc).
[batchimport] * Added translations for the wizard and for the log, the ones used by the I18nBatchImportLog. They are identical to the ones provided by the default logger. * Fixed the usage of the warning macro, some translations here and there