Package com.sparc.knappsack.models

Examples of com.sparc.knappsack.models.ApplicationModel


    public String loadDetailPage(HttpServletRequest request, Model model,  @PathVariable Long id, UserAgentInfo userAgentInfo) {
        checkRequiredEntity(applicationService, id);
        User user = userService.getUserFromSecurityContext();
        Application application = applicationService.get(id);

        ApplicationModel applicationModel = applicationService.createApplicationModel(application, true);
        if (applicationModel != null) {
            applicationModel.setCanUserEdit(userService.canUserEditApplication(user, application));
        }
        model.addAttribute("selectedApplication", applicationModel);
        model.addAttribute("applicationType", applicationModel.getApplicationType().name());

        model.addAttribute("deviceType", userAgentInfo.getApplicationType());

        boolean iosDetected = false;
        if (userAgentInfo.detectIos()) {
View Full Code Here


    }

    @Test
    public void createApplicationModelTest() {
        Application application = getApplication();
        ApplicationModel applicationModel = applicationService.createApplicationModel(application.getId(), false);
        assertNotNull(applicationModel);
        assertTrue(applicationModel.getName().equals("Test Application"));
        assertTrue(applicationModel.getApplicationType().equals(application.getApplicationType()));
        assertTrue(applicationModel.getDescription().equals(application.getDescription()));
    }
View Full Code Here

    @Override
    public List<ApplicationModel> createApplicationModels(List<Application> applications, boolean mapScreenShots) {
        List<ApplicationModel> items = new ArrayList<ApplicationModel>();
        for (Application application : applications) {
            ApplicationModel item = createApplicationModel(application, mapScreenShots);
            if (item != null) {
                items.add(item);
            }
        }
View Full Code Here

        return createApplicationModel(applicationDao.get(applicationId), mapScreenShots);
    }

    @Override
    public ApplicationModel createApplicationModel(Application application, boolean mapScreenShots) {
        ApplicationModel model = null;
        if (application != null) {
            model = new ApplicationModel();
            mapApplicationToModel(application, model, mapScreenShots);
        }
        return model;
    }
View Full Code Here

TOP

Related Classes of com.sparc.knappsack.models.ApplicationModel

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.