org.springframework.mobile.device.LiteDeviceResolver Java Examples

The following examples show how to use org.springframework.mobile.device.LiteDeviceResolver. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MockHttpUtil.java    From attic-rave with Apache License 2.0 5 votes vote down vote up
public static void setupRequestAsNonMobileUserAgent(MockHttpServletRequest mockHttpServletRequest) {
    mockHttpServletRequest.addHeader("User-Agent", "MSIE");         
    mockHttpServletRequest.setAttribute(DeviceUtils.CURRENT_DEVICE_ATTRIBUTE, new LiteDeviceResolver().resolveDevice(mockHttpServletRequest));
}
 
Example #2
Source File: ControllerUtilsTest.java    From attic-rave with Apache License 2.0 5 votes vote down vote up
@Before
public void setUp() {
    request = new MockHttpServletRequest();
    deviceResolver = new LiteDeviceResolver();
    user = new UserImpl();
    user.setDisplayName("Test");
}
 
Example #3
Source File: WallRideExpressionObjectFactory.java    From wallride with Apache License 2.0 4 votes vote down vote up
protected Devices createDevices(IExpressionContext context) {
	return new Devices(context, new LiteDeviceResolver());
}
 
Example #4
Source File: MockHttpUtil.java    From attic-rave with Apache License 2.0 4 votes vote down vote up
public static void setupRequestAsMobileUserAgent(MockHttpServletRequest mockHttpServletRequest) {        
    mockHttpServletRequest.addHeader("User-Agent", "Blackberry");         
    mockHttpServletRequest.setAttribute(DeviceUtils.CURRENT_DEVICE_ATTRIBUTE, new LiteDeviceResolver().resolveDevice(mockHttpServletRequest));
}