public class RatingActivityStreamFilter extends Object implements ActivityStreamFilter
The different queries this filter can handle are defined in the RatingActivityStreamFilter.QueryType
enum.
Modifier and Type | Class and Description |
---|---|
static class |
RatingActivityStreamFilter.QueryType |
Modifier and Type | Field and Description |
---|---|
static String |
ACTOR_PARAMETER |
static String |
ASPECT_PARAMETER |
static String |
CONTEXT_PARAMETER |
static String |
ID |
static String |
QUERY_TYPE_PARAMETER |
static String |
RATING_PARAMETER |
static String |
TARGET_OBJECT_PARAMETER |
Constructor and Description |
---|
RatingActivityStreamFilter() |
Modifier and Type | Method and Description |
---|---|
String |
getId()
Returns the id of this
ActivityStreamFilter . |
void |
handleNewActivity(ActivityStreamService activityStreamService,
Activity activity)
Called by the
ActivityStreamService when a new Activity is stored. |
void |
handleRemovedActivities(ActivityStreamService activityStreamService,
ActivitiesList activities)
Called by the
ActivityStreamService before removing the given activities . |
void |
handleRemovedActivities(ActivityStreamService activityStreamService,
Collection<Serializable> activityIds)
Deprecated.
|
void |
handleRemovedActivityReply(ActivityStreamService activityStreamService,
Activity activity,
ActivityReply activityReply)
Called by the
ActivityStreamService before removing the given activityReply . |
boolean |
isInterestedIn(Activity activity)
Returns
true if this ActivityStreamFilter is interested in the given activity ,
false otherwise. |
ActivitiesList |
query(ActivityStreamService activityStreamService,
Map<String,Serializable> parameters,
long offset,
long limit)
Returns the list of activities filtered by the given parameters.
|
protected void |
removeAllRatingActivitiesFor(ActivityStreamService activityStreamService,
Collection<String> activityObjects) |
public static final String ID
public static final String QUERY_TYPE_PARAMETER
public static final String TARGET_OBJECT_PARAMETER
public static final String ASPECT_PARAMETER
public static final String ACTOR_PARAMETER
public static final String RATING_PARAMETER
public static final String CONTEXT_PARAMETER
public RatingActivityStreamFilter()
public String getId()
ActivityStreamFilter
ActivityStreamFilter
.getId
in interface ActivityStreamFilter
public boolean isInterestedIn(Activity activity)
ActivityStreamFilter
true
if this ActivityStreamFilter
is interested in the given activity
,
false
otherwise.isInterestedIn
in interface ActivityStreamFilter
public void handleNewActivity(ActivityStreamService activityStreamService, Activity activity)
ActivityStreamFilter
ActivityStreamService
when a new Activity
is stored.
The given activity
must not be modified.
handleNewActivity
in interface ActivityStreamFilter
@Deprecated public void handleRemovedActivities(ActivityStreamService activityStreamService, Collection<Serializable> activityIds)
ActivityStreamFilter
ActivityStreamService
before removing the activities referenced by the given
activityIds
.handleRemovedActivities
in interface ActivityStreamFilter
public void handleRemovedActivities(ActivityStreamService activityStreamService, ActivitiesList activities)
ActivityStreamFilter
ActivityStreamService
before removing the given activities
.handleRemovedActivities
in interface ActivityStreamFilter
public void handleRemovedActivityReply(ActivityStreamService activityStreamService, Activity activity, ActivityReply activityReply)
ActivityStreamFilter
ActivityStreamService
before removing the given activityReply
.handleRemovedActivityReply
in interface ActivityStreamFilter
protected void removeAllRatingActivitiesFor(ActivityStreamService activityStreamService, Collection<String> activityObjects)
public ActivitiesList query(ActivityStreamService activityStreamService, Map<String,Serializable> parameters, long offset, long limit)
ActivityStreamFilter
query
in interface ActivityStreamFilter
activityStreamService
- the main ActivityStreamService
parameters
- this query parameters.offset
- the offset (starting at 0) into the list of activities.limit
- the maximum number of activities to retrieve, or 0 for all of them.Copyright © 2015 Nuxeo SA. All rights reserved.