Add “isBlocked” property.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 18 Oct 2010 14:02:20 +0000 (16:02 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 18 Oct 2010 14:02:20 +0000 (16:02 +0200)
src/main/java/net/pterodactylus/sone/template/SoneAccessor.java

index b45e140..dc4c0ab 100644 (file)
@@ -56,6 +56,9 @@ public class SoneAccessor extends ReflectionAccessor {
                } else if (member.equals("isCurrent")) {
                        Sone currentSone = (Sone) dataProvider.getData("currentSone");
                        return currentSone.equals(sone);
+               } else if (member.equals("isBlocked")) {
+                       Sone currentSone = (Sone) dataProvider.getData("currentSone");
+                       return currentSone.isSoneBlocked(sone.getId());
                }
                return super.get(dataProvider, object, member);
        }