Interface ActivityStream
-
- All Superinterfaces:
ActivityCollection
@ProviderType public interface ActivityStream extends 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
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description Activity
append(Activity activity)
Appends a new activity to this stream.void
delete()
Deletes this activity stream and all it's activities.String
getContainerId()
Returns the id of the stream container, which is the userId for user streams and the document path for topic streams.Resource
getContainerResource()
Returns the container that this stream belongs to.String
getId()
Returns the ID of this activity stream.String
getName()
Returns the name of the stream.Resource
getResource()
Returns the resource that this stream is bound to.String
getTitle()
Returns the title of the stream.boolean
isDefaultStream()
Checks if this is a default stream.boolean
isDefaultUserStream()
Deprecated.since 0.0.8.-
Methods inherited from interface com.adobe.granite.activitystreams.ActivityCollection
getActivities
-
-
-
-
Method Detail
-
getId
String getId()
Returns the ID of this activity stream. Usually its path.- Returns:
- the id of this stream.
-
isDefaultUserStream
@Deprecated boolean isDefaultUserStream()
Deprecated.since 0.0.8. useisDefaultStream()
instead.Checks if this is a default user stream.- Returns:
true
if this is the default user stream.
-
isDefaultStream
boolean isDefaultStream()
Checks if this is a default stream.- Returns:
true
if 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
null
if 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
void delete() throws ActivityException
Deletes this activity stream and all it's activities.- Throws:
ActivityException
-
append
Activity append(Activity activity) throws ActivityException
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.
-
-