@Override
  public Long getUserAvailableSize(UserVo userVo) throws BusinessException {
    Account account = accountService.findByLsUuid(userVo.getLsUuid());

    return Math.min(
        documentEntryService.getAvailableSize(account),
        documentEntryService.getUserMaxFileSize(account));
  }
 private DisplayableAccountOccupationEntryVo getAccountStats(User user) throws BusinessException {
   Long userAvailableQuota = documentEntryService.getAvailableSize(user);
   Long userTotalQuota = documentEntryService.getTotalSize(user);
   Long userUsedSize = 0L;
   for (Entry entry : user.getEntries()) {
     if (entry.getEntryType().equals(EntryType.DOCUMENT)) {
       userUsedSize += ((DocumentEntry) entry).getSize();
     }
   }
   DisplayableAccountOccupationEntryVo accountOccupation =
       new DisplayableAccountOccupationEntryVo(
           user.getFirstName(),
           user.getLastName(),
           user.getMail(),
           user.getAccountType(),
           userAvailableQuota,
           userTotalQuota,
           userUsedSize);
   return accountOccupation;
 }