public class AbstractRestResource extends Object
Modifier and Type | Field and Description |
---|---|
protected JiraAuthenticationContext |
jiraAuthenticationContext |
protected org.apache.log4j.Logger |
log |
Modifier | Constructor and Description |
---|---|
protected |
AbstractRestResource(JiraAuthenticationContext jiraAuthenticationContext) |
Modifier and Type | Method and Description |
---|---|
protected javax.ws.rs.core.Response |
badRequest(String reasonKey) |
protected javax.ws.rs.core.Response |
badRequest(String reasonKey,
ErrorCollection errorCollection) |
protected javax.ws.rs.core.Response |
badRequest(String reasonKey,
String errorMessage) |
protected javax.ws.rs.core.Response |
created(Object result) |
protected javax.ws.rs.core.Response |
errorResponse(String reasonKey,
ErrorCollection errors) |
protected javax.ws.rs.core.Response |
forbiddenRequest(String reasonKey) |
protected javax.ws.rs.core.Response |
forbiddenRequest(String reasonKey,
ErrorCollection errorCollection) |
protected javax.ws.rs.core.Response |
forbiddenRequest(String reasonKey,
String errorMessage) |
protected ApplicationUser |
getLoggedInUser() |
protected String |
getText(String key,
Object... params)
i18n's text
|
protected boolean |
isAnonymousUser() |
protected javax.ws.rs.core.Response |
noContent() |
protected javax.ws.rs.core.Response |
notFoundRequest(String reasonKey) |
protected javax.ws.rs.core.Response |
notFoundRequest(String reasonKey,
ErrorCollection errorCollection) |
protected javax.ws.rs.core.Response |
notFoundRequest(String reasonKey,
String errorMessage) |
protected javax.ws.rs.core.Response |
notModified() |
protected javax.ws.rs.core.Response |
ok(Object result) |
protected javax.ws.rs.core.Response |
response(Callable<javax.ws.rs.core.Response> responseCallable)
Invokes the callable and returns the response but with extra logging support.
|
protected javax.ws.rs.core.Response |
unauthorizedRequest(String reasonKey) |
protected javax.ws.rs.core.Response |
unauthorizedRequest(String reasonKey,
ErrorCollection errorCollection) |
protected javax.ws.rs.core.Response |
unauthorizedRequest(String reasonKey,
String errorMessage) |
protected final org.apache.log4j.Logger log
protected final JiraAuthenticationContext jiraAuthenticationContext
protected AbstractRestResource(JiraAuthenticationContext jiraAuthenticationContext)
protected javax.ws.rs.core.Response response(Callable<javax.ws.rs.core.Response> responseCallable)
responseCallable
- the callable to invokeprotected boolean isAnonymousUser()
protected ApplicationUser getLoggedInUser()
protected javax.ws.rs.core.Response noContent()
protected javax.ws.rs.core.Response ok(Object result)
result
- the result object to send backprotected javax.ws.rs.core.Response created(Object result)
protected javax.ws.rs.core.Response notModified()
protected javax.ws.rs.core.Response errorResponse(String reasonKey, ErrorCollection errors)
protected javax.ws.rs.core.Response notFoundRequest(String reasonKey)
protected javax.ws.rs.core.Response notFoundRequest(String reasonKey, String errorMessage)
protected javax.ws.rs.core.Response notFoundRequest(String reasonKey, ErrorCollection errorCollection)
protected javax.ws.rs.core.Response forbiddenRequest(String reasonKey)
protected javax.ws.rs.core.Response forbiddenRequest(String reasonKey, String errorMessage)
protected javax.ws.rs.core.Response forbiddenRequest(String reasonKey, ErrorCollection errorCollection)
protected javax.ws.rs.core.Response unauthorizedRequest(String reasonKey)
protected javax.ws.rs.core.Response unauthorizedRequest(String reasonKey, String errorMessage)
protected javax.ws.rs.core.Response unauthorizedRequest(String reasonKey, ErrorCollection errorCollection)
protected javax.ws.rs.core.Response badRequest(String reasonKey)
protected javax.ws.rs.core.Response badRequest(String reasonKey, String errorMessage)
protected javax.ws.rs.core.Response badRequest(String reasonKey, ErrorCollection errorCollection)
Copyright © 2002-2022 Atlassian. All Rights Reserved.