Class ResourceMessageTemplate

  • All Implemented Interfaces:
    Serializable, Cloneable, DataSource, Template

    public class ResourceMessageTemplate
    extends AbstractTemplate
    A field template 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

      • ResourceMessageTemplate

        public ResourceMessageTemplate()
        Creates a new template.
    • Method Detail

      • 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.
      • setFormatKey

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

        public String getResourceIdentifier()
        Returns the resource class name.
        Returns:
        The resource class name.
      • setResourceIdentifier

        public void setResourceIdentifier​(String resourceClassName)
                                   throws MissingResourceException
        Sets the resource class name.
        Parameters:
        resourceClassName - the resource class name.
        Throws:
        MissingResourceException - if the resource is missing.
      • getNullValue

        public String getNullValue()
        Returns the string that represents a null value.
        Returns:
        The string that represents a null value.
      • setNullValue

        public void setNullValue​(String nullValue)
        Sets the string that represents a null value.
        Parameters:
        nullValue - the string that represents a null value.
      • getValue

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