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 {
ReferencedSiteManager referencedSiteManager = ContextHelper.getServiceFromContext(
ReferencedSiteManager.class, servletContext);
JSONArray referencedSites = new JSONArray();
for (String site : referencedSiteManager.getReferencedSiteIds()) {
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);