@Component public class

Responder

extends Object
java.lang.Object
   ↳ com.atlassian.jira.rest.factory.Responder

Class Overview

Provides ways standard ways of creating a javax.ws.rs.core.Response.

Summary

Public Methods
Response.ResponseBuilder builder(Response.Status status)
Starts a response builder for a given status.
Response errors(ErrorCollection errors)
Converts an ErrorCollection to a javax.ws.rs.core.Response.
Response exception(Exception exception)
Creates a response about an exception.
Response restfulErrors(ErrorCollection errors)
Converts an ErrorCollection to a javax.ws.rs.core.Response.
Response successfulDelete()
Standard response for a successful DELETE request.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public Response.ResponseBuilder builder (Response.Status status)

Starts a response builder for a given status.

Parameters
status Initial status
Returns
  • Started builder

public Response errors (ErrorCollection errors)

Converts an ErrorCollection to a javax.ws.rs.core.Response.

Parameters
errors Errors to be converted
Returns
  • Response with the worst reason as the status and the errors as the entity

public Response exception (Exception exception)

Creates a response about an exception.

Parameters
exception Exception included in the response
Returns
  • Response with the exception

public Response restfulErrors (ErrorCollection errors)

Converts an ErrorCollection to a javax.ws.rs.core.Response.

Parameters
errors Errors to be converted
Returns
  • Response with the worst reason as the status and the errors as the entity

public Response successfulDelete ()

Standard response for a successful DELETE request.

Returns
  • Standard response.