| Modifier and Type | Field and Description |
|---|---|
protected String |
feedSlug |
protected StreamRepository |
streamRepository |
protected String |
userId |
| Constructor and Description |
|---|
BaseFeed(StreamRepository streamRepository,
String feedSlug,
String userId)
Create a new feed using the given slug and user id.
|
| Modifier and Type | Method and Description |
|---|---|
void |
deleteActivity(String activityId)
Removes an activity from the feed.
|
void |
deleteActivityByForeignId(String foreignId)
Removes an activity from the feed.
|
void |
follow(String feedSlug,
String userId)
Follows the given target feed.
|
String |
getFeedId() |
String |
getFeedSlug() |
List<FeedFollow> |
getFollowers()
Lists the followers of the feed.
|
List<FeedFollow> |
getFollowers(FeedFilter filter)
Lists the followers of the feed using the given filter.
|
List<FeedFollow> |
getFollowing()
List the feeds which this feed is following.
|
List<FeedFollow> |
getFollowing(FeedFilter filter)
List the feeds which this feed is following using the give filter.
|
String |
getId() |
String |
getToken() |
String |
getUserId() |
<T extends BaseActivity> |
newAggregatedActivityService(Class<T> clazz)
Get mediator service to handle aggregated activities.
|
<T extends BaseActivity> |
newFlatActivityService(Class<T> clazz)
Get mediator service to handle aggregated activities.
|
<T extends BaseActivity> |
newNotificationActivityService(Class<T> clazz)
Get mediator service to handle aggregated activities.
|
<T extends BaseActivity> |
newUserActivityService(Class<T> clazz)
Get mediator service to handle aggregated activities.
|
void |
unfollow(String feedSlug,
String userId)
Unfollow the given target feed.
|
protected final StreamRepository streamRepository
protected final String feedSlug
protected final String userId
public BaseFeed(StreamRepository streamRepository, String feedSlug, String userId)
streamRepository - Provide data repository to perform actual operation on a given feed.
It must implement StreamRepository.feedSlug - userId - public void follow(String feedSlug, String userId) throws IOException, StreamClientException
Feedfollow in interface FeedfeedSlug - the slug of the target feed.IOExceptionStreamClientExceptionpublic void unfollow(String feedSlug, String userId) throws IOException, StreamClientException
Feedunfollow in interface FeedfeedSlug - the slug of the target feed.IOExceptionStreamClientExceptionpublic List<FeedFollow> getFollowers() throws IOException, StreamClientException
FeedgetFollowers in interface FeedIOExceptionStreamClientExceptionpublic List<FeedFollow> getFollowers(FeedFilter filter) throws IOException, StreamClientException
FeedgetFollowers in interface Feedfilter - Filter out the followers.IOExceptionStreamClientExceptionpublic List<FeedFollow> getFollowing() throws IOException, StreamClientException
FeedgetFollowing in interface FeedIOExceptionStreamClientExceptionpublic List<FeedFollow> getFollowing(FeedFilter filter) throws IOException, StreamClientException
FeedgetFollowing in interface Feedfilter - Filter out the list of following feeds.IOExceptionStreamClientExceptionpublic void deleteActivity(String activityId) throws IOException, StreamClientException
FeeddeleteActivity in interface FeedactivityId - the activity id to remove from this feed.IOExceptionStreamClientExceptionpublic void deleteActivityByForeignId(String foreignId) throws IOException, StreamClientException
FeeddeleteActivityByForeignId in interface FeedforeignId - the activity id to remove from this feed.IOExceptionStreamClientExceptionpublic <T extends BaseActivity> AggregatedActivityServiceImpl<T> newAggregatedActivityService(Class<T> clazz)
FeednewAggregatedActivityService in interface Feedclazz - Subtype of BaseActivity representing the activity type to handle.public <T extends BaseActivity> FlatActivityServiceImpl<T> newFlatActivityService(Class<T> clazz)
FeednewFlatActivityService in interface Feedclazz - Subtype of BaseActivity representing the activity type to handle.public <T extends BaseActivity> UserActivityServiceImpl<T> newUserActivityService(Class<T> clazz)
FeednewUserActivityService in interface Feedclazz - Subtype of BaseActivity representing the activity type to handle.public <T extends BaseActivity> NotificationActivityServiceImpl<T> newNotificationActivityService(Class<T> clazz)
FeednewNotificationActivityService in interface Feedclazz - Subtype of BaseActivity representing the activity type to handle.public String getFeedSlug()
public String getFeedId()
public String getUserId()
Copyright © 2015. All rights reserved.