@@ -0,0 +1,1452 @@
+package com.rptools.controller;%0D%0A%0D%0Aimport com.google.common.collect.ImmutableMap;%0D%0Aimport com.google.protobuf.InvalidProtocolBufferException;%0D%0Aimport com.google.protobuf.util.JsonFormat;%0D%0Aimport com.rptools.table.RPTable;%0D%0Aimport com.rptools.table.TableReader;%0D%0Aimport lombok.extern.apachecommons.CommonsLog;%0D%0Aimport org.springframework.web.bind.annotation.RequestMapping;%0D%0Aimport org.springframework.web.bind.annotation.RequestMethod;%0D%0Aimport org.springframework.web.bind.annotation.RestController;%0D%0Aimport org.springframework.web.servlet.ModelAndView;%0D%0A%0D%0Aimport java.util.Map;%0D%0A%0D%0A@CommonsLog%0D%0A@RestController(%22TablesController%22)%0D%0A@RequestMapping(%22tables%22)%0D%0Apublic class TablesController %7B%0D%0A  private final TableReader tableReader;%0D%0A%0D%0A  public TablesController(TableReader tableReader) %7B%0D%0A    this.tableReader = tableReader;%0D%0A  %7D%0D%0A%0D%0A  @RequestMapping(method = RequestMethod.GET)%0D%0A  public ModelAndView main() %7B%0D%0A    return new ModelAndView(%22main%22);%0D%0A  %7D%0D%0A%0D%0A  @RequestMapping(value = %22list%22, method = RequestMethod.GET)%0D%0A  public Map%3CString, String%3E list() %7B%0D%0A    return ImmutableMap.of(%22data%22, serializeTable(tableReader.getTables()));%0D%0A  %7D%0D%0A%0D%0A  private String serializeTable(RPTable table) %7B%0D%0A    try %7B%0D%0A      return JsonFormat.printer().omittingInsignificantWhitespace().print(table);%0D%0A    %7D catch (InvalidProtocolBufferException e) %7B%0D%0A      log.error(%22Exception serializing RPTable object %22 + table.getName(), e);%0D%0A      return %22%22;%0D%0A    %7D%0D%0A  %7D%0D%0A%7D%0D%0A

Add list() endpoint to TablesController