Class ReportUtils


  • public final class ReportUtils
    extends Object
    ReportUtils provides utility methods for building report.
    • Method Detail

      • buildHTMLDivWithKeyAndOptionalValueEntry

        public static String buildHTMLDivWithKeyAndOptionalValueEntry​(HTMLIndent indent,
                                                                      String key,
                                                                      String value)
        Returns HTML formatted Div Block.

        Skips HTML Div Creation if key is missing and returns empty string. Intentionally fail silently by returning empty string and not throw error in order to ensure entire report is not impacted because of a missing attribute.

        Parameters:
        indent - spacing related styling.
        key - key attribute in the div.
        value - value attribute in the div.
      • buildHTMLDivWithKeyValueEntry

        public static String buildHTMLDivWithKeyValueEntry​(HTMLIndent indent,
                                                           String key,
                                                           String value)
        Returns HTML formatted Div Block.

        Skips HTML Div Creation if value is missing and returns empty string. We are intentionally failing silently by returning empty string and not throwing error as we do not want to affect entire report because of a missing attribute.

        Parameters:
        indent - spacing related styling.
        key - key attribute in the div.
        value - value attribute in the div.
      • getDateFromInstant

        public static String getDateFromInstant​(Instant instant)
        Extracts Date from Instant.
        Parameters:
        instant - instantaneous point on the time-line.