public AssetSourceImpl(
      ThreadLocale threadLocale,
      Map<String, AssetFactory> configuration,
      SymbolSource symbolSource,
      Logger logger,
      OperationTracker tracker,
      Request request) {
    this.configuration = configuration;
    this.threadLocale = threadLocale;
    this.symbolSource = symbolSource;
    this.logger = logger;
    this.tracker = tracker;
    this.request = request;

    Map<Class, AssetFactory> byResourceClass = CollectionFactory.newMap();

    for (Map.Entry<String, AssetFactory> e : configuration.entrySet()) {
      String prefix = e.getKey();
      AssetFactory factory = e.getValue();

      Resource rootResource = factory.getRootResource();

      byResourceClass.put(rootResource.getClass(), factory);

      prefixToRootResource.put(prefix, rootResource);
    }

    registry = StrategyRegistry.newInstance(AssetFactory.class, byResourceClass);
  }