class ApplicationController {

  @RequestMapping(
      value = "/{mvnGroup:.+}/{artifact:.+}/{version:.+}/deps",
      method = RequestMethod.GET,
      produces = {"application/json;charset=UTF-8"})
  @JsonView(Views.Default.class)
  public ResponseEntity<List<Dependency>> getDependencies(
      @PathVariable String mvnGroup,
      @PathVariable String artifact,
      @PathVariable String version,
      @ApiIgnore @RequestHeader(value = Constants.HTTP_SPACE_HEADER, required = false)
          String space) {

    Space s = null;
    try {
      s = this.spaceRepository.getSpace(space);
    } catch (Exception e) {
      log.error("Error retrieving space: " + e);
      return new ResponseEntity<List<Dependency>>(HttpStatus.NOT_FOUND);
    }
    try {
      final StopWatch sw =
          new StopWatch(
                  "Query dependencies for application: "
                      + mvnGroup
                      + ":"
                      + artifact
                      + ":"
                      + version)
              .start();

      final List<Dependency> deps = depRepository.findByGAV(mvnGroup, artifact, version, s);

      for (Dependency dep : deps) {
        dep.setTotalTracedExecConstructCount(
            this.traceRepository.countTracesOfExecConstructLibrary(
                dep.getApp(), dep.getLib().getDigest()));
        dep.setTotalReachExecConstructCount(
            this.cidRepository.countReachableExecConstructsLibrary(dep));
      }
      sw.stop();
      return new ResponseEntity<List<Dependency>>(deps, HttpStatus.OK);
    } catch (EntityNotFoundException enfe) {
      return new ResponseEntity<List<Dependency>>(HttpStatus.NOT_FOUND);
    }
  }

  @Autowired  ApplicationController(
      ApplicationRepository appRepository,
      GoalExecutionRepository gexeRepository,
      DependencyRepository depRepository,
      TracesRepository traceRepository,
      LibraryRepository libRepository,
      PathRepository pathRepository,
      BugRepository bugRepository,
      SpaceRepository tokenRepository,
      ConstructIdRepository cidRepository,
      AffectedLibraryRepository affLibRepository,
      TenantRepository tenantRepository,
      V_AppVulndepRepository appVulDepRepository,
      ApplicationExporter appExporter,
      Filter cacheFilter);

}