class ResourceManager {

  public List<? extends Resource> getAvailableResources(String accountId)
      throws NotFoundException, ServerException {
    final Account account = accountManager.getById(accountId);
    final AvailableResourcesProvider availableResourcesProvider =
        accountTypeToAvailableResourcesProvider.get(account.getType());

    if (availableResourcesProvider == null) {
      return defaultAvailableResourcesProvider.getAvailableResources(accountId);
    }

    return availableResourcesProvider.getAvailableResources(accountId);
  }

  @Inject public  ResourceManager(
      ResourceAggregator resourceAggregator,
      Set<ResourcesProvider> resourcesProviders,
      Set<ResourceUsageTracker> usageTrackers,
      AccountManager accountManager,
      Map<String, AvailableResourcesProvider> accountTypeToAvailableResourcesProvider,
      DefaultAvailableResourcesProvider defaultAvailableResourcesProvider);

}