String activityStreamName = (String) parameters.get(ACTIVITY_STREAM_PARAMETER);
if (activityStreamName == null) {
activityStreamName = DEFAULT_WALL_ACTIVITY_STREAM_NAME;
}
ActivityStream wallActivityStream = activityStreamService.getActivityStream(activityStreamName);
List<String> verbs = wallActivityStream.getVerbs();
EntityManager em = ((ActivityStreamServiceImpl) activityStreamService).getEntityManager();
Query query = em.createQuery("select activity from Activity activity "
+ "where activity.context = :context "
+ "and activity.verb in (:verbs) "