public String format(Object data, Locale locale) {

        Map<CmsMessageContainer, String> cache = m_cache.get(locale);
        if (cache == null) {
            cache = new HashMap<CmsMessageContainer, String>();
            cache.put(m_userMessage, m_userMessage.key(locale));
            cache.put(m_projectMessage, m_projectMessage.key(locale));
            cache.put(m_localeMessage, m_localeMessage.key(locale));
            cache.put(m_rootSiteMessage, m_rootSiteMessage.key(locale));
            cache.put(m_requestedURIMessage, m_requestedURIMessage.key(locale));
            cache.put(m_remoteAddrMessage, m_remoteAddrMessage.key(locale));
            cache.put(m_encodingMessage, m_encodingMessage.key(locale));
            m_cache.put(locale, cache);
        }
        String userMessage = cache.get(m_userMessage);
        String projectMessage = cache.get(m_projectMessage);
        String localeMessage = cache.get(m_localeMessage);
        String rootSiteMessage = cache.get(m_rootSiteMessage);
        String requestedURIMessage = cache.get(m_requestedURIMessage);
        String remoteAddrMessage = cache.get(m_remoteAddrMessage);
        String encodingMessage = cache.get(m_encodingMessage);
        CmsContextInfo info = (CmsContextInfo)data;
        StringBuffer html = new StringBuffer(512);
        html.append("<table border='0' cellspacing='0' cellpadding='0'>\n");
        html.append("\t<tr>\n");
        html.append("\t\t<td width='150' align='right' class='listdetailhead'>\n");
        html.append("\t\t\t");
        html.append(userMessage);
        html.append("&nbsp;:&nbsp;\n");
        html.append("\t\t</td>\n");
        html.append("\t\t<td class='listdetailitem'>\n");
        html.append("\t\t\t");
        html.append(info.getUserName());
        html.append("\n");
        html.append("\t\t</td>\n");
        html.append("\t</tr>\n");
        html.append("\t<tr>\n");
        html.append("\t\t<td width='150' align='right' class='listdetailhead'>\n");
        html.append("\t\t\t");
        html.append(projectMessage);
        html.append("&nbsp;:&nbsp;\n");
        html.append("\t\t</td>\n");
        html.append("\t\t<td class='listdetailitem'>\n");
        html.append("\t\t\t");
        html.append(info.getProjectName());
        html.append("\n");
        html.append("\t\t</td>\n");
        html.append("\t</tr>\n");
        html.append("\t<tr>\n");
        html.append("\t\t<td width='150' align='right' class='listdetailhead'>\n");
        html.append("\t\t\t");
        html.append(localeMessage);
        html.append("&nbsp;:&nbsp;\n");
        html.append("\t\t</td>\n");
        html.append("\t\t<td class='listdetailitem'>\n");
        html.append("\t\t\t");
        html.append(info.getLocaleName());
        html.append("\n");
        html.append("\t\t</td>\n");
        html.append("\t</tr>\n");
        html.append("\t<tr>\n");
        html.append("\t\t<td width='150' align='right' class='listdetailhead'>\n");
        html.append("\t\t\t");
        html.append(rootSiteMessage);
        html.append("&nbsp;:&nbsp;\n");
        html.append("\t\t</td>\n");
        html.append("\t\t<td class='listdetailitem'>\n");
        html.append("\t\t\t");
        html.append(info.getSiteRoot());
        html.append("\n");
        html.append("\t\t</td>\n");
        html.append("\t</tr>\n");
        html.append("\t<tr>\n");
        html.append("\t\t<td width='150' align='right' class='listdetailhead'>\n");
        html.append("\t\t\t");
        html.append(requestedURIMessage);
        html.append("&nbsp;:&nbsp;\n");
        html.append("\t\t</td>\n");
        html.append("\t\t<td class='listdetailitem'>\n");
        html.append("\t\t\t");
        html.append(info.getRequestedUri());
        html.append("\n");
        html.append("\t\t</td>\n");
        html.append("\t</tr>\n");
        html.append("\t<tr>\n");
        html.append("\t\t<td width='150' align='right' class='listdetailhead'>\n");
        html.append("\t\t\t");
        html.append(remoteAddrMessage);
        html.append("&nbsp;:&nbsp;\n");
        html.append("\t\t</td>\n");
        html.append("\t\t<td class='listdetailitem'>\n");
        html.append("\t\t\t");
        html.append(info.getRemoteAddr());
        html.append("\n");
        html.append("\t\t</td>\n");
        html.append("\t</tr>\n");
        html.append("\t<tr>\n");
        html.append("\t\t<td width='150' align='right' class='listdetailhead'>\n");
        html.append("\t\t\t");
        html.append(encodingMessage);
        html.append("&nbsp;:&nbsp;\n");
        html.append("\t\t</td>\n");
        html.append("\t\t<td class='listdetailitem'>\n");
        html.append("\t\t\t");
        html.append(info.getEncoding());
        html.append("\n");
        html.append("\t\t</td>\n");
        html.append("\t</tr>\n");
        html.append("</table>\n");
        return html.toString();
    }
