@Override
    protected String generateHtmlMsg() {

        // set the messages
        m_messages = Messages.get().getBundle(getLocale());

        StringBuffer htmlMsg = new StringBuffer();
        htmlMsg.append("<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">");
        htmlMsg.append("<tr><td colspan=\"5\"><br/>");

        GregorianCalendar tomorrow = new GregorianCalendar(TimeZone.getDefault(), CmsLocaleManager.getDefaultLocale());
        tomorrow.add(Calendar.DAY_OF_YEAR, 1);
        List<CmsExtendedNotificationCause> outdatedResources = new ArrayList<CmsExtendedNotificationCause>();
        List<CmsExtendedNotificationCause> resourcesNextDay = new ArrayList<CmsExtendedNotificationCause>();
        List<CmsExtendedNotificationCause> resourcesNextWeek = new ArrayList<CmsExtendedNotificationCause>();

        // split all resources into three lists: the resources that expire, will be released or get outdated
        // within the next 24h, within the next week and the resources unchanged since a long time
        Iterator<CmsExtendedNotificationCause> notificationCauses = m_notificationCauses.iterator();
        while (notificationCauses.hasNext()) {
            CmsExtendedNotificationCause notificationCause = notificationCauses.next();
            if (notificationCause.getCause() == CmsExtendedNotificationCause.RESOURCE_OUTDATED) {
                outdatedResources.add(notificationCause);
            } else if (notificationCause.getDate().before(tomorrow.getTime())) {
                resourcesNextDay.add(notificationCause);
            } else {
                resourcesNextWeek.add(notificationCause);
            }
        }
        Collections.sort(resourcesNextDay);
        Collections.sort(resourcesNextWeek);
        Collections.sort(outdatedResources);
        appendResourceList(htmlMsg, resourcesNextDay, m_messages.key(Messages.GUI_WITHIN_NEXT_DAY_0));
        appendResourceList(htmlMsg, resourcesNextWeek, m_messages.key(Messages.GUI_WITHIN_NEXT_WEEK_0));
        appendResourceList(
            htmlMsg,
            outdatedResources,
            m_messages.key(
                Messages.GUI_FILES_NOT_UPDATED_1,
                String.valueOf(OpenCms.getSystemInfo().getNotificationTime())));

        htmlMsg.append("</td></tr></table>");
        String result = htmlMsg.toString();
        return result;
    }
@ Override protected String generateHtmlMsg ( ) { m_messages = Messages . get ( ) . getBundle ( getLocale ( ) ) ; StringBuffer htmlMsg = new StringBuffer ( ) ; htmlMsg . append ( "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">" ) ; htmlMsg . append ( "<tr><td colspan=\"5\"><br/>" ) ; GregorianCalendar tomorrow = new GregorianCalendar ( TimeZone . getDefault ( ) , CmsLocaleManager . getDefaultLocale ( ) ) ; tomorrow . add ( Calendar . DAY_OF_YEAR , 1 ) ; List < CmsExtendedNotificationCause > outdatedResources = new ArrayList < CmsExtendedNotificationCause > ( ) ; List < CmsExtendedNotificationCause > resourcesNextDay = new ArrayList < CmsExtendedNotificationCause > ( ) ; List < CmsExtendedNotificationCause > resourcesNextWeek = new ArrayList < CmsExtendedNotificationCause > ( ) ; Iterator < CmsExtendedNotificationCause > notificationCauses = m_notificationCauses . iterator ( ) ; while ( notificationCauses . hasNext ( ) ) { CmsExtendedNotificationCause notificationCause = notificationCauses . next ( ) ; if ( notificationCause . getCause ( ) == CmsExtendedNotificationCause . RESOURCE_OUTDATED ) { outdatedResources . add ( notificationCause ) ; } else if ( notificationCause . getDate ( ) . before ( tomorrow . getTime ( ) ) ) { resourcesNextDay . add ( notificationCause ) ; } else { resourcesNextWeek . add ( notificationCause ) ; } } Collections . sort ( resourcesNextDay ) ; Collections . sort ( resourcesNextWeek ) ; Collections . sort ( outdatedResources ) ; appendResourceList ( htmlMsg , resourcesNextDay , m_messages . key ( Messages . GUI_WITHIN_NEXT_DAY_0 ) ) ; appendResourceList ( htmlMsg , resourcesNextWeek , m_messages . key ( Messages . GUI_WITHIN_NEXT_WEEK_0 ) ) ; appendResourceList ( htmlMsg , outdatedResources , m_messages . key ( Messages . GUI_FILES_NOT_UPDATED_1 , String . valueOf ( OpenCms . getSystemInfo ( ) . getNotificationTime ( ) ) ) ) ; htmlMsg . append ( "</td></tr></table>" ) ; String result = htmlMsg . toString ( ) ; return result ; }
Creates the mail to be sent to the responsible user.<p>

@return the mail to be sent to the responsible user