return resourceLimitResponse;
}
@Override
public ResourceCountResponse createResourceCountResponse(ResourceCount resourceCount) {
ResourceCountResponse resourceCountResponse = new ResourceCountResponse();
if (resourceCount.getResourceOwnerType() == ResourceOwnerType.Account) {
Account accountTemp = ApiDBUtils.findAccountById(resourceCount.getOwnerId());
if (accountTemp != null) {
populateAccount(resourceCountResponse, accountTemp.getId());
populateDomain(resourceCountResponse, accountTemp.getDomainId());
}
} else if (resourceCount.getResourceOwnerType() == ResourceOwnerType.Domain) {
populateDomain(resourceCountResponse, resourceCount.getOwnerId());
}
resourceCountResponse.setResourceType(Integer.valueOf(resourceCount.getType().getOrdinal()).toString());
resourceCountResponse.setResourceCount(resourceCount.getCount());
resourceCountResponse.setObjectName("resourcecount");
return resourceCountResponse;
}