Bulk import

cancel
Showing results for 
Search instead for 
Did you mean: 
progm
Active Member

Bulk import

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  : 

Streaming


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.

1 Reply
progm
Active Member

Re: Bulk import

Can please someone help me.