Skip to content

Commit 1cceb81

Browse files
author
Julien Hervot de Mattos Vaz
committed
Remove unused createQuotaSummaryResponse declarations
1 parent 6e7eeb5 commit 1cceb81

File tree

2 files changed

+0
-51
lines changed

2 files changed

+0
-51
lines changed

plugins/database/quota/src/main/java/org/apache/cloudstack/api/response/QuotaResponseBuilder.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,6 @@ public interface QuotaResponseBuilder {
5555

5656
Pair<List<QuotaSummaryResponse>, Integer> createQuotaSummaryResponse(QuotaSummaryCmd cmd);
5757

58-
Pair<List<QuotaSummaryResponse>, Integer> createQuotaSummaryResponse(Boolean listAll);
59-
60-
Pair<List<QuotaSummaryResponse>, Integer> createQuotaSummaryResponse(Boolean listAll, String keyword, Long startIndex, Long pageSize);
61-
62-
Pair<List<QuotaSummaryResponse>, Integer> createQuotaSummaryResponse(String accountName, Long domainId);
63-
6458
QuotaBalanceResponse createQuotaLastBalanceResponse(List<QuotaBalanceVO> quotaBalance, Date startDate);
6559

6660
List<QuotaUsageVO> getQuotaUsage(QuotaStatementCmd cmd);

plugins/database/quota/src/main/java/org/apache/cloudstack/api/response/QuotaResponseBuilderImpl.java

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -307,51 +307,6 @@ protected QuotaSummaryResponse getQuotaSummaryResponse(QuotaSummaryVO summary) {
307307
return response;
308308
}
309309

310-
@Override
311-
public Pair<List<QuotaSummaryResponse>, Integer> createQuotaSummaryResponse(final String accountName, final Long domainId) {
312-
List<QuotaSummaryResponse> result = new ArrayList<QuotaSummaryResponse>();
313-
314-
if (accountName != null && domainId != null) {
315-
Account account = _accountDao.findActiveAccount(accountName, domainId);
316-
QuotaSummaryResponse qr = getQuotaSummaryResponse(account);
317-
result.add(qr);
318-
}
319-
320-
return new Pair<>(result, result.size());
321-
}
322-
323-
@Override
324-
public Pair<List<QuotaSummaryResponse>, Integer> createQuotaSummaryResponse(Boolean listAll) {
325-
return createQuotaSummaryResponse(listAll, null, null, null);
326-
}
327-
328-
@Override
329-
public Pair<List<QuotaSummaryResponse>, Integer> createQuotaSummaryResponse(Boolean listAll, final String keyword, final Long startIndex, final Long pageSize) {
330-
List<QuotaSummaryResponse> result = new ArrayList<QuotaSummaryResponse>();
331-
Integer count = 0;
332-
if (listAll) {
333-
Filter filter = new Filter(AccountVO.class, "accountName", true, startIndex, pageSize);
334-
Pair<List<AccountVO>, Integer> data = _accountDao.findAccountsLike(keyword, filter);
335-
count = data.second();
336-
for (final AccountVO account : data.first()) {
337-
QuotaSummaryResponse qr = getQuotaSummaryResponse(account);
338-
result.add(qr);
339-
}
340-
} else {
341-
Pair<List<QuotaAccountVO>, Integer> data = quotaAccountDao.listAllQuotaAccount(startIndex, pageSize);
342-
count = data.second();
343-
for (final QuotaAccountVO quotaAccount : data.first()) {
344-
AccountVO account = _accountDao.findById(quotaAccount.getId());
345-
if (account == null) {
346-
continue;
347-
}
348-
QuotaSummaryResponse qr = getQuotaSummaryResponse(account);
349-
result.add(qr);
350-
}
351-
}
352-
return new Pair<>(result, count);
353-
}
354-
355310
protected QuotaSummaryResponse getQuotaSummaryResponse(final Account account) {
356311
Calendar[] period = quotaStatement.getCurrentStatementTime();
357312

0 commit comments

Comments
 (0)