Class OslcErrors.OslcErrorBuilder

    • Method Detail

      • description

        public 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.
        Parameters:
        description - the detailed error description.
        Returns:
        this builder.
      • remoteError

        public OslcErrors.OslcErrorBuilder remoteError​(ClientWebException exception)
        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

        public 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.

        If the exception is a ClientWebException that occurs while requesting a resource on a remote server, developer should rather use the remoteError(ClientWebException) method.

        Parameters:
        cause - the exception that occurred on server side.
        Returns:
        this builder.
      • build

        public OslcError build()
        Builds the OSLC Error resource.
        Returns:
        an OSLC Error resource.