Package africa.absa.inception.api
Class ProblemDetails
- java.lang.Object
-
- africa.absa.inception.api.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 Summary
Constructors Constructor Description ProblemDetails()Constructs a new ProblemDetails.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetDetail()Returns the human-readable explanation specific to this occurrence of the problem.StringgetParameter()Returns the optional name of the parameter associated with the problem.StringgetStackTrace()Returns the optional stack trace generated by the origin server for the problem.intgetStatus()Returns the HTTP status code generated by the origin server for this occurrence of the problem.LocalDateTimegetTimestamp()Returns the date and time the problem occurred.StringgetTitle()Returns the short, human-readable summary of the problem type.StringgetType()Returns the URI reference that identifies the problem type.List<ValidationError>getValidationErrors()Returns the optional validation errors associated with the problem.voidsetDetail(String detail)Set the human-readable explanation specific to this occurrence of the problem.voidsetParameter(String parameter)Set the name of the parameter associated with the problem.voidsetStackTrace(String stackTrace)Set the stack trace generated by the origin server for the problem.voidsetStatus(int status)Set the HTTP status code generated by the origin server for this occurrence of the problem.voidsetTimestamp(LocalDateTime timestamp)Set the date and time the problem occurred.voidsetTitle(String title)Set the short, human-readable summary of the problem type.voidsetType(String type)Set the URI reference that identifies the problem type.voidsetValidationErrors(List<ValidationError> validationErrors)Set the validation errors associated with the problem.
-
-
-
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
-
-