Examples of StandardSitePreferenceHandler


Examples of org.springframework.mobile.device.site.StandardSitePreferenceHandler

   */
  public static SiteSwitcherHandlerInterceptor standard(String normalServerName, String mobileServerName, String cookieDomain, Boolean tabletIsMobile) {
    return new SiteSwitcherHandlerInterceptor(
        new StandardSiteUrlFactory(normalServerName),
        new StandardSiteUrlFactory(mobileServerName),
        new StandardSitePreferenceHandler(new CookieSitePreferenceRepository(cookieDomain)),
        tabletIsMobile);
  }
View Full Code Here

Examples of org.springframework.mobile.device.site.StandardSitePreferenceHandler

  public static SiteSwitcherHandlerInterceptor standard(String normalServerName, String mobileServerName, String tabletServerName, String cookieDomain) {
    return new SiteSwitcherHandlerInterceptor(
        new StandardSiteUrlFactory(normalServerName),
        new StandardSiteUrlFactory(mobileServerName),
        new StandardSiteUrlFactory(tabletServerName),
        new StandardSitePreferenceHandler(new CookieSitePreferenceRepository(cookieDomain)));
  }
View Full Code Here

Examples of org.springframework.mobile.device.site.StandardSitePreferenceHandler

   */
  public static SiteSwitcherHandlerInterceptor urlPath(String mobilePath) {
    return new SiteSwitcherHandlerInterceptor(
        new NormalSitePathUrlFactory(mobilePath),
        new MobileSitePathUrlFactory(mobilePath, null),
        new StandardSitePreferenceHandler(new CookieSitePreferenceRepository()));
  }
View Full Code Here

Examples of org.springframework.mobile.device.site.StandardSitePreferenceHandler

   */
  public static SiteSwitcherHandlerInterceptor urlPath(String mobilePath, String rootPath) {
    return new SiteSwitcherHandlerInterceptor(
        new NormalSitePathUrlFactory(mobilePath, rootPath),
        new MobileSitePathUrlFactory(mobilePath, null, rootPath),
        new StandardSitePreferenceHandler(new CookieSitePreferenceRepository()));
  }
View Full Code Here

Examples of org.springframework.mobile.device.site.StandardSitePreferenceHandler

  public static SiteSwitcherHandlerInterceptor urlPath(String mobilePath, String tabletPath, String rootPath) {
    return new SiteSwitcherHandlerInterceptor(
        new NormalSitePathUrlFactory(mobilePath, tabletPath, rootPath),
        new MobileSitePathUrlFactory(mobilePath, tabletPath, rootPath),
        new TabletSitePathUrlFactory(tabletPath, mobilePath, rootPath),
        new StandardSitePreferenceHandler(new CookieSitePreferenceRepository()));
  }
View Full Code Here

Examples of org.springframework.mobile.device.site.StandardSitePreferenceHandler

  private void mDot() throws ServletException {
    if (serverName == null) {
      throw new ServletException("serverName init parameter not found");
    }
    this.siteSwitcherHandler = new StandardSiteSwitcherHandler(new StandardSiteUrlFactory(serverName),
        new StandardSiteUrlFactory("m." + serverName), null, new StandardSitePreferenceHandler(
            new CookieSitePreferenceRepository("." + serverName)), tabletIsMobile);
  }
View Full Code Here

Examples of org.springframework.mobile.device.site.StandardSitePreferenceHandler

      throw new ServletException("serverName init parameter not found");
    }
    int lastDot = serverName.lastIndexOf('.');
    this.siteSwitcherHandler = new StandardSiteSwitcherHandler(new StandardSiteUrlFactory(serverName),
        new StandardSiteUrlFactory(serverName.substring(0, lastDot) + ".mobi"), null,
        new StandardSitePreferenceHandler(new CookieSitePreferenceRepository("." + serverName)), tabletIsMobile);
  }
View Full Code Here

Examples of org.springframework.mobile.device.site.StandardSitePreferenceHandler

    }
    if (tabletPath != null) {
      tabletSiteUrlFactory = new TabletSitePathUrlFactory(tabletPath, mobilePath, rootPath);
    }
    this.siteSwitcherHandler = new StandardSiteSwitcherHandler(normalSiteUrlFactory, mobileSiteUrlFactory,
        tabletSiteUrlFactory, new StandardSitePreferenceHandler(new CookieSitePreferenceRepository()), null);
  }
View Full Code Here

Examples of org.springframework.mobile.device.site.StandardSitePreferenceHandler

      public String createSiteUrl(HttpServletRequest request) {
        return "http://app.com/t";
      }
    };
    SitePreferenceHandler sitePreferenceHandler = new StandardSitePreferenceHandler(sitePreferenceRepository);
    siteSwitcher = new SiteSwitcherRequestFilter(normalSiteUrlFactory, mobileSiteUrlFactory, tabletSiteUrlFactory,
        sitePreferenceHandler);
    siteSwitcher.initFilterBean();
  }
View Full Code Here

Examples of org.springframework.mobile.device.site.StandardSitePreferenceHandler

      public String createSiteUrl(HttpServletRequest request) {
        return "http://app.com/tab";
      }
    };
    SitePreferenceHandler sitePreferenceHandler = new StandardSitePreferenceHandler(sitePreferenceRepository);
    siteSwitcher = new SiteSwitcherHandlerInterceptor(normalSiteUrlFactory, mobileSiteUrlFactory,
        tabletSiteUrlFactory, sitePreferenceHandler);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.