String streamType = getStreamType();
if (FOR_ACTOR_STREAM_TYPE.equals(streamType)) {
Map<String, Serializable> parameters = new HashMap<String, Serializable>();
parameters.put(ACTOR_PARAMETER, getActor());
parameters.put(QUERY_TYPE_PARAMETER, ACTIVITY_STREAM_FOR_ACTOR);
ActivitiesList activities = activityStreamService.query(
UserActivityStreamFilter.ID, parameters,
getCurrentPageOffset(), pageSize);
nextOffset = offset + activities.size();
activities = activities.filterActivities(getCoreSession());
pageActivityMessages.addAll(activities.toActivityMessages(
getLocale(), getActivityLinkBuilderName()));
} else if (FROM_ACTOR_STREAM_TYPE.equals(streamType)) {
Map<String, Serializable> parameters = new HashMap<String, Serializable>();
parameters.put(ACTOR_PARAMETER, getActor());
parameters.put(QUERY_TYPE_PARAMETER, ACTIVITY_STREAM_FROM_ACTOR);
ActivitiesList activities = activityStreamService.query(
UserActivityStreamFilter.ID, parameters,
getCurrentPageOffset(), pageSize);
nextOffset = offset + activities.size();
activities = activities.filterActivities(getCoreSession());
pageActivityMessages.addAll(activities.toActivityMessages(
getLocale(), getActivityLinkBuilderName()));
} else {
log.error("Unknown stream type: " + streamType);
}