aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/trygvis/esper/testing/web/resource/BadgeJson.java
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2013-01-05 22:39:18 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2013-01-05 22:39:18 +0100
commit12606726c11efbbf7213b05284c94e28a1ae4b8e (patch)
tree415a400218f3bbaac4f13a43461446f64f74028c /src/main/java/io/trygvis/esper/testing/web/resource/BadgeJson.java
parentabf160e56be50781b0f78f3f938513ab6102809b (diff)
downloadesper-testing-12606726c11efbbf7213b05284c94e28a1ae4b8e.tar.gz
esper-testing-12606726c11efbbf7213b05284c94e28a1ae4b8e.tar.bz2
esper-testing-12606726c11efbbf7213b05284c94e28a1ae4b8e.tar.xz
esper-testing-12606726c11efbbf7213b05284c94e28a1ae4b8e.zip
o Including state in both badge and badge progress.
o Removing count from badge, inserting one badge per badge received.
Diffstat (limited to 'src/main/java/io/trygvis/esper/testing/web/resource/BadgeJson.java')
-rw-r--r--src/main/java/io/trygvis/esper/testing/web/resource/BadgeJson.java25
1 files changed, 19 insertions, 6 deletions
diff --git a/src/main/java/io/trygvis/esper/testing/web/resource/BadgeJson.java b/src/main/java/io/trygvis/esper/testing/web/resource/BadgeJson.java
index 8eea335..ded97ae 100644
--- a/src/main/java/io/trygvis/esper/testing/web/resource/BadgeJson.java
+++ b/src/main/java/io/trygvis/esper/testing/web/resource/BadgeJson.java
@@ -1,20 +1,33 @@
package io.trygvis.esper.testing.web.resource;
+import org.joda.time.*;
+
public class BadgeJson {
+ public final DateTime createdDate;
public final String name;
public final int level;
+ public final Integer progress;
+ public final Integer goal;
+
/**
- * Number of times this badge has been received.
+ * For completed badges.
*/
- public final int count;
- public final int progress;
- public final int goal;
+ public BadgeJson(DateTime createdDate, String name, int level) {
+ this.createdDate = createdDate;
+ this.name = name;
+ this.level = level;
+ this.progress = null;
+ this.goal = null;
+ }
- public BadgeJson(String name, int level, int count, int progress, int goal) {
+ /**
+ * For badges in progress.
+ */
+ public BadgeJson(DateTime createdDate, String name, int level, int progress, int goal) {
+ this.createdDate = createdDate;
this.name = name;
this.level = level;
- this.count = count;
this.progress = progress;
this.goal = goal;
}