Class SummaryKeyValuePair

java.lang.Object
de.xima.fc.workflow.SummaryKeyValuePair
All Implemented Interfaces:
ISummaryKeyValuePair, Serializable

public final class SummaryKeyValuePair extends Object implements ISummaryKeyValuePair
Default POJO implementation of ISummaryKeyValuePair.
Since:
7.0.0
Author:
XIMA MEDIA GmbH
See Also:
  • Constructor Details

    • SummaryKeyValuePair

      public SummaryKeyValuePair(String displayKey, boolean displayKeyHtml, boolean displayKeyI18n, String displayKeyStyle, String displayValue, boolean displayValueHtml, boolean displayValueI18n, String displayValueStyle)
      Parameters:
      displayKey - The i18n key or plain text for the key.
      displayKeyHtml - Whether the key is interpreted as plain text or an HTML string.
      displayKeyI18n - Whether the key is plain text or an i18n key.
      displayKeyStyle - CSS styles for the key.
      displayValue - The i18n key or plain text for the value.
      displayValueHtml - Whether the value is interpreted as plain text or an HTML string.
      displayValueI18n - Whether the value is plain text or an i18n key.
      displayValueStyle - CSS styles for the value.
  • Method Details

    • getDisplayKey

      public String getDisplayKey()
      Specified by:
      getDisplayKey in interface ISummaryKeyValuePair
      Returns:
      The data to display in the key column of the table.
    • getDisplayValue

      public String getDisplayValue()
      Specified by:
      getDisplayValue in interface ISummaryKeyValuePair
      Returns:
      The data to display in the value column of the table.
    • isDisplayKeyI18n

      public boolean isDisplayKeyI18n()
      Specified by:
      isDisplayKeyI18n in interface ISummaryKeyValuePair
      Returns:
      Whether the key is an i18n key for a resource bundle, or literal text. If the former, the key is looked up in the custom resource bundle of the workflow element handler first, then in the built-in resource bundle of formcycle.
    • isDisplayKeyHtml

      public boolean isDisplayKeyHtml()
      Specified by:
      isDisplayKeyHtml in interface ISummaryKeyValuePair
      Returns:
      Whether the key contains HTML content. If true, the ISummaryKeyValuePair.getDisplayKey() will be inserted into the HTML without any post-processing. Otherwise, special characters are escaped for HTML.
    • isDisplayValueHtml

      public boolean isDisplayValueHtml()
      Specified by:
      isDisplayValueHtml in interface ISummaryKeyValuePair
      Returns:
      Whether the value contains HTML content. If true, the ISummaryKeyValuePair.getDisplayValue() will be inserted into the HTML without any post-processing. Otherwise, special characters are escaped for HTML.
    • isDisplayValueI18n

      public boolean isDisplayValueI18n()
      Specified by:
      isDisplayValueI18n in interface ISummaryKeyValuePair
      Returns:
      Whether the value is an i18n key for a resource bundle, or literal text. If the former, the key is looked up in the custom resource bundle of the workflow element handler first, then in the built-in resource bundle of formcycle.
    • getDisplayKeyStyle

      public String getDisplayKeyStyle()
      Specified by:
      getDisplayKeyStyle in interface ISummaryKeyValuePair
      Returns:
      Inline style for the key column of the table. Is specified in the TD HTML tag.
    • getDisplayKeyStyleClass

      public String getDisplayKeyStyleClass()
      Specified by:
      getDisplayKeyStyleClass in interface ISummaryKeyValuePair
      Returns:
      Style class for the key column of the table. Is specified in the TD HTML tag.
    • setDisplayKeyStyleClass

      public ISummaryKeyValuePair setDisplayKeyStyleClass(String styleClass)
      Parameters:
      styleClass - a style class for the key column
      Returns:
      the ISummaryKeyValuePair instance
    • getDisplayValueStyle

      public String getDisplayValueStyle()
      Specified by:
      getDisplayValueStyle in interface ISummaryKeyValuePair
      Returns:
      Inline style for the value column of the table. Is specified in the TD HTML tag.
    • setDisplayValueStyleClass

      public ISummaryKeyValuePair setDisplayValueStyleClass(String styleClass)
      Parameters:
      styleClass - a style class for the value column
      Returns:
      the ISummaryKeyValuePair instance
    • getDisplayValueStyleClass

      public String getDisplayValueStyleClass()
      Specified by:
      getDisplayValueStyleClass in interface ISummaryKeyValuePair
      Returns:
      Style class for the value column of the table. Is specified in the TD HTML tag.
    • with

      public static ISummaryKeyValuePair with(String key, Object value)
      Parameters:
      key - Localized text for the key.
      value - Localized text for the value.
      Returns:
      A new key value pair with the given text.
    • with

      public static ISummaryKeyValuePair with(String key, Object value, String keyStyle, String valueStyle)
      Parameters:
      key - Localized text for the key.
      value - Localized text for the value.
      keyStyle - CSS styles for the key.
      valueStyle - CSS styles for the value.
      Returns:
      A new key value pair with the given text.
    • with

      public static ISummaryKeyValuePair with(String key, Object value, boolean keyHtml, boolean valueHtml)
      Parameters:
      key - Localized text for the key.
      value - Localized text for the value.
      keyHtml - Whether the key is interpreted as plain text or a HTML string.
      valueHtml - Whether the value is interpreted as plain text or a HTML string.
      Returns:
      A new key value pair with the given text.
    • withI18nKey

      public static ISummaryKeyValuePair withI18nKey(String i18nKey, Object value)
      Parameters:
      i18nKey - I18n key for the key.
      value - Localized text for the value.
      Returns:
      A new key value pair with the given text.
    • withI18nKey

      public static ISummaryKeyValuePair withI18nKey(String i18nKey, Object value, String keyStyle, String valueStyle)
      Parameters:
      i18nKey - I18n key for the key.
      value - Localized text for the value.
      keyStyle - CSS styles for the key.
      valueStyle - CSS styles for the value.
      Returns:
      A new key value pair with the given text.
    • withI18nKey

      public static ISummaryKeyValuePair withI18nKey(String i18nKey, Object value, boolean keyHtml, boolean valueHtml)
      Parameters:
      i18nKey - I18n key for the key.
      value - Localized text for the value.
      keyHtml - Whether the key is interpreted as plain text or a HTML string.
      valueHtml - Whether the value is interpreted as plain text or a HTML string.
      Returns:
      A new key value pair with the given text.