@Test public void testProductIdentifierParsingInSelector() { MockRequestPathInfo requestPathInfo = (MockRequestPathInfo) context.request().getRequestPathInfo(); requestPathInfo.setSelectorString("lazy.beaumont-summit-kit"); Pair<ProductIdentifierType, String> id = urlProvider.getProductIdentifier(context.request()); Assert.assertEquals(ProductIdentifierType.URL_KEY, id.getLeft()); Assert.assertEquals("beaumont-summit-kit", id.getRight()); }
@Override public Pair<ProductIdentifierType, String> getProductIdentifier(SlingHttpServletRequest request) { return Pair.of(productIdentifierConfig.getRight(), parseIdentifier(productIdentifierConfig.getLeft(), request)); }
UrlProviderImpl implements UrlProvider { @Override public Pair<ProductIdentifierType, String> getProductIdentifier(SlingHttpServletRequest request) { return Pair.of(productIdentifierConfig.getRight(), parseIdentifier(productIdentifierConfig.getLeft(), request)); } }
UrlProviderImpl implements UrlProvider { @Override public Pair<ProductIdentifierType, String> getProductIdentifier(SlingHttpServletRequest request) { return Pair.of(productIdentifierConfig.getRight(), parseIdentifier(productIdentifierConfig.getLeft(), request)); }  }
UrlProviderImpl implements UrlProvider { @Override public Pair<ProductIdentifierType, String> getProductIdentifier(SlingHttpServletRequest request) { return Pair.of(productIdentifierConfig.getRight(), parseIdentifier(productIdentifierConfig.getLeft(), request)); }  @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 Pair<ProductIdentifierType, String> getProductIdentifier(SlingHttpServletRequest request) { return Pair.of(productIdentifierConfig.getRight(), parseIdentifier(productIdentifierConfig.getLeft(), request)); }  @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);  }