Package org.trellisldp.event.jsonb
Class ActivityStreamMessage
- java.lang.Object
-
- org.trellisldp.event.jsonb.ActivityStreamMessage
-
public class ActivityStreamMessage extends Object
A structure used for serializing an Event into an ActivityStream 2.0 JSON object.- See Also:
- Activity Streams 2.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ActivityStreamMessage.EventResource
The resource that is the object of this message.
-
Constructor Summary
Constructors Constructor Description ActivityStreamMessage()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ActivityStreamMessage
from(Event event)
Populate a ActivityStreamMessage from an Event.List<String>
getActor()
String
getContext()
String
getId()
String
getInbox()
ActivityStreamMessage.EventResource
getObject()
String
getPublished()
List<String>
getType()
-
-
-
Method Detail
-
getId
public String getId()
- Returns:
- the event identifier
-
getInbox
public String getInbox()
- Returns:
- the inbox assocated with the resource
-
getPublished
public String getPublished()
- Returns:
- the created date
-
getContext
public String getContext()
- Returns:
- the JSON-LD context
-
getObject
public ActivityStreamMessage.EventResource getObject()
- Returns:
- the resource that is the object of this message
-
from
public static ActivityStreamMessage from(Event event)
Populate a ActivityStreamMessage from an Event.- Parameters:
event
- The event- Returns:
- an ActivityStreamMessage
-
-