class ProductCartService extends WebService {

   @PreAuthorize("hasRole('ROLE_DOWNLOAD')")
   @Transactional(propagation = Propagation.REQUIRED)
   public void removeProductFromCart(String uuid, Long p_id)
         throws UserNotExistingException, ProductNotExistingException
   {
      Product product = productDao.read(p_id);
      if (product == null)
      {
         throw new ProductNotExistingException();
      }
      ProductCart cart = getCartOfUser(uuid);
      if ((cart == null) || (cart.getProducts() == null))
      {
         return;
      }
      Iterator<Product> iterator = cart.getProducts().iterator();
      while (iterator.hasNext())
      {
         if (iterator.next().equals(product))
         {
            iterator.remove();
         }
      }
      productCartDao.update(cart);
   }

}