Class LogViewHandlers
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final IntegerIf the number to display is not specified, this value will be used (40).static final charThis is the delimiter between the property name and property value.static final Stringstatic final intstatic final StringThis defines the full date format, used by DATE_FORMAT.static final StringThis defines the long date format, used by DATE_FORMAT.static final StringThis defines the medium date format, used by DATE_FORMAT.static final StringThis defines the short date format, used by DATE_FORMAT.static final Stringstatic final StringThis is the root directory of the alert imagesstatic final StringThe following constant defines the valid delimiters that can be used to seperate nvp entries on input.static final longstatic final StringThis model key is set by the filter method, it is true if a level image should be displayed.static final StringThis specifies how TIME fields are input and displayed.static final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static DateconvertDateTime(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx, Object date, Object time) This method converts a date/time string to a Date.protected static StringformatArrayForDisplay(String[] diag) This method formats the diagnostic to be displayed for HTML Add '
' to each elements of the ArrayList and returns the String.static StringformatDateForDisplay(Locale locale, Date date) This method formats a log file date to a more readable date (based on locale).voidgetDate(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx) This method returns the current date (as a String).static voidgetFirstLastRecord(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx) This handler returns the first and last log record.voidgetFormattedDateTime(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx) This method returns the formatted date (as a String).static voidgetLogQueryAttributes(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx) This handler creates a Map<String, String> which contains the QUERY_STRING parameters that should be passed to the REST logging endpoint to make a query with the given constraints.voidgetTime(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx) This method puts the current time (as a String) in the desired attribute.static voidprocessLogRecords(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx) This handler creates a Map<String, String> which contains the QUERY_STRING parameters that should be passed to the REST logging endpoint to make a query with the given constraints.
-
Field Details
-
GET_DATE_SHORT
This defines the short date format, used by DATE_FORMAT. ("short")- See Also:
-
GET_DATE_MEDIUM
This defines the medium date format, used by DATE_FORMAT. ("medium")- See Also:
-
GET_DATE_LONG
This defines the long date format, used by DATE_FORMAT. ("long")- See Also:
-
GET_DATE_FULL
This defines the full date format, used by DATE_FORMAT. ("full")- See Also:
-
TIME_FORMAT
This specifies how TIME fields are input and displayed. We need to do this in order to get a display/input that works with milliseconds. Perhaps in the future we may want to just append the milliseconds?- See Also:
-
TIME_FORMAT_2
- See Also:
-
TIME_FORMAT_3
- See Also:
-
DEFAULT_NUMBER_TO_DISPLAY
If the number to display is not specified, this value will be used (40). -
FIRST_LOG_ROW
- See Also:
-
FROM_RECORD
public static final int FROM_RECORD- See Also:
-
LAST_LOG_ROW
- See Also:
-
NVP_DELIMITERS
The following constant defines the valid delimiters that can be used to seperate nvp entries on input. (" \t\n\r\f,;:")- See Also:
-
EQUALS
public static final char EQUALSThis is the delimiter between the property name and property value.- See Also:
-
SHOW_LEVEL_IMAGE
This model key is set by the filter method, it is true if a level image should be displayed.- See Also:
-
LEVEL_IMAGE_ROOT
This is the root directory of the alert images- See Also:
-
ONE_HOUR
public static final long ONE_HOUR- See Also:
-
-
Constructor Details
-
LogViewHandlers
public LogViewHandlers()Creates a new instance of LogViewHandlers
-
-
Method Details
-
getLogQueryAttributes
public static void getLogQueryAttributes(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx) This handler creates a Map<String, String> which contains the QUERY_STRING parameters that should be passed to the REST logging endpoint to make a query with the given constraints.
- Parameters:
context- The HandlerContext.
-
processLogRecords
public static void processLogRecords(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx) This handler creates a Map<String, String> which contains the QUERY_STRING parameters that should be passed to the REST logging endpoint to make a query with the given constraints.
- Parameters:
context- The HandlerContext.
-
convertDateTime
protected static Date convertDateTime(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx, Object date, Object time) This method converts a date/time string to a Date.- Parameters:
date- The date as a String (or the date/time as a Date)time- The time as a String (or null)request- The ServletRequestvd- The ViewDescriptor (for exception handling)view- The View (for exception handling)
-
formatDateForDisplay
This method formats a log file date to a more readable date (based on locale). -
getFirstLastRecord
public static void getFirstLastRecord(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx) This handler returns the first and last log record.
Output value: "LogFileNames" -- Type:
java.util.SelectItem- Parameters:
context- The HandlerContext.
-
formatArrayForDisplay
This method formats the diagnostic to be displayed for HTML Add '
' to each elements of the ArrayList and returns the String. -
getTime
public void getTime(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx) This method puts the current time (as a String) in the desired attribute. The result attribute must be specified via an attribute named "getTimeResultAttribute"
-
getDate
public void getDate(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx) This method returns the current date (as a String). The DATE_FORMAT must be specified, if it is not this method will fail. You may set it to "short", "medium", "long", or "FULL".
If you do not set it to one of these values, you may set it to a valid format string.
-
getFormattedDateTime
public void getFormattedDateTime(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx) This method returns the formatted date (as a String).
-