ResponseBuilder rb = Response.ok(new Viewable("referenced", this));
rb.header(HttpHeaders.CONTENT_TYPE, TEXT_HTML+"; charset=utf-8");
addCORSOrigin(servletContext, rb, headers);
return rb.build();
} else {
SiteManager referencedSiteManager = ContextHelper.getServiceFromContext(
SiteManager.class, servletContext);
JSONArray referencedSites = new JSONArray();
for (String site : referencedSiteManager.getSiteIds()) {
referencedSites.put(String.format("%sentityhub/site/%s/", uriInfo.getBaseUri(), site));
}
ResponseBuilder rb = Response.ok(referencedSites);
rb.header(HttpHeaders.CONTENT_TYPE, acceptable+"; charset=utf-8");
addCORSOrigin(servletContext, rb, headers);