public String format ( Object data , Locale locale ) { Map < CmsMessageContainer , String > cache = m_cache . get ( locale ) ; if ( cache == null ) { cache = new HashMap < CmsMessageContainer , String > ( ) ; cache . put ( m_userMessage , m_userMessage . key ( locale ) ) ; cache . put ( m_projectMessage , m_projectMessage . key ( locale ) ) ; cache . put ( m_localeMessage , m_localeMessage . key ( locale ) ) ; cache . put ( m_rootSiteMessage , m_rootSiteMessage . key ( locale ) ) ; cache . put ( m_requestedURIMessage , m_requestedURIMessage . key ( locale ) ) ; cache . put ( m_remoteAddrMessage , m_remoteAddrMessage . key ( locale ) ) ; cache . put ( m_encodingMessage , m_encodingMessage . key ( locale ) ) ; m_cache . put ( locale , cache ) ; } String userMessage = cache . get ( m_userMessage ) ; String projectMessage = cache . get ( m_projectMessage ) ; String localeMessage = cache . get ( m_localeMessage ) ; String rootSiteMessage = cache . get ( m_rootSiteMessage ) ; String requestedURIMessage = cache . get ( m_requestedURIMessage ) ; String remoteAddrMessage = cache . get ( m_remoteAddrMessage ) ; String encodingMessage = cache . get ( m_encodingMessage ) ; CmsContextInfo info = ( CmsContextInfo ) data ; StringBuffer html = new StringBuffer ( 512 ) ; html . append ( "<table border='0' cellspacing='0' cellpadding='0'>\n" ) ; html . append ( "\t<tr>\n" ) ; html . append ( "\t\t<td width='150' align='right' class='listdetailhead'>\n" ) ; html . append ( "\t\t\t" ) ; html . append ( userMessage ) ; html . append ( "&nbsp;:&nbsp;\n" ) ; html . append ( "\t\t</td>\n" ) ; html . append ( "\t\t<td class='listdetailitem'>\n" ) ; html . append ( "\t\t\t" ) ; html . append ( info . getUserName ( ) ) ; html . append ( "\n" ) ; html . append ( "\t\t</td>\n" ) ; html . append ( "\t</tr>\n" ) ; html . append ( "\t<tr>\n" ) ; html . append ( "\t\t<td width='150' align='right' class='listdetailhead'>\n" ) ; html . append ( "\t\t\t" ) ; html . append ( projectMessage ) ; html . append ( "&nbsp;:&nbsp;\n" ) ; html . append ( "\t\t</td>\n" ) ; html . append ( "\t\t<td class='listdetailitem'>\n" ) ; html . append ( "\t\t\t" ) ; html . append ( info . getProjectName ( ) ) ; html . append ( "\n" ) ; html . append ( "\t\t</td>\n" ) ; html . append ( "\t</tr>\n" ) ; html . append ( "\t<tr>\n" ) ; html . append ( "\t\t<td width='150' align='right' class='listdetailhead'>\n" ) ; html . append ( "\t\t\t" ) ; html . append ( localeMessage ) ; html . append ( "&nbsp;:&nbsp;\n" ) ; html . append ( "\t\t</td>\n" ) ; html . append ( "\t\t<td class='listdetailitem'>\n" ) ; html . append ( "\t\t\t" ) ; html . append ( info . getLocaleName ( ) ) ; html . append ( "\n" ) ; html . append ( "\t\t</td>\n" ) ; html . append ( "\t</tr>\n" ) ; html . append ( "\t<tr>\n" ) ; html . append ( "\t\t<td width='150' align='right' class='listdetailhead'>\n" ) ; html . append ( "\t\t\t" ) ; html . append ( rootSiteMessage ) ; html . append ( "&nbsp;:&nbsp;\n" ) ; html . append ( "\t\t</td>\n" ) ; html . append ( "\t\t<td class='listdetailitem'>\n" ) ; html . append ( "\t\t\t" ) ; html . append ( info . getSiteRoot ( ) ) ; html . append ( "\n" ) ; html . append ( "\t\t</td>\n" ) ; html . append ( "\t</tr>\n" ) ; html . append ( "\t<tr>\n" ) ; html . append ( "\t\t<td width='150' align='right' class='listdetailhead'>\n" ) ; html . append ( "\t\t\t" ) ; html . append ( requestedURIMessage ) ; html . append ( "&nbsp;:&nbsp;\n" ) ; html . append ( "\t\t</td>\n" ) ; html . append ( "\t\t<td class='listdetailitem'>\n" ) ; html . append ( "\t\t\t" ) ; html . append ( info . getRequestedUri ( ) ) ; html . append ( "\n" ) ; html . append ( "\t\t</td>\n" ) ; html . append ( "\t</tr>\n" ) ; html . append ( "\t<tr>\n" ) ; html . append ( "\t\t<td width='150' align='right' class='listdetailhead'>\n" ) ; html . append ( "\t\t\t" ) ; html . append ( remoteAddrMessage ) ; html . append ( "&nbsp;:&nbsp;\n" ) ; html . append ( "\t\t</td>\n" ) ; html . append ( "\t\t<td class='listdetailitem'>\n" ) ; html . append ( "\t\t\t" ) ; html . append ( info . getRemoteAddr ( ) ) ; html . append ( "\n" ) ; html . append ( "\t\t</td>\n" ) ; html . append ( "\t</tr>\n" ) ; html . append ( "\t<tr>\n" ) ; html . append ( "\t\t<td width='150' align='right' class='listdetailhead'>\n" ) ; html . append ( "\t\t\t" ) ; html . append ( encodingMessage ) ; html . append ( "&nbsp;:&nbsp;\n" ) ; html . append ( "\t\t</td>\n" ) ; html . append ( "\t\t<td class='listdetailitem'>\n" ) ; html . append ( "\t\t\t" ) ; html . append ( info . getEncoding ( ) ) ; html . append ( "\n" ) ; html . append ( "\t\t</td>\n" ) ; html . append ( "\t</tr>\n" ) ; html . append ( "</table>\n" ) ; return html . toString ( ) ; }
@see org.opencms.workplace.list.I_CmsListFormatter#format(java.lang.Object, java.util.Locale)