class MetaStoreRestApi {

  @GET
  @Path("/database/list")
  @SubmarineApi
  public Response listDatabases() {
    List<String> allDatabases;
    try {
      allDatabases = submarineMetaStore.getAllDatabases();
    } catch (MetaException e) {
      LOG.error(e.getMessage(), e);
      return new JsonResponse.Builder<String>(Response.Status.INTERNAL_SERVER_ERROR)
              .success(false).build();
    }
    return new JsonResponse.Builder<List<String>>(Response.Status.OK)
            .success(true).result(allDatabases).build();
  }

  @Inject public  MetaStoreRestApi();

}