@Test public void testProductUrlWithSubpageAndAnchor() { Page page = context.currentPage("/content/product-page"); request.setAttribute(WCMMode.class.getName(), WCMMode.EDIT); Map<String, String> params = new ParamsBuilder() .urlKey("productId1") .variantSku("variantSku") .map(); String url = urlProvider.toProductUrl(request, page, params); Assert.assertEquals("/content/product-page/sub-page.productId1.html#variantSku", url); }
@Override public String toProductUrl(SlingHttpServletRequest request, Page page, Map<String, String> params) { return toUrl(request, page, params, productUrlTemplate, UrlProvider.URL_KEY_PARAM); }
UrlProviderImpl implements UrlProvider { @Override public String toProductUrl(SlingHttpServletRequest request, Page page, Map<String, String> params) { return toUrl(request, page, params, productUrlTemplate, UrlProvider.URL_KEY_PARAM); } }
UrlProviderImpl implements UrlProvider { @Override public String toProductUrl(SlingHttpServletRequest request, Page page, Map<String, String> params) { return toUrl(request, page, params, productUrlTemplate, UrlProvider.URL_KEY_PARAM); }  }
UrlProviderImpl implements UrlProvider { @Override public String toProductUrl(SlingHttpServletRequest request, Page page, Map<String, String> params) { return toUrl(request, page, params, productUrlTemplate, UrlProvider.URL_KEY_PARAM); }  @Activate void activate(UrlProviderConfiguration conf); @Override String toProductUrl(SlingHttpServletRequest request, Page page, Map<String, String> params); @Override String toCategoryUrl(SlingHttpServletRequest request, Page page, Map<String, String> params); static Resource toSpecificPage(Resource page, String selector); @Override Pair<ProductIdentifierType, String> getProductIdentifier(SlingHttpServletRequest request); @Override Pair<CategoryIdentifierType, String> getCategoryIdentifier(SlingHttpServletRequest request); }
UrlProviderImpl implements UrlProvider { @Override public String toProductUrl(SlingHttpServletRequest request, Page page, Map<String, String> params) { return toUrl(request, page, params, productUrlTemplate, UrlProvider.URL_KEY_PARAM); }  @Activate void activate(UrlProviderConfiguration conf); @Override String toProductUrl(SlingHttpServletRequest request, Page page, Map<String, String> params); @Override String toCategoryUrl(SlingHttpServletRequest request, Page page, Map<String, String> params); static Resource toSpecificPage(Resource page, String selector); @Override Pair<ProductIdentifierType, String> getProductIdentifier(SlingHttpServletRequest request); @Override Pair<CategoryIdentifierType, String> getCategoryIdentifier(SlingHttpServletRequest request);  }