Package org.hoteia.qalingo.core.pojo

Examples of org.hoteia.qalingo.core.pojo.RequestData


public class LoginController extends AbstractBackofficeQalingoController {

  @RequestMapping(BoUrls.LOGIN_URL)
  public ModelAndView login(final HttpServletRequest request, final Model model) throws Exception {
    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));
View Full Code Here


  /**
   *
   */
  @ModelAttribute
  protected void initApp(final HttpServletRequest request, final Model model) throws Exception {
        final RequestData requestData = requestUtil.getRequestData(request);
        final Locale locale = requestData.getLocale();
       
    // APP NAME
    model.addAttribute(Constants.APP_NAME, getAppName(request));
    Object[] params = {StringUtils.capitalize(requestUtil.getApplicationName())};
    model.addAttribute(Constants.APP_NAME_HTML, getCommonMessage(ScopeCommonMessage.APP, "name_html", params, locale));
View Full Code Here

  /**
   *
   */
  @ModelAttribute
  protected void initConfig(final HttpServletRequest request, final Model model) throws Exception {
        final RequestData requestData = requestUtil.getRequestData(request);
        final Locale locale = requestData.getLocale();
       
    model.addAttribute(ModelConstants.LOCALE_LANGUAGE_CODE, locale.getLanguage());
    model.addAttribute(ModelConstants.CONTEXT_PATH, request.getContextPath());
    model.addAttribute(ModelConstants.THEME, requestUtil.getCurrentTheme(requestData));
    Object[] params = {StringUtils.capitalize(requestUtil.getEnvironmentName())};
View Full Code Here

  /**
   *
   */
  @ModelAttribute
  protected void initSeo(final HttpServletRequest request, final Model model) throws Exception {
        final RequestData requestData = requestUtil.getRequestData(request);
        final Locale locale = requestData.getLocale();

    String seoPageMetaAuthor = getCommonMessage(ScopeCommonMessage.SEO, BoMessageKey.SEO_META_AUTHOR, locale);
        model.addAttribute(ModelConstants.SEO_PAGE_META_AUTHOR, seoPageMetaAuthor);

    String seoPageMetaKeywords = getCommonMessage(ScopeCommonMessage.SEO, BoMessageKey.SEO_META_KEYWORDS, locale);
View Full Code Here

  /**
   *
   */
  @ModelAttribute
  public void initWording(final HttpServletRequest request, final Model model) throws Exception {
        final RequestData requestData = requestUtil.getRequestData(request);
        final Locale locale = requestData.getLocale();
    String contextName = requestUtil.getContextName();
    try {
      String contextValue = PropertiesUtil.getWebappContextKey(contextName);
      model.addAttribute(ModelConstants.WORDING, coreMessageSource.loadWordingByContext(contextValue, locale));
         
View Full Code Here

   
    /**
     *
     */
    protected void overrideDefaultSeoPageTitleAndMainContentTitle(final HttpServletRequest request, final ModelAndView modelAndView, final String titleKey, Object[] params) throws Exception {
        final RequestData requestData = requestUtil.getRequestData(request);
        final Locale locale = requestData.getLocale();
        String pageTitleKey = titleKey;
        String headerTitle = "";
        if(params != null){
            headerTitle = getSpecificMessage(ScopeWebMessage.HEADER_TITLE, pageTitleKey, params, locale);
        } else {
View Full Code Here

  /**
   * @throws Exception
   *
   */
  protected String getAppName(HttpServletRequest request) throws Exception {
        final RequestData requestData = requestUtil.getRequestData(request);
        final Locale locale = requestData.getLocale();
    Object[] params = {StringUtils.capitalize(requestUtil.getApplicationName())};
    String appName = getCommonMessage(ScopeCommonMessage.APP, "name_text", params, locale);
    return appName;
  }
View Full Code Here

    /**
     * @throws Exception
     *
     */
    protected String getCurrentVelocityPath(HttpServletRequest request) throws Exception {
        final RequestData requestData = requestUtil.getRequestData(request);
        return requestUtil.getCurrentVelocityWebPrefix(requestData);
    }
View Full Code Here

  protected final Logger logger = LoggerFactory.getLogger(getClass());

  @RequestMapping("/connect-oauth-windows-live.html*")
  public ModelAndView connectWindowsLive(final HttpServletRequest request, final HttpServletResponse response) throws Exception {
    final RequestData requestData = requestUtil.getRequestData(request);
   
    // SANITY CHECK
    if(!requestUtil.hasKnownCustomerLogged(request)){
      try {
          // CLIENT ID
View Full Code Here

  protected static final String TWITTER_OAUTH_REQUEST_TOKEN = "TWITTER_OAUTH_REQUEST_TOKEN";
 
  protected static final String REQUEST_PARAM_OAUTH_VERIFIER = "oauth_verifier";
 
  protected Customer setCommonCustomerInformation(final HttpServletRequest request, final Customer customer) throws Exception {
      final RequestData requestData = requestUtil.getRequestData(request);
      final Market market = requestData.getMarket();
        final MarketArea marketArea = requestData.getMarketArea();
        Customer savedCustomer = webManagementService.buildAndSaveNewCustomer(requestData, market, marketArea, customer);
        return savedCustomer;
  }
View Full Code Here

TOP

Related Classes of org.hoteia.qalingo.core.pojo.RequestData

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.