package com.google.gerrit.httpd.raw;

import com.google.common.cache.Cache;

import java.nio.file.FileSystem;
import java.nio.file.Path;

class WarDocServlet extends ResourceServlet {
  private static final long serialVersionUID = 1L;

  private final FileSystem warFs;

  WarDocServlet(Cache<Path, Resource> cache, FileSystem warFs) {
    super(cache, false);
    this.warFs = warFs;
  }

  @Override
  protected Path getResourcePath(String pathInfo) {
    return warFs.getPath("/Documentation/" + pathInfo);
  }
}
