Ejemplo n.º 1
0
  @RequestMapping(method = RequestMethod.GET, value = "/tablasFuente/{id}/{tipo}")
  public ResponseEntity<EncapsuladorListSW<TablaFuenteDatosDto>> listaTablas(
      @PathVariable("id") Long id, @PathVariable("tipo") String tipo, HttpServletRequest request) {
    String path;

    if (tipo.equals(TiposFuente.CSV.getId())) path = getServicioConfiguracionGeneral().getPathCsv();
    else if (tipo.equals(TiposFuente.GML.getId()))
      path = getServicioConfiguracionGeneral().getPathGml();
    else if (tipo.equals(TiposFuente.SHAPEFILE.getId()))
      path = getServicioConfiguracionGeneral().getPathShapefile();
    else path = null;
    String realPath = getPathRealAplicacion(request, path);
    return new ResponseEntity<EncapsuladorListSW<TablaFuenteDatosDto>>(
        gestorCUFuente.listarTablasFuenteExterna(id, realPath), responseHeaders, HttpStatus.OK);
  }