Package org.hoteia.qalingo.core.web.servlet

Examples of org.hoteia.qalingo.core.web.servlet.ModelAndViewThemeDevice


  }
 
  @RequestMapping(value = FoUrls.FORGOTTEN_PASSWORD_URL, method = RequestMethod.POST)
  public ModelAndView forgottenPassword(final HttpServletRequest request, @Valid @ModelAttribute("forgottenPasswordForm") ForgottenPasswordForm forgottenPasswordForm,
      BindingResult result, ModelMap modelMap) throws Exception {
    ModelAndViewThemeDevice modelAndView = new ModelAndViewThemeDevice(getCurrentVelocityPath(request), FoUrls.FORGOTTEN_PASSWORD_SUCCESS_VELOCITY_PAGE);
        final RequestData requestData = requestUtil.getRequestData(request);
        final Locale locale = requestData.getLocale();
       
    if (result.hasErrors()) {
      return displayForgottenPassword(request, modelMap);
View Full Code Here


        return new ModelAndView(new RedirectView(urlRedirect));
  }
 
    @RequestMapping(value = FoUrls.CART_CREATE_ACCOUNT_URL, method = RequestMethod.GET)
    public ModelAndView displayCheckoutCreateAccount(final HttpServletRequest request, final Model model, @ModelAttribute(ModelConstants.FRONTOFFICE_CREATE_ACCOUNT_FORM) CreateAccountForm createAccountForm) throws Exception {
        ModelAndViewThemeDevice modelAndView = new ModelAndViewThemeDevice(getCurrentVelocityPath(request), FoUrls.CUSTOMER_CREATE_ACCOUNT.getVelocityPage());
        final RequestData requestData = requestUtil.getRequestData(request);
        // SANITY CHECK: Customer logged
        final Customer currentCustomer = requestData.getCustomer();
        if(currentCustomer != null){
            final String url = urlService.generateUrl(FoUrls.CART_DELIVERY, requestUtil.getRequestData(request));
            return new ModelAndView(new RedirectView(url));
        }
       
        final List<String> excludedPatterns = new ArrayList<String>();
        excludedPatterns.add(FoUrls.CUSTOMER_CREATE_ACCOUNT.getUrlWithoutWildcard());
        final String lastUrl = requestUtil.getLastRequestUrl(request, excludedPatterns, urlService.generateUrl(FoUrls.HOME, requestUtil.getRequestData(request)));
        modelAndView.addObject(ModelConstants.URL_BACK, lastUrl);
       
        modelAndView.addObject(ModelConstants.CHECKOUT_STEP, 2);
       
        return modelAndView;
    }
View Full Code Here

        return modelAndView;
  }
 
  @RequestMapping(value = FoUrls.RESET_PASSWORD_URL, method = RequestMethod.GET)
  public ModelAndView displayResetPassword(final HttpServletRequest request, ModelMap modelMap) throws Exception {
    ModelAndViewThemeDevice modelAndView = new ModelAndViewThemeDevice(getCurrentVelocityPath(request), FoUrls.RESET_PASSWORD.getVelocityPage());
        final RequestData requestData = requestUtil.getRequestData(request);
        final Locale locale = requestData.getLocale();

    String token = request.getParameter(RequestConstants.REQUEST_PARAMETER_PASSWORD_RESET_TOKEN);
    if (StringUtils.isEmpty(token)) {
View Full Code Here

  }
 
  @RequestMapping(value = FoUrls.RESET_PASSWORD_URL, method = RequestMethod.POST)
  public ModelAndView resetPassword(final HttpServletRequest request, @Valid @ModelAttribute("resetPasswordForm") ResetPasswordForm resetPasswordForm,
      BindingResult result, ModelMap modelMap) throws Exception {
    ModelAndViewThemeDevice modelAndView = new ModelAndViewThemeDevice(getCurrentVelocityPath(request), FoUrls.RESET_PASSWORD_SUCCESS_VELOCITY_PAGE);
        final RequestData requestData = requestUtil.getRequestData(request);
        final Locale locale = requestData.getLocale();
       
    if (result.hasErrors()) {
      return displayResetPassword(request, modelMap);
View Full Code Here

  @Resource(name="viewResolver")
  protected VelocityLayoutViewResolver viewResolver;

  @RequestMapping(FoUrls.XRDS_URL)
  public ModelAndView displayXRDS(final HttpServletRequest request, final HttpServletResponse response, final Model model) throws Exception {
    ModelAndViewThemeDevice modelAndView = new ModelAndViewThemeDevice(getCurrentVelocityPath(request), FoUrls.XRDS.getVelocityPage());
    String openIdCallBackURL = urlService.buildOpenIdCallBackUrl(requestUtil.getRequestData(request));
    String returnToURL = urlService.buildAbsoluteUrl(requestUtil.getRequestData(request), openIdCallBackURL);
   
    model.addAttribute("returnToURL", returnToURL);
   
View Full Code Here

@Controller("errorController")
public class ErrorController extends AbstractFrontofficeQalingoController {

  @RequestMapping(FoUrls.ERROR_500_URL)
  public ModelAndView error500(final HttpServletRequest request) throws Exception {
    ModelAndViewThemeDevice modelAndView = new ModelAndViewThemeDevice(getCurrentVelocityPath(request), FoUrls.ERROR_500.getVelocityPage());

        return modelAndView;
  }
View Full Code Here

        return modelAndView;
  }

    @RequestMapping(FoUrls.ERROR_400_URL)
    public ModelAndView error400(final HttpServletRequest request) throws Exception {
        ModelAndViewThemeDevice modelAndView = new ModelAndViewThemeDevice(getCurrentVelocityPath(request), FoUrls.ERROR_400.getVelocityPage());

        return modelAndView;
    }
View Full Code Here

        return modelAndView;
    }

    @RequestMapping(FoUrls.ERROR_403_URL)
    public ModelAndView error403(final HttpServletRequest request) throws Exception {
        ModelAndViewThemeDevice modelAndView = new ModelAndViewThemeDevice(getCurrentVelocityPath(request), FoUrls.ERROR_403.getVelocityPage());

        return modelAndView;
    }
View Full Code Here

        return modelAndView;
    }

    @RequestMapping(FoUrls.ERROR_404_URL)
    public ModelAndView error404(final HttpServletRequest request) throws Exception {
        ModelAndViewThemeDevice modelAndView = new ModelAndViewThemeDevice(getCurrentVelocityPath(request), FoUrls.ERROR_404.getVelocityPage());

        return modelAndView;
    }
View Full Code Here

  @Autowired
  protected CoreMessageSource coreMessageSource;

  @RequestMapping(FoUrls.VELOCITY_CACHE_URL)
  public ModelAndView flushCache(final HttpServletRequest request) throws Exception {
    ModelAndViewThemeDevice modelAndView = new ModelAndViewThemeDevice(getCurrentVelocityPath(request), FoUrls.VELOCITY_CACHE.getVelocityPage());

    viewResolver.clearCache();
   
    coreMessageSource.clearCache();
   
View Full Code Here

TOP

Related Classes of org.hoteia.qalingo.core.web.servlet.ModelAndViewThemeDevice

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.