Class OutputContent


  • public class OutputContent
    extends Object
    Content to display or print. This is a sequence of elements if they have different formats.
    • Constructor Detail

      • OutputContent

        public OutputContent()
    • Method Detail

      • outputFormat

        public OutputContent outputFormat​(OutputFormat outputFormat)
        outputFormat
        Parameters:
        outputFormat -
        Returns:
        the current OutputContent instance, allowing for method chaining
      • getOutputFormat

        public OutputFormat getOutputFormat()
        Get outputFormat
        Returns:
        outputFormat
      • setOutputFormat

        public void setOutputFormat​(OutputFormat outputFormat)
        outputFormat
        Parameters:
        outputFormat -
      • predefinedContent

        public OutputContent predefinedContent​(PredefinedContent predefinedContent)
        predefinedContent
        Parameters:
        predefinedContent -
        Returns:
        the current OutputContent instance, allowing for method chaining
      • getPredefinedContent

        public PredefinedContent getPredefinedContent()
        Get predefinedContent
        Returns:
        predefinedContent
      • setPredefinedContent

        public void setPredefinedContent​(PredefinedContent predefinedContent)
        predefinedContent
        Parameters:
        predefinedContent -
      • outputText

        public OutputContent outputText​(List<OutputText> outputText)
        Content of text message to display or print. Mandatory, if `OutputFormat` is Text, not allowed otherwise. One instance of `OutputText` per shared format.
        Parameters:
        outputText - Content of text message to display or print. Mandatory, if `OutputFormat` is Text, not allowed otherwise. One instance of `OutputText` per shared format.
        Returns:
        the current OutputContent instance, allowing for method chaining
      • getOutputText

        public List<OutputText> getOutputText()
        Content of text message to display or print. Mandatory, if `OutputFormat` is Text, not allowed otherwise. One instance of `OutputText` per shared format.
        Returns:
        outputText Content of text message to display or print. Mandatory, if `OutputFormat` is Text, not allowed otherwise. One instance of `OutputText` per shared format.
      • setOutputText

        public void setOutputText​(List<OutputText> outputText)
        Content of text message to display or print. Mandatory, if `OutputFormat` is Text, not allowed otherwise. One instance of `OutputText` per shared format.
        Parameters:
        outputText - Content of text message to display or print. Mandatory, if `OutputFormat` is Text, not allowed otherwise. One instance of `OutputText` per shared format.
      • outputXHTML

        public OutputContent outputXHTML​(byte[] outputXHTML)
        XHTML document body containing the message to display or print. Mandatory if `OutputFormat` is XHTML, not allowed otherwise.
        Parameters:
        outputXHTML - XHTML document body containing the message to display or print. Mandatory if `OutputFormat` is XHTML, not allowed otherwise.
        Returns:
        the current OutputContent instance, allowing for method chaining
      • getOutputXHTML

        public byte[] getOutputXHTML()
        XHTML document body containing the message to display or print. Mandatory if `OutputFormat` is XHTML, not allowed otherwise.
        Returns:
        outputXHTML XHTML document body containing the message to display or print. Mandatory if `OutputFormat` is XHTML, not allowed otherwise.
      • setOutputXHTML

        public void setOutputXHTML​(byte[] outputXHTML)
        XHTML document body containing the message to display or print. Mandatory if `OutputFormat` is XHTML, not allowed otherwise.
        Parameters:
        outputXHTML - XHTML document body containing the message to display or print. Mandatory if `OutputFormat` is XHTML, not allowed otherwise.
      • outputBarcode

        public OutputContent outputBarcode​(OutputBarcode outputBarcode)
        outputBarcode
        Parameters:
        outputBarcode -
        Returns:
        the current OutputContent instance, allowing for method chaining
      • getOutputBarcode

        public OutputBarcode getOutputBarcode()
        Get outputBarcode
        Returns:
        outputBarcode
      • setOutputBarcode

        public void setOutputBarcode​(OutputBarcode outputBarcode)
        outputBarcode
        Parameters:
        outputBarcode -
      • includeNullValues

        public OutputContent includeNullValues​(boolean includeNullValues)
        Configures whether null values are explicitly serialized in the JSON payload. Default is false.
      • isIncludeNullValues

        public boolean isIncludeNullValues()
        Returns whether null values are explicitly serialized in the JSON payload.
      • setIncludeNullValues

        public void setIncludeNullValues​(boolean includeNullValues)
        Sets whether null values should be explicitly serialized in the JSON payload. Default is false.
      • equals

        public boolean equals​(Object o)
        Return true if this OutputContent object is equal to o.
        Overrides:
        equals in class Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • getExplicitNulls

        public Map<String,​Object> getExplicitNulls()
        Returns a map of properties to be merged into the JSON payload as explicit null values.
      • fromJson

        public static OutputContent fromJson​(String jsonString)
                                      throws com.fasterxml.jackson.core.JsonProcessingException
        Create an instance of OutputContent given an JSON string
        Parameters:
        jsonString - JSON string
        Returns:
        An instance of OutputContent
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException - if the JSON string is invalid with respect to OutputContent
      • toJson

        public String toJson()
                      throws com.fasterxml.jackson.core.JsonProcessingException
        Convert an instance of OutputContent to an JSON string
        Returns:
        JSON string
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException