public class MiniMessageActivityStreamFilter extends Object implements ActivityStreamFilter
The different queries this filter can handle are defined in the
MiniMessageActivityStreamFilter.QueryType
enum.
Modifier and Type | Class and Description |
---|---|
static class |
MiniMessageActivityStreamFilter.QueryType |
Modifier and Type | Field and Description |
---|---|
static String |
ACTOR_PARAMETER |
static String |
ID |
static String |
QUERY_TYPE_PARAMETER |
static String |
RELATIONSHIP_KIND_PARAMETER |
static String |
TARGET_PARAMETER |
static String |
VERB |
Constructor and Description |
---|
MiniMessageActivityStreamFilter() |
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,
Collection<Serializable> activityIds)
Called by the
ActivityStreamService before removing the
activities referenced by the given activityIds . |
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.
|
public static final String ID
public static final String VERB
public static final String QUERY_TYPE_PARAMETER
public static final String ACTOR_PARAMETER
public static final String RELATIONSHIP_KIND_PARAMETER
public static final String TARGET_PARAMETER
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
public void handleRemovedActivities(ActivityStreamService activityStreamService, Collection<Serializable> activityIds)
ActivityStreamFilter
ActivityStreamService
before removing the
activities referenced by the given activityIds
.handleRemovedActivities
in interface ActivityStreamFilter
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 © 2011 Nuxeo SA. All Rights Reserved.