@Test public void testCategoryUrlWithOldSyntax() { MockUrlProviderConfiguration config = new MockUrlProviderConfiguration(true); Assert.assertTrue(config.categoryUrlTemplate().contains("${")); urlProvider = new UrlProviderImpl(); urlProvider.activate(config); testCategoryUrlImpl(); }
@Activate public void activate(UrlProviderConfiguration conf) { productUrlTemplate = conf.productUrlTemplate(); productIdentifierConfig = Pair.of(conf.productIdentifierLocation(), conf.productIdentifierType()); categoryUrlTemplate = conf.categoryUrlTemplate(); categoryIdentifierConfig = Pair.of(conf.categoryIdentifierLocation(), conf.categoryIdentifierType()); }
UrlProviderImpl implements UrlProvider { @Activate public void activate(UrlProviderConfiguration conf) { productUrlTemplate = conf.productUrlTemplate(); productIdentifierConfig = Pair.of(conf.productIdentifierLocation(), conf.productIdentifierType()); categoryUrlTemplate = conf.categoryUrlTemplate(); categoryIdentifierConfig = Pair.of(conf.categoryIdentifierLocation(), conf.categoryIdentifierType()); } }
UrlProviderImpl implements UrlProvider { @Activate public void activate(UrlProviderConfiguration conf) { productUrlTemplate = conf.productUrlTemplate(); productIdentifierConfig = Pair.of(conf.productIdentifierLocation(), conf.productIdentifierType()); categoryUrlTemplate = conf.categoryUrlTemplate(); categoryIdentifierConfig = Pair.of(conf.categoryIdentifierLocation(), conf.categoryIdentifierType()); }  }
UrlProviderImpl implements UrlProvider { @Activate public void activate(UrlProviderConfiguration conf) { productUrlTemplate = conf.productUrlTemplate(); productIdentifierConfig = Pair.of(conf.productIdentifierLocation(), conf.productIdentifierType()); categoryUrlTemplate = conf.categoryUrlTemplate(); categoryIdentifierConfig = Pair.of(conf.categoryIdentifierLocation(), conf.categoryIdentifierType()); }  @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 { @Activate public void activate(UrlProviderConfiguration conf) { productUrlTemplate = conf.productUrlTemplate(); productIdentifierConfig = Pair.of(conf.productIdentifierLocation(), conf.productIdentifierType()); categoryUrlTemplate = conf.categoryUrlTemplate(); categoryIdentifierConfig = Pair.of(conf.categoryIdentifierLocation(), conf.categoryIdentifierType()); }  @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);  }