com.xpn.xwiki.plugin.activitystream.plugin
Class ActivityStreamPluginApi

java.lang.Object
  extended by com.xpn.xwiki.api.Api
      extended by com.xpn.xwiki.plugin.PluginApi<ActivityStreamPlugin>
          extended by com.xpn.xwiki.plugin.activitystream.plugin.ActivityStreamPluginApi

public class ActivityStreamPluginApi
extends com.xpn.xwiki.plugin.PluginApi<ActivityStreamPlugin>

API for ActivityStreamPlugin.

Version:
$Id: 188b2aa54315eee72ece8f2834340e639b7fdcae $

Field Summary
 
Fields inherited from class com.xpn.xwiki.api.Api
context
 
Constructor Summary
ActivityStreamPluginApi(ActivityStreamPlugin plugin, com.xpn.xwiki.XWikiContext context)
          Constructor.
 
Method Summary
 void addActivityEvent(ActivityEvent event)
          Record in database the given ActivityEvent event.
 void addActivityEvent(String streamName, String type, String title)
          Records in database the a event built upon the passed parameters.
 void addActivityEvent(String streamName, String type, String title, List<String> params)
          Records in database an event built upon the passed document and other parameters.
 void addDocumentActivityEvent(String streamName, Document doc, String type, int priority, String title)
          Records in database an event built upon the passed document and other parameters.
 void addDocumentActivityEvent(String streamName, Document doc, String type, int priority, String title, List<String> params)
          Records in database an event built upon the passed document and other parameters.
 void addDocumentActivityEvent(String streamName, Document doc, String type, String title)
          Records in database an event built upon the passed document and other parameters.
 void addDocumentActivityEvent(String streamName, Document doc, String type, String title, List<String> params)
          Records in database an event built upon the passed document and other parameters.
 void deleteActivityEvent(ActivityEvent event)
          Delete the passed event form the database.
 void deleteActivityEvents(List<ActivityEvent> evs)
          Delete the passed events from the database.
protected  ActivityStream getActivityStream()
           
 List<ActivityEvent> getEvents(boolean filter, int nb, int start)
          Return the latest recorded events.
 List<ActivityEvent> getEvents(String streamName, boolean filter, int nb, int start)
          Return the latest events recorded for the given stream name.
 List<ActivityEvent> getEventsForSpace(String space, boolean filter, int nb, int start)
          Return the latest recorded events for the given wiki space.
 List<ActivityEvent> getEventsForSpace(String streamName, String space, boolean filter, int nb, int start)
          Return the latest events recorded for the given stream name in the given space.
 List<ActivityEvent> getEventsForUser(String user, boolean filter, int nb, int start)
          Return the latest recorded events triggered by the given user.
 List<ActivityEvent> getEventsForUser(String streamName, String user, boolean filter, int nb, int start)
          Return the latest events recorded for the given stream name and the given user.
 com.sun.syndication.feed.synd.SyndFeed getFeed(List<ActivityEvent> events)
          Get a feed from the given events.
 com.sun.syndication.feed.synd.SyndFeed getFeed(List<ActivityEvent> events, String suffix)
          Get a feed from the given events.
 com.sun.syndication.feed.synd.SyndFeed getFeed(List<ActivityEvent> events, String author, String title, String description, String copyright, String encoding, String url)
          Get a feed from the given events.
 com.sun.syndication.feed.synd.SyndFeed getFeed(List<ActivityEvent> events, String author, String title, String description, String copyright, String encoding, String url, String suffix)
          Get a feed from the given events.
 com.sun.syndication.feed.synd.SyndEntry getFeedEntry(ActivityEvent event)
          Get the feed entry for the given event.
 com.sun.syndication.feed.synd.SyndEntry getFeedEntry(ActivityEvent event, String suffix)
          Get the feed entry for the given event.
 String getFeedOutput(List<ActivityEvent> events, String author, String title, String description, String copyright, String encoding, String url, String type)
          Get the string representation of a feed from the given events.
 String getFeedOutput(List<ActivityEvent> events, String author, String title, String description, String copyright, String encoding, String url, String type, String suffix)
          Get the string representation of a feed from the given events.
 String getFeedOutput(com.sun.syndication.feed.synd.SyndFeed feed, String type)
          Get the string representation of a feed from the given feed.
 List<ActivityEvent> getRelatedEvents(ActivityEvent event)
          Get events that have the same requestId as the event passed as parameter.
 String getStreamName(String spaceName)
           
 List<Object[]> searchDailyPages(String optionalWhereClause, int maxItems, int startAt)
          Get unique pages with events sorted by date, grouped by days.
 List<Object[]> searchDailyPages(String optionalWhereClause, List<Object> parametersValues, int maxItems, int startAt)
          Get unique pages with events sorted by date, grouped by days.
 List<ActivityEvent> searchEvents(String hql, boolean filter, boolean globalSearch, int nb, int start)
          Search in database activity events matching the given hql query.
 List<ActivityEvent> searchEvents(String hql, boolean filter, boolean globalSearch, int nb, int start, List<Object> parameterValues)
          Search in database activity events matching the given hql query.
 List<ActivityEvent> searchEvents(String hql, boolean filter, int nb, int start)
          Search in database activity events matching the given hql query.
 List<ActivityEvent> searchEvents(String hql, boolean filter, int nb, int start, List<Object> parameterValues)
          Search in database activity events matching the given hql query.
 List<ActivityEvent> searchEvents(String fromHql, String hql, boolean filter, boolean globalSearch, int nb, int start)
          Search in database activity events matching the given hql query.
 List<ActivityEvent> searchEvents(String fromHql, String hql, boolean filter, boolean globalSearch, int nb, int start, List<Object> parameterValues)
          Search in database activity events matching the given hql query.
 List<ActivityEvent> searchEvents(String fromHql, String hql, boolean filter, int nb, int start)
          Search in database activity events matching the given hql query.
 List<ActivityEvent> searchEvents(String fromHql, String hql, boolean filter, int nb, int start, List<Object> parameterValues)
          Search in database activity events matching the given hql query.
 List<Object[]> searchUniquePages(String optionalWhereClause, int maxItems, int startAt)
          Get unique pages with events sorted by date.
 List<Object[]> searchUniquePages(String optionalWhereClause, List<Object> parametersValues, int maxItems, int startAt)
          Get unique pages with events sorted by date.
