+ return sone.getStatus() == SoneStatus.downloading;
+ } else if (member.equals("new")) {
+ return !sone.isKnown();
+ } else if (member.equals("locked")) {
+ return core.isLocked(sone);
+ } else if (member.equals("lastUpdatedText")) {
+ return timeTextConverter.getTimeText(sone.getTime()).getL10nText();
+ } else if (member.equals("trust")) {
+ Sone currentSone = (Sone) templateContext.get("currentSone");
+ if (currentSone == null) {
+ return null;
+ }
+ Trust trust = sone.getIdentity().getTrust((OwnIdentity) currentSone.getIdentity());
+ logger.log(Level.FINEST, String.format("Trust for %s by %s: %s", sone, currentSone, trust));
+ if (trust == null) {
+ return new Trust(null, null, null);
+ }
+ return trust;
+ } else if (member.equals("allImages")) {
+ return from(asList(sone.getRootAlbum())).transformAndConcat(FLATTENER).transformAndConcat(IMAGES);
+ } else if (member.equals("albums")) {
+ return sone.getRootAlbum().getAlbums();