@Override
protected void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException {
PrintWriter writer = response.getWriter();
writer.println("<h1>Sites</h1>");
Portal portal = PortalRequest.getInstance().getPortal();
List<Site> sites = portal.findSites(new SiteQuery.Builder().withSiteTypes(SiteType.SITE).build());
for (Site site : sites) {
outputSite(site, writer);
}
writer.println("<h1>Spaces</h1>");
List<Site> spaces = portal.findSites(new SiteQuery.Builder().withSiteTypes(SiteType.SPACE).build());
for (Site space : spaces) {
outputSite(space, writer);
}
writer.println("<h1>Dashboard</h1>");
List<Site> dashboards = portal.findSites(new SiteQuery.Builder().withSiteTypes(SiteType.DASHBOARD).build());
for (Site dashboard : dashboards) {
outputSite(dashboard, writer);
}
}