@Test public void testGetUIVariationTestNoFailover() { Category category = categoryService.findById(139L); assertNotNull(category); assertNull(category.getUitemplate()); String uiVariation = categoryService.getCategoryTemplate(139L); assertNull(uiVariation); }
@Override public String getCategoryTemplate(final long categoryId) { final Category category = proxy().findById(categoryId); if (category != null && !category.isRoot()) { if (StringUtils.isBlank(category.getUitemplate())) { return proxy().getCategoryTemplate(category.getParentId()); } else { return category.getUitemplate(); } } return null; }
CategoryServiceImpl extends BaseGenericServiceImpl<Category> implements CategoryService { @Override public String getCategoryTemplate(final long categoryId) { final Category category = proxy().findById(categoryId); if (category != null && !category.isRoot()) { if (StringUtils.isBlank(category.getUitemplate())) { return proxy().getCategoryTemplate(category.getParentId()); } else { return category.getUitemplate(); } } return null; } }
CategoryServiceImpl extends BaseGenericServiceImpl<Category> implements CategoryService { @Override public String getCategoryTemplate(final long categoryId) { final Category category = proxy().findById(categoryId); if (category != null && !category.isRoot()) { if (StringUtils.isBlank(category.getUitemplate())) { return proxy().getCategoryTemplate(category.getParentId()); } else { return category.getUitemplate(); } } return null; } CategoryServiceImpl(final GenericDAO<Category, Long> categoryDao,
                               final ShopCategoryRelationshipSupport shopCategoryRelationshipSupport); }
CategoryServiceImpl extends BaseGenericServiceImpl<Category> implements CategoryService { @Override public String getCategoryTemplate(final long categoryId) { final Category category = proxy().findById(categoryId); if (category != null && !category.isRoot()) { if (StringUtils.isBlank(category.getUitemplate())) { return proxy().getCategoryTemplate(category.getParentId()); } else { return category.getUitemplate(); } } return null; } CategoryServiceImpl(final GenericDAO<Category, Long> categoryDao,
                               final ShopCategoryRelationshipSupport shopCategoryRelationshipSupport); @Override Category getRootCategory(); @Override List<Long> getCategoryLinks(final long categoryId); @Override String getCategoryTemplate(final long categoryId); @Override String getCategorySearchTemplate(final long categoryId); @Override Long getCategoryProductTypeId(final long categoryId); @Override boolean isCategoryHasChildren(final long categoryId); @Override List<Category> getChildCategories(final long categoryId); @Override List<Category> findChildCategoriesWithAvailability(final long categoryId, final boolean withAvailability); @Override Set<Category> getChildCategoriesRecursive(final long categoryId); @Override Set<Long> getAllCategoryIds(final Collection<String> guids); @Override List<Long> getChildCategoriesRecursiveIds(final long categoryId); @Override List<Long> getChildCategoriesRecursiveIdsAndLinkIds(final long categoryId); @Override List<Category> findCategories(final int start, final int offset, final String sort, final boolean sortDescending, final Map<String, List> filter); @Override int findCategoryCount(final Map<String, List> filter); @Override List<Long> getCategoryIdAndLinkId(final long categoryId); @Override boolean isCategoryHasSubcategory(final long topCategoryId, final long subCategoryId); @Override Category getById(final long pk); @Override Long findCategoryIdBySeoUri(final String seoUri); @Override Long findCategoryIdByGUID(final String guid); @Override String findSeoUriByCategoryId(final Long categoryId); @Override Category findCategoryIdBySeoUriOrGuid(final String seoUriOrGuid); @Override List<Category> findByProductId(final long productId); CategoryService getSelf(); }
CategoryServiceImpl extends BaseGenericServiceImpl<Category> implements CategoryService { @Override public String getCategoryTemplate(final long categoryId) { final Category category = proxy().findById(categoryId); if (category != null && !category.isRoot()) { if (StringUtils.isBlank(category.getUitemplate())) { return proxy().getCategoryTemplate(category.getParentId()); } else { return category.getUitemplate(); } } return null; } CategoryServiceImpl(final GenericDAO<Category, Long> categoryDao,
                               final ShopCategoryRelationshipSupport shopCategoryRelationshipSupport); @Override Category getRootCategory(); @Override List<Long> getCategoryLinks(final long categoryId); @Override String getCategoryTemplate(final long categoryId); @Override String getCategorySearchTemplate(final long categoryId); @Override Long getCategoryProductTypeId(final long categoryId); @Override boolean isCategoryHasChildren(final long categoryId); @Override List<Category> getChildCategories(final long categoryId); @Override List<Category> findChildCategoriesWithAvailability(final long categoryId, final boolean withAvailability); @Override Set<Category> getChildCategoriesRecursive(final long categoryId); @Override Set<Long> getAllCategoryIds(final Collection<String> guids); @Override List<Long> getChildCategoriesRecursiveIds(final long categoryId); @Override List<Long> getChildCategoriesRecursiveIdsAndLinkIds(final long categoryId); @Override List<Category> findCategories(final int start, final int offset, final String sort, final boolean sortDescending, final Map<String, List> filter); @Override int findCategoryCount(final Map<String, List> filter); @Override List<Long> getCategoryIdAndLinkId(final long categoryId); @Override boolean isCategoryHasSubcategory(final long topCategoryId, final long subCategoryId); @Override Category getById(final long pk); @Override Long findCategoryIdBySeoUri(final String seoUri); @Override Long findCategoryIdByGUID(final String guid); @Override String findSeoUriByCategoryId(final Long categoryId); @Override Category findCategoryIdBySeoUriOrGuid(final String seoUriOrGuid); @Override List<Category> findByProductId(final long productId); CategoryService getSelf();  }