public Image getImage(String id) { Image image = idToImageMap.get(id); if (image == null) { image = imageGalleryService.getImage(id); idToImageMap.put(id, image); } return image; }
public void saveAction() { for (Image image : idToImageMap.values()) { if (log.isDebugEnabled()) log.debug( "save image id=" + image.getId() + ", title=" + image.getTitle() + ", description=" + image.getDescription()); imageGalleryService.updateImage(image); } }
public List<Image> getImages() { return imageGalleryService.getImages(); }