aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main/java/com/juick/server/api/activity/model
diff options
context:
space:
mode:
Diffstat (limited to 'juick-server/src/main/java/com/juick/server/api/activity/model')
-rw-r--r--juick-server/src/main/java/com/juick/server/api/activity/model/ActivityObject.java18
-rw-r--r--juick-server/src/main/java/com/juick/server/api/activity/model/Person.java47
2 files changed, 65 insertions, 0 deletions
diff --git a/juick-server/src/main/java/com/juick/server/api/activity/model/ActivityObject.java b/juick-server/src/main/java/com/juick/server/api/activity/model/ActivityObject.java
new file mode 100644
index 00000000..bc682d2b
--- /dev/null
+++ b/juick-server/src/main/java/com/juick/server/api/activity/model/ActivityObject.java
@@ -0,0 +1,18 @@
+package com.juick.server.api.activity.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+public abstract class ActivityObject {
+
+ public abstract String getId();
+
+ public abstract String getType();
+
+ @JsonProperty("@context")
+ public String getContext() {
+ return CONTEXT_URI;
+ }
+
+ public final static String CONTEXT_URI = "https://www.w3.org/ns/activitystreams";
+ public final static String CONTENT_TYPE = "application/ld+json; profile=\"https://www.w3.org/ns/activitystreams\"";
+}
diff --git a/juick-server/src/main/java/com/juick/server/api/activity/model/Person.java b/juick-server/src/main/java/com/juick/server/api/activity/model/Person.java
new file mode 100644
index 00000000..031cd73b
--- /dev/null
+++ b/juick-server/src/main/java/com/juick/server/api/activity/model/Person.java
@@ -0,0 +1,47 @@
+package com.juick.server.api.activity.model;
+
+public class Person extends ActivityObject {
+
+ private String id;
+ private String name;
+ private String icon;
+ private String outbox;
+
+ @Override
+ public String getId() {
+ return id;
+ }
+
+ @Override
+ public String getType() {
+ return "Person";
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getIcon() {
+ return icon;
+ }
+
+ public void setIcon(String icon) {
+ this.icon = icon;
+ }
+
+ public String getOutbox() {
+ return outbox;
+ }
+
+ public void setOutbox(String outbox) {
+ this.outbox = outbox;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+}