Interface ActivityStream
- All Superinterfaces:
ActivityCollection
Provides an abstraction of an activity stream. The stream is a collection of activities that usually belong to the
same underlying stream. The stream is bound to the jcr session requesting the stream and therefor subject to
access control.
-
Field Summary
Fields inherited from interface com.adobe.granite.activitystreams.ActivityCollection
EMPTY -
Method Summary
Modifier and TypeMethodDescriptionAppends a new activity to this stream.voiddelete()Deletes this activity stream and all it's activities.Returns the id of the stream container, which is the userId for user streams and the document path for topic streams.Returns the container that this stream belongs to.getId()Returns the ID of this activity stream.getName()Returns the name of the stream.Returns the resource that this stream is bound to.getTitle()Returns the title of the stream.booleanChecks if this is a default stream.booleanDeprecated.since 0.0.8.Methods inherited from interface com.adobe.granite.activitystreams.ActivityCollection
getActivities
-
Method Details
-
getId
String getId()Returns the ID of this activity stream. Usually its path.- Returns:
- the id of this stream.
-
isDefaultUserStream
Deprecated.since 0.0.8. useisDefaultStream()instead.Checks if this is a default user stream.- Returns:
trueif this is the default user stream.
-
isDefaultStream
boolean isDefaultStream()Checks if this is a default stream.- Returns:
trueif this is the default stream.
-
getResource
Resource getResource()Returns the resource that this stream is bound to.- Returns:
- the stream resource
- Since:
- 0.0.10
-
getContainerResource
Resource getContainerResource()Returns the container that this stream belongs to.- Returns:
- the container resource.
-
getContainerId
String getContainerId()Returns the id of the stream container, which is the userId for user streams and the document path for topic streams.- Returns:
- the container id or
nullif the container id cannot be determined - Since:
- 0.0.12
-
getName
String getName()Returns the name of the stream.- Returns:
- the name
-
getTitle
String getTitle()Returns the title of the stream.- Returns:
- the title
- Since:
- 0.0.16
-
delete
Deletes this activity stream and all it's activities.- Throws:
ActivityException
-
append
Appends a new activity to this stream.- Parameters:
activity- the activity to write.- Returns:
- a new immutable activity object bound to this stream.
- Throws:
ActivityException- if an error occurs.
-