1 31 32 package org.opencms.workplace.tools.database; 33 34 import org.opencms.file.CmsObject; 35 import org.opencms.main.CmsLog; 36 import org.opencms.report.A_CmsReportThread; 37 38 import org.apache.commons.logging.Log; 39 40 50 public class CmsHtmlImportThread extends A_CmsReportThread { 51 52 53 private static final Log LOG = CmsLog.getLog(CmsHtmlImportThread.class); 54 55 56 private CmsObject m_cms; 57 58 59 private CmsHtmlImport m_htmlImport; 60 61 67 public CmsHtmlImportThread(CmsObject cms, CmsHtmlImport imp) { 68 69 super(cms, "test test"); 70 initHtmlReport(cms.getRequestContext().getLocale()); 71 m_cms = cms; 72 m_cms.getRequestContext().setUpdateSessionEnabled(false); 73 m_htmlImport = imp; 74 start(); 75 } 76 77 80 public String getReportUpdate() { 81 82 return getReport().getReportUpdate(); 83 } 84 85 88 public void run() { 89 90 try { 91 m_htmlImport.startImport(getReport()); 93 } catch (Exception e) { 94 getReport().println(e); 95 if (LOG.isErrorEnabled()) { 96 LOG.error(e.getLocalizedMessage()); 97 } 98 } 99 } 100 } 101 | Popular Tags |