/** * @see I_CmsReport#println(CmsMessageContainer) */ @Override public void println(final CmsMessageContainer container) { for (I_CmsReport report : m_delegates) { report.println(container); } }
/** * @see org.opencms.report.A_CmsReportThread#getReportUpdate() */ @Override public String getReportUpdate() { return getReport().getReportUpdate(); }
/** * @see I_CmsReport#print(CmsMessageContainer) */ @Override public void print(final CmsMessageContainer container) { for (I_CmsReport report : m_delegates) { report.print(container); } }
OpenCms.fireCmsEvent(new CmsEvent(I_CmsEventListener.EVENT_FULLSTATIC_EXPORT, eventData)); } catch (CmsException e) { report.println(e); } catch (IOException e) { report.println(e); } catch (ServletException e) { report.println(e); } finally { report.print(org.opencms.report.Messages.get().container(org.opencms.report.Messages.RPT_STAT_0)); report.println( org.opencms.report.Messages.get().container( org.opencms.report.Messages.RPT_STAT_DURATION_1, report.formatRuntime())); report.println(Messages.get().container(Messages.RPT_STATICEXPORT_END_0), I_CmsReport.FORMAT_HEADLINE);
getReport().println(m_throwable); getReport().addError(m_throwable); getReport().print(Messages.get().container(Messages.RPT_IMPORT_ORGUNIT_0), I_CmsReport.FORMAT_NOTE); getReport().print( org.opencms.report.Messages.get().container(org.opencms.report.Messages.RPT_ARGUMENT_1, m_orgUnitName)); getReport().print(org.opencms.report.Messages.get().container(org.opencms.report.Messages.RPT_DOTS_0)); getReport().println(Messages.get().container(Messages.RPT_NOT_CREATED_0), I_CmsReport.FORMAT_OK); m_orgUnitResources.remove(m_orgUnitName); return; getReport().println( org.opencms.report.Messages.get().container(org.opencms.report.Messages.RPT_OK_0), I_CmsReport.FORMAT_OK); } catch (CmsException e) { getReport().println(e); getReport().addError(e);
m_report.println( Messages.get().container(Messages.RPT_NUM_PAGES_1, new Integer(size)), I_CmsReport.FORMAT_HEADLINE); while (i.hasNext()) { String resName = (String)i.next(); m_report.print( org.opencms.report.Messages.get().container( org.opencms.report.Messages.RPT_SUCCESSION_2, String.valueOf(size)), I_CmsReport.FORMAT_NOTE); m_report.println(Messages.get().container(Messages.RPT_PROCESS_1, resName), I_CmsReport.FORMAT_NOTE); m_report.println(Messages.get().container(Messages.RPT_MERGE_PAGES_END_0), I_CmsReport.FORMAT_HEADLINE);
report.println(Messages.get().container(Messages.RPT_UPDATEXML_BEGIN_UPDATE_0), I_CmsReport.FORMAT_NOTE); report.println(Messages.get().container(Messages.RPT_UPDATEXML_PARAMETERS_0), I_CmsReport.FORMAT_HEADLINE); report.println( Messages.get().container(Messages.RPT_UPDATEXML_PARAMETERS_RESOURCE_PATH_1, resourcePath), I_CmsReport.FORMAT_NOTE); report.println( Messages.get().container( Messages.RPT_UPDATEXML_PARAMETERS_INC_SUBFOLDERS_1, report.println(Messages.get().container(Messages.RPT_UPDATEXML_NO_VFS_FOLDER_0), I_CmsReport.FORMAT_ERROR); return; report.println(Messages.get().container(Messages.RPT_UPDATEXML_START_SEARCHING_0), I_CmsReport.FORMAT_HEADLINE); List<CmsResource> allFiles = null; try { } catch (CmsException e) { m_errorUpdate += 1; report.println(Messages.get().container(Messages.RPT_UPDATEXML_SEARCH_ERROR_0), I_CmsReport.FORMAT_ERROR); if (LOG.isErrorEnabled()) { LOG.error(e.getMessageContainer(), e); report.println(Messages.get().container(Messages.RPT_UPDATEXML_END_UPDATE_0), I_CmsReport.FORMAT_NOTE); return; report.println( Messages.get().container(Messages.RPT_UPDATEXML_FILES_TO_UPDATE_1, new Integer(nrOfFiles).toString()), I_CmsReport.FORMAT_NOTE);
/** * Writes statistical information to the report.<p> * * The method reports the total number of threads started * (equals to the number of indexed files), the number of returned * threads (equals to the number of successfully indexed files), * and the number of abandoned threads (hanging threads reaching the timeout). * * @param report the report to write the statistics to */ public void reportStatistics(I_CmsReport report) { if (report != null) { CmsMessageContainer message = Messages.get().container( Messages.RPT_SEARCH_INDEXING_STATS_4, new Object[] { new Integer(m_startedCounter), new Integer(m_returnedCounter), new Integer(m_abandonedCounter), report.formatRuntime()}); report.println(message); if (!(report instanceof CmsLogReport) && LOG.isInfoEnabled()) { // only write to the log if report is not already a log report LOG.info(message.key()); } } }
/** * Reads the content as byte array of the given resource and prints a message to the report.<p> * * @param report the report * @param counter the counter * @param resCount the total resource count * @param resource the file to get the content for */ private void report(I_CmsReport report, int counter, int resCount, CmsResource resource) { // report entries report.print( org.opencms.report.Messages.get().container( org.opencms.report.Messages.RPT_SUCCESSION_2, String.valueOf(counter), String.valueOf(resCount)), I_CmsReport.FORMAT_NOTE); report.print( org.opencms.report.Messages.get().container( org.opencms.report.Messages.RPT_ARGUMENT_1, report.removeSiteRoot(resource.getRootPath()))); report.print( org.opencms.report.Messages.get().container(org.opencms.report.Messages.RPT_DOTS_0), I_CmsReport.FORMAT_DEFAULT); }
/** * @see org.opencms.report.A_CmsReport#addError(java.lang.Object) */ @Override public void addError(Object obj) { if (!m_busy && (m_report != null)) { m_report.addError(obj); } m_busy = true; super.addError(obj); m_busy = false; }
/** * @see I_CmsReport#printMessageWithParam(CmsMessageContainer, Object) */ @Override public void printMessageWithParam(final CmsMessageContainer container, final Object param) { for (I_CmsReport report : m_delegates) { report.printMessageWithParam(container, param); } }
/** * @see I_CmsReport#resetRuntime() */ @Override public void resetRuntime() { for (I_CmsReport report : m_delegates) { report.resetRuntime(); } }
} catch (CmsException e) { if (report != null) { report.println(e); report.println(e); report.println(e); report.print(org.opencms.report.Messages.get().container(org.opencms.report.Messages.RPT_STAT_0)); report.println(org.opencms.report.Messages.get().container( org.opencms.report.Messages.RPT_STAT_DURATION_1, report.formatRuntime())); report.println(Messages.get().container(Messages.RPT_STATICEXPORT_END_0), I_CmsReport.FORMAT_HEADLINE);
/** * Determine if this file is to be excluded.<p> * * @param file the file to check * * @return <code>true</code> if the file should be excluded from synchronization */ private boolean isExcluded(File file) { ArrayList<Pattern> excludes = OpenCms.getWorkplaceManager().getSynchronizeExcludePatterns(); for (Pattern pattern : excludes) { if (pattern.matcher(file.getName()).find()) { m_report.print( org.opencms.report.Messages.get().container( org.opencms.report.Messages.RPT_SUCCESSION_1, String.valueOf(m_count++)), I_CmsReport.FORMAT_NOTE); m_report.print(Messages.get().container(Messages.RPT_EXCLUDING_0), I_CmsReport.FORMAT_NOTE); m_report.println( org.opencms.report.Messages.get().container( org.opencms.report.Messages.RPT_ARGUMENT_1, file.getAbsolutePath().replace("\\", "/"))); return true; } } return false; }
report.print( org.opencms.report.Messages.get().container( org.opencms.report.Messages.RPT_SUCCESSION_1, String.valueOf(count)), I_CmsReport.FORMAT_NOTE); report.print(Messages.get().container(Messages.RPT_SEARCH_INDEXING_FILE_BEGIN_0), I_CmsReport.FORMAT_NOTE); report.print( org.opencms.report.Messages.get().container( org.opencms.report.Messages.RPT_ARGUMENT_1, report.removeSiteRoot(res.getRootPath()))); report.print( org.opencms.report.Messages.get().container(org.opencms.report.Messages.RPT_DOTS_0), I_CmsReport.FORMAT_DEFAULT); report.println( org.opencms.report.Messages.get().container(org.opencms.report.Messages.RPT_SKIPPED_0), I_CmsReport.FORMAT_NOTE); m_report.println( org.opencms.report.Messages.get().container(org.opencms.report.Messages.RPT_OK_0), I_CmsReport.FORMAT_OK);
/** * Writes statistical information to the report.<p> * * The method reports the total number of threads started * (equals to the number of indexed files), the number of returned * threads (equals to the number of successfully indexed files), * and the number of abandoned threads (hanging threads reaching the timeout). * * @param report the report to write the statistics to */ public void reportStatistics(I_CmsReport report) { if (report != null) { CmsMessageContainer message = Messages.get().container( Messages.RPT_SEARCH_INDEXING_STATS_4, new Object[] { new Integer(m_startedCounter), new Integer(m_returnedCounter), new Integer(m_abandonedCounter), report.formatRuntime()}); report.println(message); if (!(report instanceof CmsLogReport) && LOG.isInfoEnabled()) { // only write to the log if report is not already a log report LOG.info(message.key()); } } } }
/** * Reads the content as byte array of the given resource and prints a message to the report.<p> * * @param report the report * @param counter the counter * @param resCount the total resource count * @param resource the file to get the content for */ private void report(I_CmsReport report, int counter, int resCount, CmsResource resource) { // report entries report.print( org.opencms.report.Messages.get().container( org.opencms.report.Messages.RPT_SUCCESSION_2, String.valueOf(counter), String.valueOf(resCount)), I_CmsReport.FORMAT_NOTE); report.print( org.opencms.report.Messages.get().container( org.opencms.report.Messages.RPT_ARGUMENT_1, report.removeSiteRoot(resource.getRootPath()))); report.print( org.opencms.report.Messages.get().container(org.opencms.report.Messages.RPT_DOTS_0), I_CmsReport.FORMAT_DEFAULT); }