Class TimestampFormat
- java.lang.Object
-
- hudson.plugins.timestamper.format.TimestampFormat
-
- Direct Known Subclasses:
ElapsedTimestampFormat
,EmptyTimestampFormat
,SystemTimestampFormat
public abstract class TimestampFormat extends Object implements Function<Timestamp,String>
Format for displaying time-stamps.- Author:
- Steven G. Brown
-
-
Constructor Summary
Constructors Constructor Description TimestampFormat()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract String
apply(Timestamp timestamp)
Format the given time-stamp as a string.abstract String
getPlainTextUrl()
Get the URL for displaying the plain text console and time-stamps in this format.void
markup(MarkupText text, Timestamp timestamp)
Format the given time-stamp and add it to the mark-up text.abstract void
validate()
Validates that the given timestamp format can be applied safely.
-
-
-
Method Detail
-
validate
public abstract void validate() throws FormatParseException, InvalidHtmlException
Validates that the given timestamp format can be applied safely.- Throws:
FormatParseException
- If the timestamp format cannot be parsedInvalidHtmlException
- If the timestamp format contains invalid HTML
-
markup
public void markup(MarkupText text, Timestamp timestamp)
Format the given time-stamp and add it to the mark-up text.- Parameters:
text
- the mark-up texttimestamp
- the time-stamp to format
-
getPlainTextUrl
public abstract String getPlainTextUrl()
Get the URL for displaying the plain text console and time-stamps in this format.- Returns:
- the plain text URL
-
-