private final String sonePrefix;
private final Map<String, Album> albums = new HashMap<String, Album>();
private final List<Album> topLevelAlbums = new ArrayList<Album>();
+ private final Map<String, Image> images = new HashMap<String, Image>();
public ConfigurationSoneParser(Configuration configuration, Sone sone) {
this.configuration = configuration;
.setHeight(height)
.update();
album.addImage(image);
+ images.put(image.getId(), image);
}
}
+ public Map<String, Image> getImages() {
+ return images;
+ }
+
private boolean albumAttributesAreInvalid(String albumId, String key,
String title, String description, Long creationTime,
Integer width, Integer height) {
/* load avatar. */
String avatarId = configuration.getStringValue(sonePrefix + "/Profile/Avatar").getValue(null);
if (avatarId != null) {
- profile.setAvatar(getImage(avatarId, false));
+ final Map<String, Image> images =
+ configurationSoneParser.getImages();
+ profile.setAvatar(images.get(avatarId));
}
/* load options. */