org.opencms.workplace.list
Class CmsListMacroFormatter

java.lang.Object
  extended byorg.opencms.workplace.list.CmsListMacroFormatter
All Implemented Interfaces:
I_CmsListFormatter
Direct Known Subclasses:
CmsListDateMacroFormatter

public class CmsListMacroFormatter
extends java.lang.Object
implements I_CmsListFormatter

This list formatter uses the MessageFormat class for macro like formatting.

Since:
6.0.0
Version:
$Revision: 1.9 $
Author:
Michael Moossen

Constructor Summary
CmsListMacroFormatter(CmsMessageContainer mask)
          Default constructor that sets the mask to use.
 
Method Summary
 java.lang.String format(java.lang.Object data, java.util.Locale locale)
          Returns a formatted string for the specified data.
 CmsMessageContainer getMask()
          Returns the mask.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CmsListMacroFormatter

public CmsListMacroFormatter(CmsMessageContainer mask)
Default constructor that sets the mask to use.

Parameters:
mask - pattern for MessageFormat
Method Detail

format

public java.lang.String format(java.lang.Object data,
                               java.util.Locale locale)
Description copied from interface: I_CmsListFormatter
Returns a formatted string for the specified data.

Take care of null data.

Specified by:
format in interface I_CmsListFormatter
Parameters:
data - the data to format
locale - the locale for formatting
Returns:
formatted data
See Also:
I_CmsListFormatter.format(java.lang.Object, java.util.Locale)

getMask

public CmsMessageContainer getMask()
Returns the mask.

Returns:
the mask