Package org.hoteia.qalingo.core.domain

Examples of org.hoteia.qalingo.core.domain.User


        return user == null ? null : dozerBeanMapper.map(user, UserPojo.class);
    }

    @Transactional
    public void saveOrUpdate(final UserPojo userJsonPojo) throws Exception {
        User user = dozerBeanMapper.map(userJsonPojo, User.class);
        logger.info("Saving user {}", user);
        userService.saveOrUpdateUser(user);
    }
View Full Code Here


        PagedListHolder<UserViewBean> userViewBeanPagedListHolder = new PagedListHolder<UserViewBean>();
       
        final List<UserViewBean> userViewBeans = new ArrayList<UserViewBean>();
        for (Iterator<User> iterator = users.iterator(); iterator.hasNext();) {
            User userIt = (User) iterator.next();
            userViewBeans.add(backofficeViewBeanFactory.buildViewBeanUser(requestData, userIt));
        }
        userViewBeanPagedListHolder = new PagedListHolder<UserViewBean>(userViewBeans);
        userViewBeanPagedListHolder.setPageSize(Constants.PAGE_SIZE);
        request.getSession().setAttribute(sessionKey, userViewBeanPagedListHolder);
View Full Code Here

    @RequestMapping(value = BoUrls.PERSONAL_DETAILS_URL, method = RequestMethod.GET)
    public ModelAndView personalDetails(final HttpServletRequest request, final Model model) throws Exception {
        ModelAndViewThemeDevice modelAndView = new ModelAndViewThemeDevice(getCurrentVelocityPath(request), BoUrls.PERSONAL_DETAILS.getVelocityPage());
        final RequestData requestData = requestUtil.getRequestData(request);
        final User currentUser = requestData.getUser();
       
        // User is already set by the abstract

        Object[] params = {currentUser.getLastname() + " " + currentUser.getFirstname() + " (" + currentUser.getLogin() + ")"};
        overrideDefaultSeoPageTitleAndMainContentTitle(request, modelAndView,  BoUrls.PERSONAL_DETAILS.getKey(), params);

        List<String> excludedPatterns = new ArrayList<String>();
        excludedPatterns.add(BoUrls.PERSONAL_DETAILS_URL);
        excludedPatterns.add(BoUrls.PERSONAL_EDIT_URL);
View Full Code Here

   
    @RequestMapping(value = BoUrls.PERSONAL_EDIT_URL, method = RequestMethod.GET)
    public ModelAndView displayPersonalEdit(final HttpServletRequest request, final Model model, @ModelAttribute(ModelConstants.USER_FORM) UserForm userForm) throws Exception {
        ModelAndViewThemeDevice modelAndView = new ModelAndViewThemeDevice(getCurrentVelocityPath(request), BoUrls.PERSONAL_EDIT.getVelocityPage());
        final RequestData requestData = requestUtil.getRequestData(request);
        final User currentUser = requestData.getUser();
       
        // User is already set by the abstract

        Object[] params = {currentUser.getLastname() + " " + currentUser.getFirstname() + " (" + currentUser.getLogin() + ")"};
        overrideDefaultSeoPageTitleAndMainContentTitle(request, modelAndView,  BoUrls.PERSONAL_EDIT.getKey(), params);
       
        model.addAttribute(ModelConstants.URL_BACK, backofficeUrlService.generateUrl(BoUrls.PERSONAL_DETAILS, requestData, currentUser));

        return modelAndView;
View Full Code Here

        if (result.hasErrors()) {
            return displayPersonalEdit(request, model, userForm);
        }
       
        final String newEmail = userForm.getEmail();
        final User currentUser = requestUtil.getCurrentUser(request);
        final User checkUser = userService.getUserByLoginOrEmail(newEmail);
        if(checkUser != null
                && !currentUser.getEmail().equalsIgnoreCase(newEmail)) {
            final String forgottenPasswordUrl = backofficeUrlService.generateUrl(BoUrls.FORGOTTEN_PASSWORD, requestUtil.getRequestData(request));
            final Object[] objects = {forgottenPasswordUrl};
            result.rejectValue("email", "fo.user.error_form_create_account_account_already_exist", objects,"This email user account already exist! Go on this <a href=\"${0}\" alt=\"\">page</a> to get a new password.");
View Full Code Here

     *
     */
    @ModelAttribute(ModelConstants.USER_FORM)
    protected UserForm initUserForm(final HttpServletRequest request, final Model model) throws Exception {
        final RequestData requestData = requestUtil.getRequestData(request);
        final User currentUser = requestData.getUser();
        return backofficeFormFactory.buildUserForm(requestData, currentUser);
    }
View Full Code Here

    ModelAndViewThemeDevice modelAndView = new ModelAndViewThemeDevice(getCurrentVelocityPath(request), BoUrls.LOGIN.getVelocityPage());
        final RequestData requestData = requestUtil.getRequestData(request);
        final Locale locale = requestData.getLocale();
   
    // SANITY CHECK: User logged
    final User currentUser = requestUtil.getCurrentUser(request);
    if(currentUser != null){
      final String url =  backofficeUrlService.generateUrl(BoUrls.PERSONAL_DETAILS, requestUtil.getRequestData(request));
      return new ModelAndView(new RedirectView(url));
    }
   
View Full Code Here

           
            final MarketPlace currentMarketPlace = requestData.getMarketPlace();
            final Market currentMarket = requestData.getMarket();
            final MarketArea currentMarketArea = requestData.getMarketArea();
            final Localization currentLocalization = requestData.getMarketAreaLocalization();
            final User user = requestData.getUser();
            final Company company = requestData.getCompany();
           
            if(user != null){
                modelAndView.getModelMap().put(ModelConstants.AUTHENTICATED_USER_VIEW_BEAN, backofficeViewBeanFactory.buildViewBeanUser(requestData, user));
            }
View Full Code Here

        List<MenuViewBean> menuViewBeans = new ArrayList<MenuViewBean>();
        return menuViewBeans;
    }
   
    public List<MenuViewBean> buildListViewBeanMorePageMenu(final RequestData requestData) throws Exception {
        final User currentUser = requestData.getUser();
        final Locale locale = requestData.getLocale();
       
        final List<MenuViewBean> menuViewBeans = new ArrayList<MenuViewBean>();

        // TODO : denis : move this part in the global list menu java/vm
View Full Code Here

     *
     */
    public List<UserViewBean> buildListViewBeanUser(final RequestData requestData, final List<User> users) throws Exception {
        final List<UserViewBean> userViewBeans = new ArrayList<UserViewBean>();
        for (Iterator<User> iterator = users.iterator(); iterator.hasNext();) {
            User user = (User) iterator.next();
            userViewBeans.add(buildViewBeanUser(requestData, user));
        }
        return userViewBeans;
    }
View Full Code Here

TOP

Related Classes of org.hoteia.qalingo.core.domain.User

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.