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

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


@Controller("conditionsOfUseController")
public class ConditionsOfUseController extends AbstractMCommerceController {

  @RequestMapping(FoUrls.CONDITIONS_OF_USE_URL)
  public ModelAndView conditionsOfUse(final HttpServletRequest request, final HttpServletResponse response) throws Exception {
    ModelAndViewThemeDevice modelAndView = new ModelAndViewThemeDevice(getCurrentVelocityPath(request), FoUrls.CONDITIONS_OF_USE.getVelocityPage());
   
        overrideDefaultSeoPageTitleAndMainContentTitle(request, modelAndView, FoUrls.CONDITIONS_OF_USE.getKey());

        return modelAndView;
  }
View Full Code Here


  @Autowired
    protected OrderCustomerService orderCustomerService;
 
  @RequestMapping(FoUrls.PERSONAL_ORDER_LIST_URL)
  public ModelAndView customerWishList(final HttpServletRequest request, final Model model) throws Exception {
    ModelAndViewThemeDevice modelAndView = new ModelAndViewThemeDevice(getCurrentVelocityPath(request), FoUrls.PERSONAL_ORDER_LIST.getVelocityPage());
    final RequestData requestData = requestUtil.getRequestData(request);
        final Customer currentCustomer = requestData.getCustomer();
   
    // WE RELOAD THE CUSTOMER FOR THE PERSISTANCE PROXY FILTER
    // IT AVOIDS LazyInitializationException: could not initialize proxy - no Session
View Full Code Here

        return modelAndView;
  }

