@PathParam("style") String styleId) {
Site site = getSite(request);
// Search styles of current site
for (Module m : site.getModules()) {
ImageStyle style = m.getImageStyle(styleId);
if (style != null) {
ResponseBuilder response = Response.ok(style.toXml());
return response.build();
}
}
// Search global styles
for (ImageStyle style : styles) {
if (style.getIdentifier().equals(styleId)) {
ResponseBuilder response = Response.ok(style.toXml());
return response.build();
}
}
// The image style was not found