@Component public class JAXRSContextImpl extends Object implements DvalinRSContext
| Constructor and Description |
|---|
JAXRSContextImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
assertLoggedIn()
assert that the current request is logged in.
|
String |
getCurrentURI() |
String |
getCurrentURIEncoded() |
IUser |
getCurrentUser() |
String |
getFirstHeader(String name) |
javax.servlet.http.HttpServletRequest |
getHttpServletRequest() |
javax.servlet.http.HttpServletResponse |
getHttpServletResponse() |
org.apache.cxf.jaxrs.ext.MessageContext |
getMessageContext() |
String |
getRemoteAddress() |
UUID |
getRequestId() |
javax.ws.rs.core.SecurityContext |
getSC() |
String |
getServerURL() |
boolean |
hasRole(String role) |
boolean |
isLoggedIn() |
void |
redirect(String uriString)
redirect the caller to the given URI
|
void |
redirectPath(String path)
same as redirect(serverURL + path)
|
public javax.ws.rs.core.SecurityContext getSC()
getSC in interface DvalinRSContextSecurityContextpublic void assertLoggedIn()
DvalinRSContextassertLoggedIn in interface DvalinRSContextpublic IUser getCurrentUser()
getCurrentUser in interface DvalinRSContextpublic boolean hasRole(String role)
hasRole in interface DvalinRSContextrole - the role to checkpublic UUID getRequestId()
getRequestId in interface DvalinRSContextpublic boolean isLoggedIn()
isLoggedIn in interface DvalinRSContextpublic String getFirstHeader(String name)
getFirstHeader in interface DvalinRSContextname - the header to fetchpublic void redirectPath(String path)
DvalinRSContextredirectPath in interface DvalinRSContextpath - the path to redirect topublic String getServerURL()
getServerURL in interface DvalinRSContextpublic void redirect(String uriString)
DvalinRSContextredirect in interface DvalinRSContexturiString - the target URIpublic String getCurrentURIEncoded()
getCurrentURIEncoded in interface DvalinRSContextpublic String getCurrentURI()
getCurrentURI in interface DvalinRSContextpublic javax.servlet.http.HttpServletRequest getHttpServletRequest()
getHttpServletRequest in interface DvalinRSContextHttpServletRequest of the current requestpublic javax.servlet.http.HttpServletResponse getHttpServletResponse()
getHttpServletResponse in interface DvalinRSContextHttpServletResponse of the current requestpublic org.apache.cxf.jaxrs.ext.MessageContext getMessageContext()
getMessageContext in interface DvalinRSContextMessageContext of the current requestpublic String getRemoteAddress()
getRemoteAddress in interface DvalinRSContextCopyright © 2015–2018 Taimos GmbH. All rights reserved.