  @RequestMapping(FoUrls.PERSONAL_ORDER_DETAILS_URL)
  public ModelAndView removeFromWishlist(final HttpServletRequest request, final Model model) throws Exception {
    ModelAndViewThemeDevice modelAndView = new ModelAndViewThemeDevice(getCurrentVelocityPath(request), FoUrls.PERSONAL_ORDER_DETAILS.getVelocityPage());
    final RequestData requestData = requestUtil.getRequestData(request);
    final String orderCustomerId = request.getParameter(RequestConstants.REQUEST_PARAMETER_CUSTOMER_ORDER_GUID);
    if(StringUtils.isNotEmpty(orderCustomerId)){
      final OrderCustomer orderCustomer = orderCustomerService.getOrderById(orderCustomerId);
      if(orderCustomer != null){
View Full Code Here

  @Autowired
    protected RetailerService retailerService;
 
  @RequestMapping(FoUrls.STORE_LOCATION_URL)
  public ModelAndView storeLocation(final HttpServletRequest request, final HttpServletResponse response) throws Exception {
    ModelAndViewThemeDevice modelAndView = new ModelAndViewThemeDevice(getCurrentVelocityPath(request), FoUrls.STORE_LOCATION.getVelocityPage());
        final RequestData requestData = requestUtil.getRequestData(request);
        final Locale locale = requestData.getLocale();
       
        final List<Store> stores = retailerService.findStores();
    final List<StoreViewBean> storeViewBeans = frontofficeViewBeanFactory.buildListViewBeanStore(requestUtil.getRequestData(request), stores);
        modelAndView.addObject("stores", storeViewBeans);

        final StoreLocatorFilterBean storeFilter = frontofficeViewBeanFactory.buildFilterBeanStoreLocator(storeViewBeans, locale);
    modelAndView.addObject("storeFilter", storeFilter);
   
        modelAndView.addObject("storeSearchUrl", urlService.generateUrl(FoUrls.STORE_SEARCH, requestData));
   
        overrideDefaultSeoPageTitleAndMainContentTitle(request, modelAndView, FoUrls.STORE_LOCATION.getKey());

        return modelAndView;
  }
View Full Code Here

        productMarketingFetchPlans.add(new SpecificFetchMode(ProductMarketing_.assets.getName()));
    }
   
    @RequestMapping(FoUrls.BRAND_ALL_URL)
    public ModelAndView allBrand(final HttpServletRequest request, final Model model) throws Exception {
        ModelAndViewThemeDevice modelAndView = new ModelAndViewThemeDevice(getCurrentVelocityPath(request), FoUrls.BRAND_ALL.getVelocityPage());
        final RequestData requestData = requestUtil.getRequestData(request);
        final Locale locale = requestData.getLocale();
       
        overrideDefaultSeoPageTitleAndMainContentTitle(request, modelAndView, FoUrls.BRAND_ALL.getKey());
View Full Code Here

        return modelAndView;
    }
   
  @RequestMapping(FoUrls.BRAND_DETAILS_URL)
  public ModelAndView brandDetails(final HttpServletRequest request, final Model model, @PathVariable(RequestConstants.URL_PATTERN_BRAND_CODE) final String brandCode) throws Exception {
    ModelAndViewThemeDevice modelAndView = new ModelAndViewThemeDevice(getCurrentVelocityPath(request), FoUrls.BRAND_DETAILS.getVelocityPage());
        final RequestData requestData = requestUtil.getRequestData(request);

        overrideDefaultSeoPageTitleAndMainContentTitle(request, modelAndView, FoUrls.BRAND_DETAILS.getKey());

    final ProductBrand productBrand = productService.getProductBrandByCode(brandCode);
View Full Code Here

  private final Logger logger = LoggerFactory.getLogger(getClass());
 
  @RequestMapping(value = FoUrls.CONTACT_URL, method = RequestMethod.GET)
  public ModelAndView displayContactForm(final HttpServletRequest request, Model model, @ModelAttribute("contactForm") ContactForm contactForm) throws Exception {
    ModelAndViewThemeDevice modelAndView = new ModelAndViewThemeDevice(getCurrentVelocityPath(request), FoUrls.CONTACT.getVelocityPage());
        final RequestData requestData = requestUtil.getRequestData(request);
        final Locale locale = requestData.getLocale();
       
    modelAndView.addObject(ModelConstants.URL_BACK, urlService.generateUrl(FoUrls.HOME, requestUtil.getRequestData(request)));
   
        modelAndView.addObject("withMap", true);
   
        overrideDefaultSeoPageTitleAndMainContentTitle(request, modelAndView, FoUrls.CONTACT.getKey());

        // BREADCRUMB
        BreadcrumbViewBean breadcrumbViewBean = new BreadcrumbViewBean();
View Full Code Here

  @RequestMapping(value = FoUrls.CONTACT_URL, method = RequestMethod.POST)
  public ModelAndView submitContact(final HttpServletRequest request, @Valid @ModelAttribute("contactForm") ContactForm contactForm,
                BindingResult result, Model model) throws Exception {
   
    ModelAndViewThemeDevice modelAndView = new ModelAndViewThemeDevice(getCurrentVelocityPath(request), "contact/contact-success");

    if (result.hasErrors()) {
      return displayContactForm(request, model, contactForm);
    }

    modelAndView.addObject(ModelConstants.URL_BACK, urlService.generateUrl(FoUrls.HOME, requestUtil.getRequestData(request)));

    try {
      webManagementService.buildAndSaveContactMail(requestUtil.getRequestData(request), contactForm);
         
        } catch (Exception e) {
View Full Code Here

@Controller("forgottenPasswordController")
public class ForgottentPasswordController extends AbstractMCommerceController {

  @RequestMapping(value = FoUrls.FORGOTTEN_PASSWORD_URL, method = RequestMethod.GET)
  public ModelAndView displayForgottenPassword(final HttpServletRequest request, ModelMap modelMap) throws Exception {
    ModelAndViewThemeDevice modelAndView = new ModelAndViewThemeDevice(getCurrentVelocityPath(request), FoUrls.FORGOTTEN_PASSWORD.getVelocityPage());
   
    modelAndView.addObject("formForgottenPassword", new ForgottenPasswordForm());
   
        overrideDefaultSeoPageTitleAndMainContentTitle(request, modelAndView, FoUrls.FORGOTTEN_PASSWORD.getKey());

        return modelAndView;
  }
View Full Code Here

  @Autowired
    protected SecurityUtil securityUtil;
 
  @RequestMapping(value = FoUrls.CUSTOMER_CREATE_ACCOUNT_URL, method = RequestMethod.GET)
  public ModelAndView displayCustomerCreateAccount(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);
        final Locale locale = requestData.getLocale();
       
    // SANITY CHECK: Customer logged
        final Customer currentCustomer = requestData.getCustomer();
    if(currentCustomer != null){
      final String url = urlService.generateUrl(FoUrls.PERSONAL_DETAILS, 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);
   
        // BREADCRUMB
        BreadcrumbViewBean breadcrumbViewBean = new BreadcrumbViewBean();
        breadcrumbViewBean.setName(getSpecificMessage(ScopeWebMessage.HEADER_TITLE, "customer_create_account", locale));
       
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.