Class RenderingUtils
- java.lang.Object
-
- com.trivago.cluecumber.engine.rendering.pages.renderering.RenderingUtils
-
public class RenderingUtils extends Object
-
-
Constructor Summary
Constructors Constructor Description RenderingUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static longconvertNanosecondsToMilliseconds(long nanoseconds)Convert nanoseconds to milliseconds.static StringconvertNanosecondsToTimeString(long nanoseconds)Convert nanoseconds to a human-readable time string.static ZonedDateTimeconvertTimestampToZonedDateTime(String timestampString)Return aZonedDateTimefrom a timestamp string.static StringconvertZonedDateTimeToDateString(ZonedDateTime startDateTime)static StringconvertZonedDateTimeToTimeString(ZonedDateTime startDateTime)static StringescapeHTML(String sourceString)Escape HTML tags in a string.static StringgetPluginVersion()Return the current Cluecumber version.static booleanisRelativeUrl(String value)static booleanisUrl(String value)static StringturnUrlsIntoLinks(String sourceString)Return the source html string with added tags so URLs are clickable.
-
-
-
Method Detail
-
convertNanosecondsToTimeString
public static String convertNanosecondsToTimeString(long nanoseconds)
Convert nanoseconds to a human-readable time string.- Parameters:
nanoseconds- The amount of nanoseconds.- Returns:
- The human-readable string representation.
-
convertNanosecondsToMilliseconds
public static long convertNanosecondsToMilliseconds(long nanoseconds)
Convert nanoseconds to milliseconds.- Parameters:
nanoseconds- The amount of nanoseconds.- Returns:
- The millisecond representation.
-
getPluginVersion
public static String getPluginVersion()
Return the current Cluecumber version.- Returns:
- The version string.
-
escapeHTML
public static String escapeHTML(String sourceString)
Escape HTML tags in a string.- Parameters:
sourceString- The source string.- Returns:
- The escaped string.
-
turnUrlsIntoLinks
public static String turnUrlsIntoLinks(String sourceString)
Return the source html string with added tags so URLs are clickable.- Parameters:
sourceString- The source string.- Returns:
- The string with additional anchor tags.
-
convertTimestampToZonedDateTime
public static ZonedDateTime convertTimestampToZonedDateTime(String timestampString)
Return aZonedDateTimefrom a timestamp string.- Parameters:
timestampString- the timestamp string.- Returns:
- the converted
ZonedDateTime.
-
convertZonedDateTimeToDateString
public static String convertZonedDateTimeToDateString(ZonedDateTime startDateTime)
-
convertZonedDateTimeToTimeString
public static String convertZonedDateTimeToTimeString(ZonedDateTime startDateTime)
-
isUrl
public static boolean isUrl(String value)
-
isRelativeUrl
public static boolean isRelativeUrl(String value)
-
-