r7436 - dumbhippo/trunk/server/src/com/dumbhippo/server/blocks
- From: commits mugshot org
- To: online-desktop-list gnome org
- Subject: r7436 - dumbhippo/trunk/server/src/com/dumbhippo/server/blocks
- Date: Fri, 18 Apr 2008 14:26:13 -0500 (CDT)
Author: marinaz
Date: 2008-04-18 14:26:12 -0500 (Fri, 18 Apr 2008)
New Revision: 7436
Modified:
dumbhippo/trunk/server/src/com/dumbhippo/server/blocks/AccountQuestionBlockView.java
Log:
Add an obligatory constructor that takes GroupBlockData to the AccountQuestionBlockView
Modified: dumbhippo/trunk/server/src/com/dumbhippo/server/blocks/AccountQuestionBlockView.java
===================================================================
--- dumbhippo/trunk/server/src/com/dumbhippo/server/blocks/AccountQuestionBlockView.java 2008-04-18 18:34:10 UTC (rev 7435)
+++ dumbhippo/trunk/server/src/com/dumbhippo/server/blocks/AccountQuestionBlockView.java 2008-04-18 19:26:12 UTC (rev 7436)
@@ -2,6 +2,7 @@
import com.dumbhippo.XmlBuilder;
import com.dumbhippo.persistence.Block;
+import com.dumbhippo.persistence.GroupBlockData;
import com.dumbhippo.persistence.UserBlockData;
import com.dumbhippo.server.views.Viewpoint;
@@ -25,6 +26,21 @@
}
}
+ public AccountQuestionBlockView(Viewpoint viewpoint, Block block, GroupBlockData gbd, boolean participated) {
+ super(viewpoint, block, gbd, participated);
+
+ for (AccountQuestion q : AccountQuestion.values()) {
+ if (q.ordinal() == block.getData3()) {
+ question = q;
+ break;
+ }
+ }
+
+ if (question == null) {
+ throw new RuntimeException("Unknown question value " + block.getData3());
+ }
+ }
+
public void populate(String answer, String linkParam) {
this.answer = answer;
this.linkParam = linkParam;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]