/** {@inheritDoc} */ public String getDynamicContentBody( final String contentUri, final long shopId, final String locale, final Map<String, Object> context) { if (StringUtils.isBlank(contentUri)) { return null; } final Shop shop = shopService.getById(shopId); if (shop == null) { return null; } final String shopContentUri = shop.getCode().concat("_").concat(contentUri); final Long shopSpecificContentId = contentService.findContentIdBySeoUri(shopContentUri); if (shopSpecificContentId != null && shopService.getShopContentIds(shopId).contains(shopSpecificContentId)) { return contentService.getDynamicContentBody(shopSpecificContentId, locale, context); } final Long contentId = contentService.findContentIdBySeoUri(contentUri); if (contentId != null && shopService.getShopContentIds(shopId).contains(contentId)) { return contentService.getDynamicContentBody(contentId, locale, context); } return null; }
/** {@inheritDoc} */ public String getDynamicContentBody( final long contentId, final long shopId, final String locale, final Map<String, Object> context) { if (contentId > 0L && shopService.getShopContentIds(shopId).contains(contentId)) { return contentService.getDynamicContentBody(contentId, locale, context); } return null; }