1 31 32 package org.opencms.workplace.tools.content.check; 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 49 public class CmsContentCheckThread extends A_CmsReportThread { 50 51 52 private static final Log LOG = CmsLog.getLog(CmsContentCheckThread.class); 53 54 55 private CmsObject m_cms; 56 57 58 private CmsContentCheck m_contentCheck; 59 60 66 public CmsContentCheckThread(CmsObject cms, CmsContentCheck contentCheck) { 67 68 super(cms, "contentcheck"); 69 initHtmlReport(cms.getRequestContext().getLocale()); 70 m_cms = cms; 71 m_cms.getRequestContext().setUpdateSessionEnabled(false); 72 m_contentCheck = contentCheck; 73 } 74 75 78 public String getReportUpdate() { 79 80 return getReport().getReportUpdate(); 81 } 82 83 86 public void run() { 87 88 try { 89 m_contentCheck.startContentCheck(m_cms, getReport()); 91 } catch (Exception e) { 92 getReport().println(e); 93 if (LOG.isErrorEnabled()) { 94 LOG.error(e.getLocalizedMessage()); 95 } 96 } 97 } 98 } 99 | Popular Tags |