obj.putObject("service")
.put("title", settings.getTitle());
JSONObj services = obj.putObject("services");
for (ServiceInfo service : geoServer.getServices()) {
JSONArr versions = services.putObject(service.getName())
.put("title", service.getTitle())
.putArray("versions");
for (Version ver : service.getVersions()) {
versions.add(ver.toString());
}
}
Catalog cat = geoServer.getCatalog();
obj.put("workspaces", cat.count(WorkspaceInfo.class, Filter.INCLUDE))
.put("layers", cat.count(LayerInfo.class, Filter.INCLUDE))
.put("maps", cat.count(LayerGroupInfo.class, Filter.INCLUDE));
JSONObj cache = obj.putObject("recent");
JSONArr recentMaps = cache.putArray("maps");
for (Ref ref : recent.list(LayerGroupInfo.class)) {
IO.ref(recentMaps.addObject(), ref);
}
return obj;
}