protected  List<ActivityEvent> unwrapEvents(List<ActivityEvent> events)
          Unwrap a list of events.
protected  List<ActivityEvent> wrapEvents(List<ActivityEvent> events)
          Wrap a list of events.
 
Methods inherited from class com.xpn.xwiki.plugin.PluginApi
getInternalPlugin, getProtectedPlugin, setPlugin
 
Methods inherited from class com.xpn.xwiki.api.Api
convert, convert, getXWikiContext, hasAccessLevel, hasAdminRights, hasProgrammingRights, hasWikiAdminRights
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActivityStreamPluginApi

public ActivityStreamPluginApi(ActivityStreamPlugin plugin,
                               com.xpn.xwiki.XWikiContext context)
Constructor.

Parameters:
plugin - plugin to wrap
context - the XWiki context
See Also:
PluginApi.PluginApi(XWikiPluginInterface, XWikiContext)
Method Detail

getActivityStream

protected ActivityStream getActivityStream()
Returns:
The ActivityStream component to use inside the API

addActivityEvent

public void addActivityEvent(ActivityEvent event)
                      throws ActivityStreamException
Record in database the given ActivityEvent event.

Parameters:
event - the event to record in databases
Throws:
ActivityStreamException - if the event addition fails

addActivityEvent

public void addActivityEvent(String streamName,
                             String type,
                             String title)
                      throws ActivityStreamException
Records in database the a event built upon the passed parameters.

Parameters:
streamName - the name of the stream to record the event for
type - the type of event. The type can be a value picked from the list of values defined in ActivityEventType or any other String
title - the event title
Throws:
ActivityStreamException - if the event addition fails

addActivityEvent

public void addActivityEvent(String streamName,
                             String type,
                             String title,
                             List<String> params)
                      throws ActivityStreamException
Records in database an event built upon the passed document and other parameters. The passed document is used to retrieve document-related data for the event : date, page name, database.

Parameters:
streamName - name of the stream to use for the addition
type - type of the event
title - title of the event
params - parameters of the event
Throws:
ActivityStreamException - if the addition to the stream fails

addDocumentActivityEvent

public void addDocumentActivityEvent(String streamName,
                                     Document doc,
                                     String type,
                                     String title)
                              throws ActivityStreamException
Records in database an event built upon the passed document and other parameters. The passed document is used to retrieve document-related data for the event : date, page name, database.

