class ProductCartService extends WebService {

   @PreAuthorize("hasRole('ROLE_DOWNLOAD')")
   @Transactional(readOnly = true, propagation = Propagation.REQUIRED)
   public int countProductsInCart(String uuid)
         throws UserNotExistingException
   {
      ProductCart cart = getCartOfUser(uuid);
      if (cart == null)
      {
         return 0;
      }
      return cart.getProducts() == null ? 0 : cart.getProducts().size();
   }

}