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

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


@Controller("userController")
public class UserController extends AbstractBackofficeQalingoController {

    @RequestMapping(value = BoUrls.USER_LIST_URL, method = RequestMethod.GET)
    public ModelAndView userList(final HttpServletRequest request, final Model model) throws Exception {
        ModelAndViewThemeDevice modelAndView = new ModelAndViewThemeDevice(getCurrentVelocityPath(request), BoUrls.USER_LIST.getVelocityPage());
        final RequestData requestData = requestUtil.getRequestData(request);
        final MarketArea marketArea = requestData.getMarketArea();
       
        displayList(request, model, requestData);
       
View Full Code Here


        return modelAndView;
    }
   
    @RequestMapping(value = BoUrls.USER_DETAILS_URL, method = RequestMethod.GET)
    public ModelAndView userDetails(final HttpServletRequest request, final Model model) throws Exception {
        ModelAndViewThemeDevice modelAndView = new ModelAndViewThemeDevice(getCurrentVelocityPath(request), BoUrls.USER_DETAILS.getVelocityPage());
        final RequestData requestData = requestUtil.getRequestData(request);
       
        final String userCode = request.getParameter(RequestConstants.REQUEST_PARAMETER_USER_CODE);
        final User user = userService.getUserByCode(userCode);
       
View Full Code Here

        return modelAndView;
    }
   
    @RequestMapping(value = BoUrls.USER_EDIT_URL, method = RequestMethod.GET)
    public ModelAndView userEdit(final HttpServletRequest request, final Model model, @ModelAttribute(ModelConstants.USER_FORM) UserForm userForm) throws Exception {
        ModelAndViewThemeDevice modelAndView = new ModelAndViewThemeDevice(getCurrentVelocityPath(request), BoUrls.USER_EDIT.getVelocityPage());
        final RequestData requestData = requestUtil.getRequestData(request);
       
        final String userCode = request.getParameter(RequestConstants.REQUEST_PARAMETER_USER_CODE);
        final User user = userService.getUserByCode(userCode);
       
View Full Code Here

  @Autowired
  protected EngineSettingService engineSettingService;
 
  @RequestMapping(BoUrls.SEARCH_CONFIG_URL)
  public ModelAndView searchConfig(final HttpServletRequest request, final HttpServletResponse response) throws Exception {
    ModelAndViewThemeDevice modelAndView = new ModelAndViewThemeDevice(getCurrentVelocityPath(request), BoUrls.SEARCH_CONFIG.getVelocityPage());

    EngineSetting springBatchUrlEngineSetting = engineSettingService.getEngineSettingByCode(EngineSettingService.ENGINE_SETTING_CODE_SOLR);
    String solrUrl = springBatchUrlEngineSetting.getEngineSettingValue(EngineSettingService.ENGINE_SETTING_SOLR_MASTER_CONTEXT).getValue();
    modelAndView.addObject("solrUrl", solrUrl);
   
        return modelAndView;
  }
View Full Code Here

    public static final String SESSION_KEY = "PagedListHolder_EngineSettings";

    @RequestMapping(value = BoUrls.ENGINE_SETTING_LIST_URL, method = RequestMethod.GET)
    public ModelAndView engineSettingList(final HttpServletRequest request, final Model model) throws Exception {
        ModelAndViewThemeDevice modelAndView = new ModelAndViewThemeDevice(getCurrentVelocityPath(request), BoUrls.ENGINE_SETTING_LIST.getVelocityPage());
        final RequestData requestData = requestUtil.getRequestData(request);
        final MarketArea marketArea = requestData.getMarketArea();
       
        displayList(request, model, requestData);
       
View Full Code Here

        return modelAndView;
    }
   
    @RequestMapping(value = BoUrls.ENGINE_SETTING_DETAILS_URL, method = RequestMethod.GET)
    public ModelAndView engineSettingDetails(final HttpServletRequest request, final Model model) throws Exception {
        ModelAndViewThemeDevice modelAndView = new ModelAndViewThemeDevice(getCurrentVelocityPath(request), BoUrls.ENGINE_SETTING_DETAILS.getVelocityPage());
        final RequestData requestData = requestUtil.getRequestData(request);
       
        final String engineSettingCode = request.getParameter(RequestConstants.REQUEST_PARAMETER_ENGINE_SETTING_CODE);
       
        // SANITY CHECK
        if(StringUtils.isEmpty(engineSettingCode)){
            final String urlRedirect = backofficeUrlService.generateUrl(BoUrls.ENGINE_SETTING_LIST, requestData);
            return new ModelAndView(new RedirectView(urlRedirect));
        }
       
        final EngineSetting engineSetting = engineSettingService.getEngineSettingByCode(engineSettingCode);

        // SANITY CHECK
        if(engineSetting != null){
            modelAndView.addObject(ModelConstants.ENGINE_SETTING_VIEW_BEAN, backofficeViewBeanFactory.buildViewBeanEngineSetting(requestData, engineSetting));
        } else {
            final String url = requestUtil.getLastRequestUrl(request);
            return new ModelAndView(new RedirectView(url));
        }
       
View Full Code Here

        return modelAndView;
  }
 
  @RequestMapping(BoUrls.SEARCH_URL)
  public ModelAndView search(final HttpServletRequest request, final HttpServletResponse response) throws Exception {
    ModelAndViewThemeDevice modelAndView = new ModelAndViewThemeDevice(getCurrentVelocityPath(request), BoUrls.SEARCH.getVelocityPage());
   
        return modelAndView;
  }
View Full Code Here

        return modelAndView;
    }
   
