/** * @see org.opencms.notification.A_CmsNotification#generateHtmlMsg() */ @Override protected String generateHtmlMsg() { StringBuffer buffer = new StringBuffer(); CmsMessages messages = Messages.get().getBundle(getLocale()); // add warnings to the notification if (m_report.hasWarning()) { buffer.append("<b>"); buffer.append(messages.key(Messages.GUI_PUBLISH_WARNING_HEADER_0)); buffer.append("</b><br/>\n"); appendList(buffer, m_report.getWarnings()); buffer.append("<br/>\n"); } // add errors to the notification if (m_report.hasError()) { buffer.append("<b>"); buffer.append(messages.key(Messages.GUI_PUBLISH_ERROR_HEADER_0)); buffer.append("</b><br/>\n"); appendList(buffer, m_report.getErrors()); buffer.append("<br/>\n"); } return buffer.toString(); }
CmsUser user = cms.readUser(userName); CmsPublishNotification notification = new CmsPublishNotification(cms, user, report); notification.addMacro("jobStart", df.format(jobStart)); notification.send(); } catch (Exception e) { LOG.error(Messages.get().getBundle().key(Messages.LOG_PUBLISH_SEND_NOTIFICATION_FAILED_0), e);
/** * @see org.opencms.notification.A_CmsNotification#generateHtmlMsg() */ @Override protected String generateHtmlMsg() { StringBuffer buffer = new StringBuffer(); // add warnings to the notification if (m_report.hasWarning()) { buffer.append("<b>"); buffer.append(Messages.get().getBundle().key(Messages.GUI_PUBLISH_WARNING_HEADER_0)); buffer.append("</b><br/>\n"); appendList(buffer, m_report.getWarnings()); buffer.append("<br/>\n"); } // add errors to the notification if (m_report.hasError()) { buffer.append("<b>"); buffer.append(Messages.get().getBundle().key(Messages.GUI_PUBLISH_ERROR_HEADER_0)); buffer.append("</b><br/>\n"); appendList(buffer, m_report.getErrors()); buffer.append("<br/>\n"); } return buffer.toString(); }
CmsUser user = cms.readUser(userName); CmsPublishNotification notification = new CmsPublishNotification(cms, user, report); notification.addMacro("jobStart", df.format(jobStart)); notification.send(); } catch (Exception e) { LOG.error(Messages.get().getBundle().key(Messages.LOG_PUBLISH_SEND_NOTIFICATION_FAILED_0), e);
CmsUser user = cms.readUser(userName); CmsPublishNotification notification = new CmsPublishNotification(cms, user, report); notification.addMacro("jobStart", df.format(jobStart)); notification.send(); } catch (Exception e) { LOG.error(Messages.get().getBundle().key(Messages.LOG_PUBLISH_SEND_NOTIFICATION_FAILED_0), e);
CmsUser user = cms.readUser(userName); CmsPublishNotification notification = new CmsPublishNotification(cms, user, report); notification.addMacro("jobStart", df.format(jobStart)); notification.send(); } catch (Exception e) { LOG.error(Messages.get().getBundle().key(Messages.LOG_PUBLISH_SEND_NOTIFICATION_FAILED_0), e);