02-09-2018 05:18 AM
Hello everyone,
I want to integrate the functionnality of Bulk import tool into my Java code Client CMIS using openCMIS library, is there any way to do so ? The goal is to do an import to alfresco automatically and without using the bulk import tool UI I found this code :
UserTransaction txn = transactionService.getUserTransaction();
txn.begin();
AuthenticationUtil.setRunAsUser('admin');
StreamingNodeImporterFactory streamingNodeImporterFactory = (StreamingNodeImporterFactory)ctx.getBean('streamingNodeImporterFactory');
NodeImporter nodeImporter = streamingNodeImporterFactory.getNodeImporter(new File('importdirectory'));
BulkImportParameters bulkImportParameters = new BulkImportParameters();
bulkImportParameters.setTarget(folderNode);
bulkImportParameters.setReplaceExisting(true);
bulkImportParameters.setBatchSize(40);
bulkImportParameters.setNumThreads(4);
bulkImporter.bulkImport(bulkImportParameters, nodeImporter);
txn.commit();
But I didn't found any library that provides classes implemented in this code, so I can use them in my code.
If someone please can help me. Thanks a lot.
02-09-2018 10:42 AM
Can please someone help me.
Explore our Alfresco products with the links below. Use labels to filter content by product module.