@Override public void removeProductImage(ProductImage productImage) throws ServiceException { if (cacheManager.getTreeCache() == null) { throw new ServiceException( "CmsImageFileManagerInfinispan has a null cacheManager.getTreeCache()"); } try { StringBuilder nodePath = new StringBuilder(); nodePath .append(productImage.getProduct().getMerchantStore().getCode()) .append(Constants.SLASH) .append(productImage.getProduct().getSku()); Node<String, Object> productNode = this.getNode(nodePath.toString()); productNode.remove(productImage.getProductImage()); } catch (Exception e) { throw new ServiceException(e); } finally { } }
@Override public OutputContentFile getProductImage(ProductImage productImage) throws ServiceException { return getProductImage( productImage.getProduct().getMerchantStore().getCode(), productImage.getProduct().getSku(), productImage.getProductImage()); }