|
spring-mobile-device | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.mobile.device.DeviceUtils
public class DeviceUtils
Static helper for accessing request-scoped Device values.
| Field Summary | |
|---|---|
static java.lang.String |
CURRENT_DEVICE_ATTRIBUTE
The name of the request attribute the current Device is indexed by. |
| Constructor Summary | |
|---|---|
DeviceUtils()
|
|
| Method Summary | |
|---|---|
static Device |
getCurrentDevice(javax.servlet.http.HttpServletRequest request)
Static utility method that extracts the current device from the web request. |
static Device |
getCurrentDevice(org.springframework.web.context.request.RequestAttributes attributes)
Static utility method that extracts the current device from the request attributes map. |
static Device |
getRequiredCurrentDevice(javax.servlet.http.HttpServletRequest request)
Static utility method that extracts the current device from the web request. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String CURRENT_DEVICE_ATTRIBUTE
| Constructor Detail |
|---|
public DeviceUtils()
| Method Detail |
|---|
public static Device getCurrentDevice(javax.servlet.http.HttpServletRequest request)
ServletRequest.getAttribute(String) lookup.
request - the servlet request
public static Device getRequiredCurrentDevice(javax.servlet.http.HttpServletRequest request)
ServletRequest.getAttribute(String) lookup.
Throws a runtime exception if the current device has not been resolved.
request - the servlet request
public static Device getCurrentDevice(org.springframework.web.context.request.RequestAttributes attributes)
ServletRequest.getAttribute(String) lookup.
attributes - the request attributes
|
spring-mobile-device | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||