Class ProblemDetails


  • public class ProblemDetails
    extends Object
    The ProblemDetails class holds the information for a Problem Details Object as defined in RFC 7807.

    It contains a number of additional members, beyond those defined by the specification, which hold information related to validation errors and support debugging.

    Author:
    Marcus Portmann
    • Constructor Detail

      • ProblemDetails

        public ProblemDetails()
        Constructs a new ProblemDetails.
    • Method Detail

      • getDetail

        public String getDetail()
        Returns the human-readable explanation specific to this occurrence of the problem.
        Returns:
        the human-readable explanation specific to this occurrence of the problem
      • getParameter

        public String getParameter()
        Returns the optional name of the parameter associated with the problem.
        Returns:
        the optional name of the parameter associated with the problem
      • getStackTrace

        public String getStackTrace()
        Returns the optional stack trace generated by the origin server for the problem.
        Returns:
        the optional stack trace generated by the origin server for the problem
      • getStatus

        public int getStatus()
        Returns the HTTP status code generated by the origin server for this occurrence of the problem.
        Returns:
        the HTTP status code generated by the origin server for this occurrence of the problem
      • getTimestamp

        public LocalDateTime getTimestamp()
        Returns the date and time the problem occurred.
        Returns:
        the date and time the problem occurred
      • getTitle

        public String getTitle()
        Returns the short, human-readable summary of the problem type.
        Returns:
        the short, human-readable summary of the problem type
      • getType

        public String getType()
        Returns the URI reference that identifies the problem type.
        Returns:
        the URI reference that identifies the problem type
      • getValidationErrors

        public List<ValidationError> getValidationErrors()
        Returns the optional validation errors associated with the problem.
        Returns:
        the optional validation errors associated with the problem
      • setDetail

        public void setDetail​(String detail)
        Set the human-readable explanation specific to this occurrence of the problem.
        Parameters:
        detail - the human-readable explanation specific to this occurrence of the problem
      • setParameter

        public void setParameter​(String parameter)
        Set the name of the parameter associated with the problem.
        Parameters:
        parameter - the name of the parameter associated with the problem
      • setStackTrace

        public void setStackTrace​(String stackTrace)
        Set the stack trace generated by the origin server for the problem.
        Parameters:
        stackTrace - the stack trace generated by the origin server for the problem
      • setStatus

        public void setStatus​(int status)
        Set the HTTP status code generated by the origin server for this occurrence of the problem.
        Parameters:
        status - the HTTP status code generated by the origin server for this occurrence of the problem
      • setTimestamp

        public void setTimestamp​(LocalDateTime timestamp)
        Set the date and time the problem occurred.
        Parameters:
        timestamp - the date and time the problem occurred
      • setTitle

        public void setTitle​(String title)
        Set the short, human-readable summary of the problem type.
        Parameters:
        title - the short, human-readable summary of the problem type
      • setType

        public void setType​(String type)
        Set the URI reference that identifies the problem type.
        Parameters:
        type - the URI reference that identifies the problem type
      • setValidationErrors

        public void setValidationErrors​(List<ValidationError> validationErrors)
        Set the validation errors associated with the problem.
        Parameters:
        validationErrors - the validation errors associated with the problem