Package com.sodius.oslc.core.model
Class OslcError.ServerErrorDetails
java.lang.Object
com.sodius.oslc.core.model.OslcError.ServerErrorDetails
- Enclosing class:
OslcError
Contains server side information for the associated Error resource, for computing an HTML description of the Error
and before serializing it as a response entity.
This class fields are not serialized along the OSLC Error in a response, so are not accessible from client side.
-
Method Summary
Modifier and TypeMethodDescriptiongetCause()Returns the cause of the Error resource creation.Returns a detailed error description, if any.Returns the detailed message of the error.org.slf4j.LoggerReturns the logger associated to the Error resource, if any.Returns the exception that was raised when making a request on a remote server, if any.voidSets the exception that occurred on server side and that made it not able to properly respond to an incoming request.voidsetDescription(String description) Sets a detailed error description, as a complement of the Error message, with possibly some steps for the user to resolve the problem.voidsetDetailedMessage(String detailedMessage) Sets the detailed message of the error.voidsetLogger(org.slf4j.Logger logger) Sets a logger for the framework to log this Error resource when serializing it as a response.voidsetRemoteError(Exception remoteError) Sets an exception that was raised when making a request on a remote server.
-
Method Details
-
getDescription
Returns a detailed error description, if any.- Returns:
- the detailed description,
nullif none.
-
setDescription
Sets a detailed error description, as a complement of the Error message, with possibly some steps for the user to resolve the problem.- Parameters:
description- the detailed error description.
-
getRemoteError
Returns the exception that was raised when making a request on a remote server, if any.- Returns:
- the exception that was raised when making a request on a remote server,
nullif none.
-
setRemoteError
Sets an exception that was raised when making a request on a remote server.- Parameters:
remoteError- the remote server error response as an exception.
-
getCause
Returns the cause of the Error resource creation.- Returns:
- the exception that caused the Error resource creation.
-
setCause
Sets the exception that occurred on server side and that made it not able to properly respond to an incoming request.- Parameters:
cause- the exception that occurred on server side.
-
getDetailedMessage
Returns the detailed message of the error. The result combines theerror identifier, theerror message, thedescriptionand information on the request and response, if any.- Returns:
- the detailed message,
nullif none. - Since:
- 4.0.0
-
setDetailedMessage
Sets the detailed message of the error.- Parameters:
detailedMessage- the detailed message- Since:
- 4.0.0
-
getLogger
public org.slf4j.Logger getLogger()Returns the logger associated to the Error resource, if any.- Returns:
- the logger associated to the Error resource,
nullif none.
-
setLogger
public void setLogger(org.slf4j.Logger logger) Sets a logger for the framework to log this Error resource when serializing it as a response.- Parameters:
logger- the logger.
-