Class ReportUtils
- java.lang.Object
-
- io.jenkins.plugins.google.analyze.code.security.utils.ReportUtils
-
public final class ReportUtils extends Object
ReportUtils provides utility methods for building report.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
buildHTMLDivWithKeyAndOptionalValueEntry(HTMLIndent indent, String key, String value)
Returns HTML formatted Div Block.static String
buildHTMLDivWithKeyValueEntry(HTMLIndent indent, String key, String value)
Returns HTML formatted Div Block.static String
getDateFromInstant(Instant instant)
-
-
-
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.
-
-