Import Automation
"KAYA Ertugrul" <[email protected]>
| Newsgroups | gmane.comp.cms.jahia.template |
|---|---|
| Message-ID | <E57C3C631FC32644AE5BE18CB42065680138CC74@EPLUXSEX02.ep.parl.union.eu> |
Hi,
I want automate the container import whithin the homepage.
Indeed, I've got a zip file created by the "export" link on the
administration module, and I want import this zip file via a Servlet.
This above code try to import a content on my site's homepage, but
doesn't work and I can read this trace on the console :
[org.apache.slide.util.logger] WARN - WARNING: No active transaction
JahiaPage jp =
ServicesRegistry.getInstance().getJahiaPageService().lookupPage(1);
ContentPage cp = ( ContentPage)jp.getContentPage() ;
java.io.File f = new java.io.File
("R:\\import_export\\export_ContentContainer_5.zip") ;
java.io.FileInputStream fis = new java.io.FileInputStream(f);
org.jahia.services.importexport.ImportExportBaseService ie =
org.jahia.services.importexport.ImportExportBaseService.getInstance() ;
ie.start() ;
ie.importFile(cp,jData.getParamBean(), fis);
ie.stop();
Thanks in advance