    @RequestMapping(value = BoUrls.ENGINE_SETTING_EDIT_URL, method = RequestMethod.GET)
    public ModelAndView engineSettingEdit(final HttpServletRequest request, final Model model, @ModelAttribute(ModelConstants.ENGINE_SETTING_FORM) EngineSettingForm engineSettingForm) throws Exception {
        ModelAndViewThemeDevice modelAndView = new ModelAndViewThemeDevice(getCurrentVelocityPath(request), BoUrls.ENGINE_SETTING_EDIT.getVelocityPage());
        final RequestData requestData = requestUtil.getRequestData(request);
       
        final String engineSettingCode = request.getParameter(RequestConstants.REQUEST_PARAMETER_ENGINE_SETTING_CODE);
        if(StringUtils.isNotEmpty(engineSettingCode)){
            // EDIT MODE
View Full Code Here

        }
    }

    @RequestMapping(value = BoUrls.ENGINE_SETTING_VALUE_EDIT_URL, method = RequestMethod.GET)
    public ModelAndView engineSettingValueEdit(final HttpServletRequest request, final Model model, @ModelAttribute(ModelConstants.ENGINE_SETTING_VALUE_FORM) EngineSettingValueForm engineSettingValueForm) throws Exception {
        ModelAndViewThemeDevice modelAndView = new ModelAndViewThemeDevice(getCurrentVelocityPath(request), BoUrls.ENGINE_SETTING_VALUE_EDIT.getVelocityPage());
        final RequestData requestData = requestUtil.getRequestData(request);
       
        final String engineSettingCode = request.getParameter(RequestConstants.REQUEST_PARAMETER_ENGINE_SETTING_CODE);
        final String engineSettingValueContext = request.getParameter(RequestConstants.REQUEST_PARAMETER_ENGINE_SETTING_VALUE_CONTEXT);
        if(StringUtils.isNotEmpty(engineSettingCode)
                && StringUtils.isNotEmpty(engineSettingValueContext)){
            final EngineSetting engineSetting = engineSettingService.getEngineSettingByCode(engineSettingCode);
            if(engineSetting != null){
                EngineSettingValue engineSettingValue = engineSetting.getEngineSettingValue(engineSettingValueContext);
                if(engineSettingValue != null){
                    modelAndView.addObject("engineSetting", backofficeViewBeanFactory.buildViewBeanEngineSetting(requestData, engineSetting));
                    modelAndView.addObject("engineSettingValue", backofficeViewBeanFactory.buildViewBeanEngineSettingValue(requestData, engineSettingValue));
                    modelAndView.addObject("engineSettingValueForm", backofficeFormFactory.buildEngineSettingValueForm(requestData, engineSettingValue));

                    model.addAttribute(ModelConstants.URL_BACK, backofficeUrlService.generateUrl(BoUrls.ENGINE_SETTING_DETAILS, requestData, engineSetting));

                    Object[] params = {engineSetting.getName() + " (" + engineSetting.getCode() + ")"};
                    overrideDefaultSeoPageTitleAndMainContentTitle(request, modelAndView, BoUrls.ENGINE_SETTING_EDIT.getKey(), params);
View Full Code Here

  @Autowired
  protected EngineSettingService engineSettingService;
 
  @RequestMapping("/search-batch.html*")
  public ModelAndView searchBatch(final HttpServletRequest request, final HttpServletResponse response) throws Exception {
    ModelAndViewThemeDevice modelAndView = new ModelAndViewThemeDevice(getCurrentVelocityPath(request), BoUrls.BATCH.getVelocityPage());
    final RequestData requestData = requestUtil.getRequestData(request);

    backofficeFormFactory.buildBatchQuickSearchForm(requestData);
   
        return modelAndView;
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.