Package org.bremersee.exception.model
Class RestApiException
- java.lang.Object
-
- org.bremersee.exception.model.RestApiException
-
- All Implemented Interfaces:
Serializable
@Validated public class RestApiException extends Object implements Serializable
The serialized exception.- Author:
- Christian Bremer
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description RestApiException(String id, OffsetDateTime timestamp, String message, String errorCode, Boolean errorCodeInherited, String className, String application, String path, Handler handler, List<StackTraceItem> stackTrace, RestApiException cause)
Instantiates a new rest api exception.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getApplication()
The name of the application.RestApiException
getCause()
Get cause.String
getClassName()
The class name of the exception.String
getErrorCode()
A service specific error code.Boolean
getErrorCodeInherited()
Is the error code inherited from the cause.Handler
getHandler()
Get handler.String
getId()
The id of the exception.String
getMessage()
A human readable exception message.String
getPath()
The request path.List<StackTraceItem>
getStackTrace()
The stack trace.OffsetDateTime
getTimestamp()
The timestamp.void
setApplication(String application)
Sets application.void
setCause(RestApiException cause)
Sets cause.void
setClassName(String className)
Sets class name.void
setErrorCode(String errorCode)
Sets error code.void
setErrorCodeInherited(Boolean errorCodeInherited)
Sets error code inherited.void
setHandler(Handler handler)
Sets handler.void
setId(String id)
Sets id.void
setMessage(String message)
Sets message.void
setPath(String path)
Sets path.void
setStackTrace(List<StackTraceItem> stackTrace)
Sets stack trace.void
setTimestamp(OffsetDateTime timestamp)
Sets timestamp.
-
-
-
Constructor Detail
-
RestApiException
public RestApiException(String id, OffsetDateTime timestamp, String message, String errorCode, Boolean errorCodeInherited, String className, String application, String path, Handler handler, List<StackTraceItem> stackTrace, RestApiException cause)
Instantiates a new rest api exception.- Parameters:
id
- the idtimestamp
- the timestampmessage
- the messageerrorCode
- the error codeerrorCodeInherited
- the error code inheritedclassName
- the class nameapplication
- the applicationpath
- the pathhandler
- the handlerstackTrace
- the stack tracecause
- the cause
-
-
Method Detail
-
getId
public String getId()
The id of the exception.- Returns:
- id id
-
setId
public void setId(String id)
Sets id.- Parameters:
id
- the id
-
getTimestamp
public OffsetDateTime getTimestamp()
The timestamp.- Returns:
- timestamp timestamp
-
setTimestamp
public void setTimestamp(OffsetDateTime timestamp)
Sets timestamp.- Parameters:
timestamp
- the timestamp
-
getMessage
public String getMessage()
A human readable exception message.- Returns:
- message message
-
setMessage
public void setMessage(String message)
Sets message.- Parameters:
message
- the message
-
getErrorCode
public String getErrorCode()
A service specific error code.- Returns:
- errorCode error code
-
setErrorCode
public void setErrorCode(String errorCode)
Sets error code.- Parameters:
errorCode
- the error code
-
getErrorCodeInherited
public Boolean getErrorCodeInherited()
Is the error code inherited from the cause.- Returns:
- errorCodeInherited error code inherited
-
setErrorCodeInherited
public void setErrorCodeInherited(Boolean errorCodeInherited)
Sets error code inherited.- Parameters:
errorCodeInherited
- the error code inherited
-
getClassName
public String getClassName()
The class name of the exception.- Returns:
- className class name
-
setClassName
public void setClassName(String className)
Sets class name.- Parameters:
className
- the class name
-
getApplication
public String getApplication()
The name of the application.- Returns:
- application application
-
setApplication
public void setApplication(String application)
Sets application.- Parameters:
application
- the application
-
getPath
public String getPath()
The request path.- Returns:
- path path
-
setPath
public void setPath(String path)
Sets path.- Parameters:
path
- the path
-
getHandler
public Handler getHandler()
Get handler.- Returns:
- handler handler
-
setHandler
public void setHandler(Handler handler)
Sets handler.- Parameters:
handler
- the handler
-
getStackTrace
public List<StackTraceItem> getStackTrace()
The stack trace.- Returns:
- stackTrace stack trace
-
setStackTrace
public void setStackTrace(List<StackTraceItem> stackTrace)
Sets stack trace.- Parameters:
stackTrace
- the stack trace
-
getCause
public RestApiException getCause()
Get cause.- Returns:
- cause cause
-
setCause
public void setCause(RestApiException cause)
Sets cause.- Parameters:
cause
- the cause
-
-