1 31 32 package org.opencms.workplace.tools.content; 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 CmsElementRenameThread extends A_CmsReportThread { 50 51 52 private static final Log LOG = CmsLog.getLog(CmsElementRenameThread.class); 53 54 private CmsElementRename m_elementRename; 55 56 62 public CmsElementRenameThread(CmsObject cms, CmsElementRename elementRename) { 63 64 super(cms, "Renaming Elements"); 65 cms.getRequestContext().setUpdateSessionEnabled(false); 66 initHtmlReport(cms.getRequestContext().getLocale()); 67 m_elementRename = elementRename; 68 start(); 69 } 70 71 74 public String getReportUpdate() { 75 76 return getReport().getReportUpdate(); 77 } 78 79 82 public synchronized void run() { 83 84 try { 85 m_elementRename.actionRename(getReport()); 87 } catch (Exception e) { 88 getReport().println(e); 89 if (LOG.isErrorEnabled()) { 90 LOG.error(e.getMessage()); 91 } 92 } 93 } 94 } | Popular Tags |