Parameters:
streamName - the name of the stream to add the event to
doc - the document from which to retrieve document data for the event
type - the type of event. (see addActivityEvent(String, String, String)
title - the title of the event
Throws:
ActivityStreamException - if the event addition fails

addDocumentActivityEvent

public void addDocumentActivityEvent(String streamName,
                                     Document doc,
                                     String type,
                                     int priority,
                                     String title)
                              throws ActivityStreamException
Records in database an event built upon the passed document and other parameters. The passed document is used to retrieve document-related data for the event : date, page name, database.

Parameters:
streamName - name of the stream to use for the addition
doc - which fired the event
type - type of the event
priority - priority of the event
title - title of the event
Throws:
ActivityStreamException - if the addition to the stream fails

deleteActivityEvents

public void deleteActivityEvents(List<ActivityEvent> evs)
                          throws ActivityStreamException
Delete the passed events from the database.

Parameters:
evs - the events to be deleted
Throws:
ActivityStreamException - if the event deletion fails

deleteActivityEvent

public void deleteActivityEvent(ActivityEvent event)
                         throws ActivityStreamException
Delete the passed event form the database.

Parameters:
event - the event to delete from database
Throws:
ActivityStreamException - if the event deletion fails

addDocumentActivityEvent

public void addDocumentActivityEvent(String streamName,
                                     Document doc,
                                     String type,
                                     String title,
                                     List<String> params)
                              throws ActivityStreamException
Records in database an event built upon the passed document and other parameters. The passed document is used to retrieve document-related data for the event : date, page name, database.

Parameters:
streamName - name of the stream to use for the addition
doc - which fired the event
type - type of the event
title - title of the event
params - parameters of the event
Throws:
ActivityStreamException - if the addition to the stream fails

addDocumentActivityEvent

public void addDocumentActivityEvent(String streamName,
                                     Document doc,
                                     String type,
                                     int priority,
                                     String title,
                                     List<String> params)
                              throws ActivityStreamException
Records in database an event built upon the passed document and other parameters. The passed document is used to retrieve document-related data for the event : date, page name, database.

Parameters:
streamName - name of the stream to use for the addition
doc - which fired the event
type - type of the event
priority - priority of the event
title - title of the event
params - parameters of the event
Throws:
ActivityStreamException - if the addition to the stream fails

searchEvents

public List<ActivityEvent> searchEvents(String hql,
                                        boolean filter,
                                        int nb,
                                        int start)
                                 throws ActivityStreamException
Search in database activity events matching the given hql query. Retrieved events are ordered by date descending.

Parameters:
hql - the "where" clause of the hql query to look events for
filter - if true, group the matched events by priority
nb - the number of events to retrieve
start - the offset to start retrieving event at
Returns:
a list of matching events, wrapped as ActivityEvent objects.
Throws:
ActivityStreamException - if the search query fails

searchEvents

public List<ActivityEvent> searchEvents(String hql,
                                        boolean filter,
                                        boolean globalSearch,
                                        int nb,
                                        int start)
                                 throws ActivityStreamException
Search in database activity events matching the given hql query. Retrieved events are ordered by date descending.

Parameters:
hql - the "where" clause of the hql query to look events for
filter - if true, group the matched events by priority
globalSearch - true if the request must be performed on the main database
nb - the number of events to retrieve
start - the offset to start retrieving event at
Returns:
a list of matching events, wrapped as ActivityEvent objects.
Throws:
ActivityStreamException - if the search query fails

searchEvents

public List<ActivityEvent> searchEvents(String hql,
                                        boolean filter,
                                        int nb,
                                        int start,
                                        List<Object> parameterValues)
                                 throws ActivityStreamException
Search in database activity events matching the given hql query. Retrieved events are ordered by date descending.

Parameters:
hql - the "where" clause of the hql query to look events for
filter - if true, group the matched events by priority
nb - the number of events to retrieve
start - the offset to start retrieving event at
parameterValues - list of parameters to insert in the query
Returns:
a list of matching events, wrapped as ActivityEvent objects.
Throws:
ActivityStreamException - if the search query fails

searchEvents

public List<ActivityEvent> searchEvents(String hql,
                                        boolean filter,
                                        boolean globalSearch,
                                        int nb,
                                        int start,
                                        List<Object> parameterValues)
                                 throws ActivityStreamException
Search in database activity events matching the given hql query. Retrieved events are ordered by date descending.

Parameters:
hql - the "where" clause of the hql query to look events for
filter - if true, group the matched events by priority
globalSearch - true if the request must be performed on the main database
nb - the number of events to retrieve
start - the offset to start retrieving event at
parameterValues - list of parameters to insert in the query
Returns:
a list of matching events, wrapped as ActivityEvent objects.
Throws:
ActivityStreamException - if the search query fails

searchEvents

public List<ActivityEvent> searchEvents(String fromHql,
                                        String hql,
                                        boolean filter,
                                        int nb,
                                        int start)
                                 throws ActivityStreamException
Search in database activity events matching the given hql query. Retrieved events are ordered by date descending.

Parameters:
fromHql - the "from" clause of the hql query to look events for
hql - the "where" clause of the hql query to look events for
filter - if true, group the matched events by priority
nb - the number of events to retrieve
start - the offset to start retrieving event at
Returns:
a list of matching events, wrapped as ActivityEvent objects.
Throws:
ActivityStreamException - if the search query fails

searchEvents

public List<ActivityEvent> searchEvents(String fromHql,
                                        String hql,
                                        boolean filter,
                                        boolean globalSearch,
                                        int nb,
                                        int start)
                                 throws ActivityStreamException
Search in database activity events matching the given hql query. Retrieved events are ordered by date descending.

Parameters:
fromHql - the "from" clause of the hql query to look events for
hql - the "where" clause of the hql query to look events for
filter - if true, group the matched events by priority
globalSearch - true if the request must be performed on the main database
nb - the number of events to retrieve
start - the offset to start retrieving event at
Returns:
a list of matching events, wrapped as ActivityEvent objects.
Throws:
ActivityStreamException - if the search query fails

searchEvents

public List<ActivityEvent> searchEvents(String fromHql,
                                        String hql,
                                        boolean filter,
                                        int nb,
                                        int start,
                                        List<Object> parameterValues)
                                 throws ActivityStreamException
Search in database activity events matching the given hql query. Retrieved events are ordered by date descending.

Parameters:
fromHql - the "from" clause of the hql query to look events for
hql - the "where" clause of the hql query to look events for
filter - if true, group the matched events by priority
nb - the number of events to retrieve
start - the offset to start retrieving event at
parameterValues - list of parameters to insert in the query
Returns:
a list of matching events, wrapped as ActivityEvent objects.
Throws:
ActivityStreamException - if the search query fails

searchEvents

public List<ActivityEvent> searchEvents(String fromHql,
                                        String hql,
                                        boolean filter,
                                        boolean globalSearch,
                                        int nb,
                                        int start,
                                        List<Object> parameterValues)
                                 throws ActivityStreamException
Search in database activity events matching the given hql query. Retrieved events are ordered by date descending.

Parameters:
fromHql - the "from" clause of the hql query to look events for
hql - the "where" clause of the hql query to look events for
filter - if true, group the matched events by priority
globalSearch - true if the request must be performed on the main database
nb - the number of events to retrieve
start - the offset to start retrieving event at
parameterValues - list of parameters to insert in the query
Returns:
a list of matching events, wrapped as ActivityEvent objects.
Throws:
ActivityStreamException - if the search query fails

getEvents

public List<ActivityEvent> getEvents(boolean filter,
                                     int nb,
                                     int start)
                              throws ActivityStreamException
Return the latest recorded events.

Parameters:
filter - if true, group the matched events by priority
nb - the number of events to retrieve
start - the offset to start retrieving event at
Returns:
the latest recorded events
Throws:
ActivityStreamException - if the search query fails

getEventsForSpace

public List<ActivityEvent> getEventsForSpace(String space,
                                             boolean filter,
                                             int nb,
                                             int start)
                                      throws ActivityStreamException
Return the latest recorded events for the given wiki space.

Parameters:
space - the space to retrieve latest events for
filter - if true, group the matched events by priority
nb - the number of events to retrieve
start - the offset to start retrieving event at
Returns:
the latest recorded events
Throws:
ActivityStreamException - if the search query fails
See Also:
getEvents(boolean, int, int)

getEventsForUser

public List<ActivityEvent> getEventsForUser(String user,
                                            boolean filter,
                                            int nb,
                                            int start)
                                     throws ActivityStreamException
Return the latest recorded events triggered by the given user.

Parameters:
user - the user to retrieve latest events for
filter - if true, group the matched events by priority
nb - the number of events to retrieve
start - the offset to start retrieving event at
Returns:
the latest recorded events triggered by the given user.
Throws:
ActivityStreamException - if the search query fails
See Also:
getEvents(boolean, int, int)

getEvents

public List<ActivityEvent> getEvents(String streamName,
                                     boolean filter,
                                     int nb,
                                     int start)
                              throws ActivityStreamException
Return the latest events recorded for the given stream name.

Parameters:
streamName - the name of the stream to retrieve latest events for
filter - if true, group the matched events by priority
nb - the number of events to retrieve
start - the offset to start retrieving event at
Returns:
the latest events recorded for the given stream name
Throws:
ActivityStreamException - if the search query fails
See Also:
getEvents(boolean, int, int)

getEventsForSpace

public List<ActivityEvent> getEventsForSpace(String streamName,
                                             String space,
                                             boolean filter,
                                             int nb,
                                             int start)
                                      throws ActivityStreamException
Return the latest events recorded for the given stream name in the given space.

Parameters:
streamName - the name of the stream to retrieve latest events for
space - space in which the events have been fired
filter - if true, group the matched events by priority
nb - the number of events to retrieve
start - the offset to start retrieving event at
Returns:
the latest events recorded for the given stream name
Throws:
ActivityStreamException - if the search query fails

getEventsForUser

public List<ActivityEvent> getEventsForUser(String streamName,
                                            String user,
                                            boolean filter,
                                            int nb,
                                            int start)
                                     throws ActivityStreamException
Return the latest events recorded for the given stream name and the given user.

Parameters:
streamName - the name of the stream to retrieve latest events for
user - context user at the time the events were fired
filter - if true, group the matched events by priority
nb - the number of events to retrieve
start - the offset to start retrieving event at
Returns:
the latest events recorded for the given stream name
Throws:
ActivityStreamException - if the search query fails

wrapEvents

protected List<ActivityEvent> wrapEvents(List<ActivityEvent> events)
Wrap a list of events.

Parameters:
events - events to wrap
Returns:
list of wrapped events

unwrapEvents

protected List<ActivityEvent> unwrapEvents(List<ActivityEvent> events)
Unwrap a list of events.

Parameters:
events - events to unwrap
Returns:
list of unwrapped events

getFeedEntry

public com.sun.syndication.feed.synd.SyndEntry getFeedEntry(ActivityEvent event)
Get the feed entry for the given event.

Parameters:
event - event to get the entry for
Returns:
the feed entry corresponding to the event

getFeedEntry

public com.sun.syndication.feed.synd.SyndEntry getFeedEntry(ActivityEvent event,
                                                            String suffix)
Get the feed entry for the given event.

Parameters:
event - event to get the entry for
suffix - suffix to add to entry title and body strings
Returns:
the feed entry corresponding to the event

getFeed

public com.sun.syndication.feed.synd.SyndFeed getFeed(List<ActivityEvent> events)
Get a feed from the given events.

Parameters:
events - events to create the feed from
Returns:
the feed entry corresponding to the given events

getFeed

public com.sun.syndication.feed.synd.SyndFeed getFeed(List<ActivityEvent> events,
                                                      String suffix)
Get a feed from the given events.

Parameters:
events - events to create the feed from
suffix - suffix to add to entries title and body strings
Returns:
the feed entry corresponding to the given events

getFeed

public com.sun.syndication.feed.synd.SyndFeed getFeed(List<ActivityEvent> events,
                                                      String author,
                                                      String title,
                                                      String description,
                                                      String copyright,
                                                      String encoding,
                                                      String url)
Get a feed from the given events.

Parameters:
events - events to create the feed from
author - author to set in the feed metadata
title - title to set in the feed metadata
description - description to set in the feed metadata
copyright - copyright to set in the feed metadata
encoding - encoding to set in the feed metadata
url - URL to set in the feed metadata
Returns:
the feed entry corresponding to the given events

getFeed

public com.sun.syndication.feed.synd.SyndFeed getFeed(List<ActivityEvent> events,
                                                      String author,
                                                      String title,
                                                      String description,
                                                      String copyright,
                                                      String encoding,
                                                      String url,
                                                      String suffix)
Get a feed from the given events.

Parameters:
events - events to create the feed from
author - author to set in the feed metadata
title - title to set in the feed metadata
description - description to set in the feed metadata
copyright - copyright to set in the feed metadata
encoding - encoding to set in the feed metadata
url - URL to set in the feed metadata
suffix - suffix to add to entries title and body strings
Returns:
the feed entry corresponding to the given events

getFeedOutput

public String getFeedOutput(List<ActivityEvent> events,
                            String author,
                            String title,
                            String description,
                            String copyright,
                            String encoding,
                            String url,
                            String type)
Get the string representation of a feed from the given events.

Parameters:
events - events to create the feed from
author - author to set in the feed metadata
title - title to set in the feed metadata
description - description to set in the feed metadata
copyright - copyright to set in the feed metadata
encoding - encoding to set in the feed metadata
url - URL to set in the feed metadata
type - the feed type (syntax) to use, null if none. It can be any version of RSS or Atom. Some possible values are "rss_1.0", "rss_2.0" and "atom_1.0"
Returns:
the feed entry corresponding to the given events

getFeedOutput

public String getFeedOutput(List<ActivityEvent> events,
                            String author,
                            String title,
                            String description,
                            String copyright,
                            String encoding,
                            String url,
                            String type,
                            String suffix)
Get the string representation of a feed from the given events.

Parameters:
events - events to create the feed from
author - author to set in the feed metadata
title - title to set in the feed metadata
description - description to set in the feed metadata
copyright - copyright to set in the feed metadata
encoding - encoding to set in the feed metadata
url - URL to set in the feed metadata
type - the feed type (syntax) to use, null if none. It can be any version of RSS or Atom. Some possible values are "rss_1.0", "rss_2.0" and "atom_1.0"
suffix - suffix to add to entries title and body strings
Returns:
the feed entry corresponding to the given events

getFeedOutput

public String getFeedOutput(com.sun.syndication.feed.synd.SyndFeed feed,
                            String type)
Get the string representation of a feed from the given feed.

Parameters:
feed - the feed to get the string representation from
type - the feed type (syntax) to use, null if none. It can be any version of RSS or Atom. Some possible values are "rss_1.0", "rss_2.0" and "atom_1.0"
Returns:
the feed entry corresponding to the given events

getStreamName

public String getStreamName(String spaceName)
Parameters:
spaceName - the space for which the stream name must be get
Returns:
The name of the event stream associated with the given space

getRelatedEvents

public List<ActivityEvent> getRelatedEvents(ActivityEvent event)
                                     throws ActivityStreamException
Get events that have the same requestId as the event passed as parameter. The provided event is also included in the returned list.

Parameters:
event - the event for which to look for related events
Returns:
a list of events
Throws:
ActivityStreamException - if the retrieval fails
See Also:
ActivityStream.getRelatedEvents(com.xpn.xwiki.plugin.activitystream.api.ActivityEvent, XWikiContext)

searchUniquePages

public List<Object[]> searchUniquePages(String optionalWhereClause,
                                        int maxItems,
                                        int startAt)
Get unique pages with events sorted by date. A document is returned at most once, regardless of the number of events.

Parameters:
hql - HQL where query statement
nb - number of events to retrieve
start - query offset
Returns:
matching pages with events
Throws:
ActivityStreamException - if the search query fails

searchUniquePages

public List<Object[]> searchUniquePages(String optionalWhereClause,
                                        List<Object> parametersValues,
                                        int maxItems,
                                        int startAt)
Get unique pages with events sorted by date. A document is returned at most once, regardless of the number of events.

Parameters:
hql - HQL where query statement
nb - number of events to retrieve
start - query offset
Returns:
matching pages with events
Throws:
ActivityStreamException - if the search query fails

searchDailyPages

public List<Object[]> searchDailyPages(String optionalWhereClause,
                                       int maxItems,
                                       int startAt)
Get unique pages with events sorted by date, grouped by days. A document is returned at most once per day, but might appear more than once if it has associated events in different days.

Parameters:
hql - HQL where query statement
nb - number of events to retrieve
start - query offset
Returns:
matching pages with events
Throws:
ActivityStreamException - if the search query fails

searchDailyPages

public List<Object[]> searchDailyPages(String optionalWhereClause,
                                       List<Object> parametersValues,
                                       int maxItems,
                                       int startAt)
Get unique pages with events sorted by date, grouped by days. A document is returned at most once per day, but might appear more than once if it has associated events in different days.

Parameters:
hql - HQL where query statement
nb - number of events to retrieve
start - query offset
Returns:
matching pages with events
Throws:
ActivityStreamException - if the search query fails


Copyright © 2004-2012 XWiki. All Rights Reserved.