Package com.sodius.oslc.server
Class OslcErrors.OslcErrorBuilder
java.lang.Object
com.sodius.oslc.server.OslcErrors.OslcErrorBuilder
- Enclosing class:
OslcErrors
A class used to build OslcError resources.
- Since:
- 1.13.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the OSLC Error resource.Sets the exception that occurred on server side and that made it not able to properly respond to an incoming request.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.remoteError(ClientWebException exception) Sets an exception that was raised when making a request on a remote server.
-
Method Details
-
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.- Returns:
- this builder.
-
remoteError
Sets an exception that was raised when making a request on a remote server.- Parameters:
exception- the remote server error response as an exception.- Returns:
- this builder.
-
cause
Sets the exception that occurred on server side and that made it not able to properly respond to an incoming request.If the exception is a
ClientWebExceptionthat occurs while requesting a resource on a remote server, developer should rather use theremoteError(ClientWebException)method.- Parameters:
cause- the exception that occurred on server side.- Returns:
- this builder.
-
build
Builds the OSLC Error resource.- Returns:
- an OSLC Error resource.
-