Class RestApiExceptionUtils


  • @Validated
    public abstract class RestApiExceptionUtils
    extends Object
    Some utilities.
    Author:
    Christian Bremer
    • Field Detail

      • TIMESTAMP_HEADER_NAME

        public static final String TIMESTAMP_HEADER_NAME
        The header name for the 'timestamp' attribute.
        See Also:
        Constant Field Values
      • TIMESTAMP_FORMATTER

        public static final DateTimeFormatter TIMESTAMP_FORMATTER
        The formatter of the timestamp value.
      • MESSAGE_HEADER_NAME

        public static final String MESSAGE_HEADER_NAME
        The header name for the 'message' attribute.
        See Also:
        Constant Field Values
      • CODE_HEADER_NAME

        public static final String CODE_HEADER_NAME
        The header name for the 'code' attribute.
        See Also:
        Constant Field Values
      • CLASS_HEADER_NAME

        public static final String CLASS_HEADER_NAME
        The header name for the 'class name' attribute.
        See Also:
        Constant Field Values
      • NO_ERROR_CODE_VALUE

        public static final String NO_ERROR_CODE_VALUE
        The default value of the 'code' attribute.
        See Also:
        Constant Field Values
      • NO_MESSAGE_VALUE

        public static final String NO_MESSAGE_VALUE
        The default value of the 'message' attribute.
        See Also:
        Constant Field Values
      • NO_CLASS_VALUE

        public static final String NO_CLASS_VALUE
        The default value of the 'class name attribute.
        See Also:
        Constant Field Values
    • Method Detail

      • parseHeaderValue

        @Nullable
        public static OffsetDateTime parseHeaderValue​(@Nullable
                                                      String value)
        Parse the 'timestamp' header value.
        Parameters:
        value - the 'timestamp' header value
        Returns:
        the timestamp