images = new LinkedList<Image>();
}
// Create Json response
JsonObject rsp = new JsonObject();
JsonArray imgList = new JsonArray();
JsonArray thumbList = new JsonArray();
// Get the image specific data
for (Image img : images) {
// Apply access control rules
try {
AccessController.checkAuthorization(img.getDirectory(), request, Action.browse, null);
JsonObject im = new JsonObject();
JsonObject th = new JsonObject();
im.addParameter(Configuration.urlParam, cfg.getImageRootUrl(request)
+ img.getDirectory().getPath() + "/" + Configuration.webImgDirName + "/" + img.getName());
imgList.addItem(im);
th.addParameter(Configuration.urlParam, cfg.getImageRootUrl(request)
+ img.getDirectory().getPath() + "/"
+ Configuration.thumbDirName + "/" + img.getName());
thumbList.addItem(th);
}
catch (AuthenticationException ex) {
// access not allowed, skip
}
}