diff options
author | Vitaly Takmazov | 2018-09-04 12:25:14 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2018-09-04 12:25:14 +0300 |
commit | 5c491c20f8201b1a90335899aa0f2eb72ed0daff (patch) | |
tree | dd4f7857f0a3745030e08eea999676a8cbc462be /juick-server/src/main/java/com/juick/server/api/activity/model | |
parent | b3d633cf0e8a6c35be9755702dedbea29ff3d897 (diff) |
ActivityStreams initial support
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.java | 18 | ||||
-rw-r--r-- | juick-server/src/main/java/com/juick/server/api/activity/model/Person.java | 47 |
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; + } +} |