@Test public void createRootSiteUrlFromMobileSite() { request.setServerPort(80); request.setRequestURI("/mobile/about"); assertEquals("https: }
public String createSiteUrl(HttpServletRequest request) { String urlPath = request.getRequestURI(); if (getCleanMobilePath() != null && urlPath.startsWith(getCleanMobilePath())) { urlPath = urlPath.substring(getCleanMobilePath().length()); } else if (getRootPath() != null && urlPath.startsWith(getCleanRootPath())) { urlPath = urlPath.substring(getCleanRootPath().length()); } urlPath = getCleanTabletPath() + urlPath; return createSiteUrlInternal(request, request.getServerName(), urlPath); }
TabletSitePathUrlFactory extends AbstractSitePathUrlFactory implements SiteUrlFactory { public String createSiteUrl(HttpServletRequest request) { String urlPath = request.getRequestURI(); if (getCleanMobilePath() != null && urlPath.startsWith(getCleanMobilePath())) { urlPath = urlPath.substring(getCleanMobilePath().length()); } else if (getRootPath() != null && urlPath.startsWith(getCleanRootPath())) { urlPath = urlPath.substring(getCleanRootPath().length()); } urlPath = getCleanTabletPath() + urlPath; return createSiteUrlInternal(request, request.getServerName(), urlPath); } }
TabletSitePathUrlFactory extends AbstractSitePathUrlFactory implements SiteUrlFactory { public String createSiteUrl(HttpServletRequest request) { String urlPath = request.getRequestURI(); if (getCleanMobilePath() != null && urlPath.startsWith(getCleanMobilePath())) { urlPath = urlPath.substring(getCleanMobilePath().length()); } else if (getRootPath() != null && urlPath.startsWith(getCleanRootPath())) { urlPath = urlPath.substring(getCleanRootPath().length()); } urlPath = getCleanTabletPath() + urlPath; return createSiteUrlInternal(request, request.getServerName(), urlPath); } TabletSitePathUrlFactory(final String tabletPath, final String mobilePath);  TabletSitePathUrlFactory(final String tabletPath, final String mobilePath, final String rootPath); }
TabletSitePathUrlFactory extends AbstractSitePathUrlFactory implements SiteUrlFactory { public String createSiteUrl(HttpServletRequest request) { String urlPath = request.getRequestURI(); if (getCleanMobilePath() != null && urlPath.startsWith(getCleanMobilePath())) { urlPath = urlPath.substring(getCleanMobilePath().length()); } else if (getRootPath() != null && urlPath.startsWith(getCleanRootPath())) { urlPath = urlPath.substring(getCleanRootPath().length()); } urlPath = getCleanTabletPath() + urlPath; return createSiteUrlInternal(request, request.getServerName(), urlPath); } TabletSitePathUrlFactory(final String tabletPath, final String mobilePath);  TabletSitePathUrlFactory(final String tabletPath, final String mobilePath, final String rootPath); boolean isRequestForSite(HttpServletRequest request); String createSiteUrl(HttpServletRequest request); }
TabletSitePathUrlFactory extends AbstractSitePathUrlFactory implements SiteUrlFactory { public String createSiteUrl(HttpServletRequest request) { String urlPath = request.getRequestURI(); if (getCleanMobilePath() != null && urlPath.startsWith(getCleanMobilePath())) { urlPath = urlPath.substring(getCleanMobilePath().length()); } else if (getRootPath() != null && urlPath.startsWith(getCleanRootPath())) { urlPath = urlPath.substring(getCleanRootPath().length()); } urlPath = getCleanTabletPath() + urlPath; return createSiteUrlInternal(request, request.getServerName(), urlPath); } TabletSitePathUrlFactory(final String tabletPath, final String mobilePath);  TabletSitePathUrlFactory(final String tabletPath, final String mobilePath, final String rootPath); boolean isRequestForSite(HttpServletRequest request); String createSiteUrl(HttpServletRequest request);  }