@Test public void createPathSiteUrlMobilePort8080() { request.setServerPort(8080); request.setRequestURI("/showcase/mob/foo"); assertEquals("https: }
public String createSiteUrl(HttpServletRequest request) { String requestURI = request.getRequestURI(); String adjustedRequestURI = ""; if (hasMobilePath() && requestURI.equals(getCleanMobilePath()) || hasTabletPath() && requestURI.equals(getCleanTabletPath())) { if (hasRootPath()) { adjustedRequestURI = getCleanRootPath(); } } else if (hasMobilePath() && requestURI.startsWith(getFullMobilePath())) { if (hasRootPath()) { adjustedRequestURI = getRootPath() + requestURI.substring(getFullMobilePath().length()); } else { adjustedRequestURI = requestURI.substring(getCleanMobilePath().length()); } } else if (hasTabletPath() && requestURI.startsWith(getFullTabletPath())) { if (hasRootPath()) { adjustedRequestURI = getRootPath() + requestURI.substring(getFullTabletPath().length()); } else { adjustedRequestURI = requestURI.substring(getCleanTabletPath().length()); } } return createSiteUrlInternal(request, request.getServerName(), adjustedRequestURI); }
NormalSitePathUrlFactory extends AbstractSitePathUrlFactory implements SiteUrlFactory { public String createSiteUrl(HttpServletRequest request) { String requestURI = request.getRequestURI(); String adjustedRequestURI = ""; if (hasMobilePath() && requestURI.equals(getCleanMobilePath()) || hasTabletPath() && requestURI.equals(getCleanTabletPath())) { if (hasRootPath()) { adjustedRequestURI = getCleanRootPath(); } } else if (hasMobilePath() && requestURI.startsWith(getFullMobilePath())) { if (hasRootPath()) { adjustedRequestURI = getRootPath() + requestURI.substring(getFullMobilePath().length()); } else { adjustedRequestURI = requestURI.substring(getCleanMobilePath().length()); } } else if (hasTabletPath() && requestURI.startsWith(getFullTabletPath())) { if (hasRootPath()) { adjustedRequestURI = getRootPath() + requestURI.substring(getFullTabletPath().length()); } else { adjustedRequestURI = requestURI.substring(getCleanTabletPath().length()); } } return createSiteUrlInternal(request, request.getServerName(), adjustedRequestURI); } }
NormalSitePathUrlFactory extends AbstractSitePathUrlFactory implements SiteUrlFactory { public String createSiteUrl(HttpServletRequest request) { String requestURI = request.getRequestURI(); String adjustedRequestURI = ""; if (hasMobilePath() && requestURI.equals(getCleanMobilePath()) || hasTabletPath() && requestURI.equals(getCleanTabletPath())) { if (hasRootPath()) { adjustedRequestURI = getCleanRootPath(); } } else if (hasMobilePath() && requestURI.startsWith(getFullMobilePath())) { if (hasRootPath()) { adjustedRequestURI = getRootPath() + requestURI.substring(getFullMobilePath().length()); } else { adjustedRequestURI = requestURI.substring(getCleanMobilePath().length()); } } else if (hasTabletPath() && requestURI.startsWith(getFullTabletPath())) { if (hasRootPath()) { adjustedRequestURI = getRootPath() + requestURI.substring(getFullTabletPath().length()); } else { adjustedRequestURI = requestURI.substring(getCleanTabletPath().length()); } } return createSiteUrlInternal(request, request.getServerName(), adjustedRequestURI); } NormalSitePathUrlFactory(final String mobilePath);  NormalSitePathUrlFactory(final String mobilePath, final String rootPath);  NormalSitePathUrlFactory(final String mobilePath, final String tabletPath, final String rootPath); }
NormalSitePathUrlFactory extends AbstractSitePathUrlFactory implements SiteUrlFactory { public String createSiteUrl(HttpServletRequest request) { String requestURI = request.getRequestURI(); String adjustedRequestURI = ""; if (hasMobilePath() && requestURI.equals(getCleanMobilePath()) || hasTabletPath() && requestURI.equals(getCleanTabletPath())) { if (hasRootPath()) { adjustedRequestURI = getCleanRootPath(); } } else if (hasMobilePath() && requestURI.startsWith(getFullMobilePath())) { if (hasRootPath()) { adjustedRequestURI = getRootPath() + requestURI.substring(getFullMobilePath().length()); } else { adjustedRequestURI = requestURI.substring(getCleanMobilePath().length()); } } else if (hasTabletPath() && requestURI.startsWith(getFullTabletPath())) { if (hasRootPath()) { adjustedRequestURI = getRootPath() + requestURI.substring(getFullTabletPath().length()); } else { adjustedRequestURI = requestURI.substring(getCleanTabletPath().length()); } } return createSiteUrlInternal(request, request.getServerName(), adjustedRequestURI); } NormalSitePathUrlFactory(final String mobilePath);  NormalSitePathUrlFactory(final String mobilePath, final String rootPath);  NormalSitePathUrlFactory(final String mobilePath, final String tabletPath, final String rootPath); boolean isRequestForSite(HttpServletRequest request); String createSiteUrl(HttpServletRequest request); }
NormalSitePathUrlFactory extends AbstractSitePathUrlFactory implements SiteUrlFactory { public String createSiteUrl(HttpServletRequest request) { String requestURI = request.getRequestURI(); String adjustedRequestURI = ""; if (hasMobilePath() && requestURI.equals(getCleanMobilePath()) || hasTabletPath() && requestURI.equals(getCleanTabletPath())) { if (hasRootPath()) { adjustedRequestURI = getCleanRootPath(); } } else if (hasMobilePath() && requestURI.startsWith(getFullMobilePath())) { if (hasRootPath()) { adjustedRequestURI = getRootPath() + requestURI.substring(getFullMobilePath().length()); } else { adjustedRequestURI = requestURI.substring(getCleanMobilePath().length()); } } else if (hasTabletPath() && requestURI.startsWith(getFullTabletPath())) { if (hasRootPath()) { adjustedRequestURI = getRootPath() + requestURI.substring(getFullTabletPath().length()); } else { adjustedRequestURI = requestURI.substring(getCleanTabletPath().length()); } } return createSiteUrlInternal(request, request.getServerName(), adjustedRequestURI); } NormalSitePathUrlFactory(final String mobilePath);  NormalSitePathUrlFactory(final String mobilePath, final String rootPath);  NormalSitePathUrlFactory(final String mobilePath, final String tabletPath, final String rootPath); boolean isRequestForSite(HttpServletRequest request); String createSiteUrl(HttpServletRequest request);  }