Package com.sodius.oslc.core.model
Class OslcError.ServerErrorDetails
- java.lang.Object
-
- com.sodius.oslc.core.model.OslcError.ServerErrorDetails
-
- Enclosing class:
- OslcError
public static class OslcError.ServerErrorDetails extends Object
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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Throwable
getCause()
Returns the cause of the Error resource creation.String
getDescription()
Returns a detailed error description, if any.org.slf4j.Logger
getLogger()
Returns the logger associated to the Error resource, if any.Exception
getRemoteError()
Returns the exception that was raised when making a request on a remote server, if any.void
setCause(Throwable cause)
Sets the exception that occurred on server side and that made it not able to properly respond to an incoming request.void
setDescription(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.void
setLogger(org.slf4j.Logger logger)
Sets a logger for the framework to log this Error resource when serializing it as a response.void
setRemoteError(Exception remoteError)
Sets an exception that was raised when making a request on a remote server.
-
-
-
Method Detail
-
getDescription
public String getDescription()
Returns a detailed error description, if any.- Returns:
- the detailed description,
null
if none.
-
setDescription
public void setDescription(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.- Parameters:
description
- the detailed error description.
-
getRemoteError
public Exception 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,
null
if none.
-
setRemoteError
public void setRemoteError(Exception remoteError)
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
public Throwable getCause()
Returns the cause of the Error resource creation.- Returns:
- the exception that caused the Error resource creation.
-
setCause
public void setCause(Throwable cause)
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.
-
getLogger
public org.slf4j.Logger getLogger()
Returns the logger associated to the Error resource, if any.- Returns:
- the logger associated to the Error resource,
null
if 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.
-
-