com.atlassian.jira.rest.util.ResponseFactory |
Known Indirect Subclasses |
A component for building commonly used types of REST responses
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a "bad request" (400) HTTP reposne without caching.
| |||||||||||
Constructs CREATED response with cache control set to never
| |||||||||||
Creates an appropriate REST error response out of error collection.
| |||||||||||
Constructs "forbidden" (403) HTTP response without caching.
| |||||||||||
Given a list of errors generate a http response
| |||||||||||
Given a list of errors generate a http response
| |||||||||||
Constructs "no content" (204) HTTP response with cache control set to never
| |||||||||||
Constructs "not found" (404) HTTP response without caching.
| |||||||||||
Creates a response that tells the user they can't use a feature when they are not logged in
| |||||||||||
Constructs OK response with cache control set to never
| |||||||||||
Transforms a service result to "no content" (204) HTTP response with cache control set to never
if the result is valid, or error response is invalid.
| |||||||||||
Maps
ErrorCollection in an Either to a Response . | |||||||||||
Returns a proper error response if the outcome is invalid, or the outcome value otherwise.
|
Constructs a "bad request" (400) HTTP reposne without caching.
i18nKey | key of the i18n message which is included in the response. |
---|---|
args | arguments to be added to the internationalised message. |
Constructs CREATED response with cache control set to never
self | URI to the newly created entity |
---|---|
entity | object that will be sent in the response |
entity
Creates an appropriate REST error response out of error collection.
errorCollection | errors that will be sent back to the user and from which the HTTP response status will be figured out |
---|
Constructs "forbidden" (403) HTTP response without caching.
i18nKey | key of the i18n message which is included in the response. |
---|
Given a list of errors generate a http response
errors | generated |
---|
Given a list of errors generate a http response
errors | generated |
---|
Constructs "no content" (204) HTTP response with cache control set to never
Constructs "not found" (404) HTTP response without caching.
i18nKey | key of the i18n message which is included in the response. |
---|
Creates a response that tells the user they can't use a feature when they are not logged in
Constructs OK response with cache control set to never
entity | object that will be sent in the response |
---|
entity
Transforms a service result to "no content" (204) HTTP response with cache control set to never if the result is valid, or error response is invalid.
serviceResult | service result to validate |
---|
Maps ErrorCollection
in an Either
to a Response
.
either | either to map the left value in |
---|
Returns a proper error response if the outcome is invalid, or the outcome value otherwise.
outcome | service outcome |
---|