class ConanUrlIndexer extends ComponentSupport {

  public String updateAbsoluteUrls(final Context context,
                                   final Content content,
                                   final Repository repository) throws IOException
  {
    Map<String, URL> downloadUrlContents = readIndex(content.openInputStream());
    Map<String, String> remappedContents = new HashMap<>();

    State state = context.getAttributes().require(TokenMatcher.State.class);
    ConanCoords coords = OrientConanProxyHelper.convertFromState(state);

    for (Map.Entry<String, URL> entry : downloadUrlContents.entrySet()) {
      String fileName = entry.getKey();
      AssetKind assetKind = OrientConanProxyHelper.ASSET_KIND_FILENAMES.get(fileName);
      remappedContents.put(entry.getKey(), repository.getUrl() + "/" + getProxyAssetPath(coords, assetKind));
    }

    return MAPPER.writerWithDefaultPrettyPrinter().writeValueAsString(remappedContents);
  }

}