Class ResourceMessageFormatFilter

  • All Implemented Interfaces:
    Serializable, Cloneable, DataSource

    public class ResourceMessageFormatFilter
    extends Object
    implements DataSource
    A filter that formats values from the datarow using a message format object. The message format string is looked up from a Resource-Bundle.
    Since:
    2006-01-24
    Author:
    Thomas Morgner
    See Also:
    Serialized Form
    • Constructor Detail

      • ResourceMessageFormatFilter

        public ResourceMessageFormatFilter()
        Default constructor.
    • Method Detail

      • getValue

        public Object getValue​(ExpressionRuntime runtime,
                               ReportElement element)
        Returns the current value for the data source.
        Specified by:
        getValue in interface DataSource
        Parameters:
        runtime - the expression runtime that is used to evaluate formulas and expressions when computing the value of this filter.
        element -
        Returns:
        the value.
      • setFormatKey

        public void setFormatKey​(String format)
        Defines the key that is used to lookup the format string used in the message format in the resource bundle.
        Parameters:
        format - a resourcebundle key for the message format lookup.
      • getFormatKey

        public String getFormatKey()
        Returns the key that is used to lookup the format string used in the message format in the resource bundle.
        Returns:
        the resource bundle key.
      • getNullString

        public String getNullString()
        Returns the replacement text that is used if one of the referenced message parameters is null.
        Returns:
        the replacement text for null-values.
      • setNullString

        public void setNullString​(String nullString)
        Defines the replacement text that is used if one of the referenced message parameters is null.
        Parameters:
        nullString - the replacement text for null-values.