public static class OslcErrors.OslcErrorBuilder extends Object
OslcErrors.status(Response.Status, OslcErrors.ErrorId, String)
Modifier and Type | Method and Description |
---|---|
OslcError |
build()
Builds the OSLC Error resource.
|
OslcErrors.OslcErrorBuilder |
cause(Throwable cause)
Sets the exception that occurred on server side and that made it not able to properly respond to an incoming request.
|
OslcErrors.OslcErrorBuilder |
description(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.
|
OslcErrors.OslcErrorBuilder |
remoteError(ClientWebException exception)
Sets an exception that was raised when making a request on a remote server.
|
public OslcErrors.OslcErrorBuilder description(String description)
description
- the detailed error description.public OslcErrors.OslcErrorBuilder remoteError(ClientWebException exception)
exception
- the remote server error response as an exception.public OslcErrors.OslcErrorBuilder cause(Throwable cause)
If the exception is a ClientWebException
that occurs while requesting a resource on a remote server,
developer should rather use the remoteError(ClientWebException)
method.
cause
- the exception that occurred on server side.public OslcError build()