Package com.sparc.knappsack.enums

Examples of com.sparc.knappsack.enums.ApplicationType


        }

        if (request != null && modelAndView != null && (!(modelAndView.getView() instanceof RedirectView) && !modelAndView.getViewName().startsWith("redirect:"))) {
            User user = userService.getUserFromSecurityContext();
            if (user != null) {
                ApplicationType deviceType = new UserAgentInfo(request.getHeader("User-Agent"), request.getHeader("Accept")).getApplicationType();
                // Get categories for side menu
                List<Category> categories = userService.getCategoriesForUser(user, deviceType, SortOrder.ASCENDING);
                List<MenuItem> categoryMenuItems = new ArrayList<MenuItem>();
                if (categories != null) {
                    for (Category category : categories) {
View Full Code Here


    /**
     * Method: getApplicationType()
     */
    @Test
    public void testGetApplicationType() throws Exception {
        ApplicationType applicationType = userAgentInfo.getApplicationType();
        assertTrue(ApplicationType.IPHONE.equals(applicationType));
    }
View Full Code Here

TOP

Related Classes of com.sparc.knappsack.enums.ApplicationType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.