public interface ActivityStream
Modifier and Type | Method and Description |
---|---|
void |
addActivityEvent(ActivityEvent event,
XWikiContext context)
Adding an activity event.
|
void |
addActivityEvent(String streamName,
String type,
String title,
List<String> params,
XWikiContext context)
Adding an activity event.
|
void |
addActivityEvent(String streamName,
String type,
String title,
XWikiContext context)
Adding an activity event.
|
void |
addDocumentActivityEvent(String streamName,
XWikiDocument doc,
String type,
int priority,
String title,
List<String> params,
XWikiContext context)
Adding an activity event.
|
void |
addDocumentActivityEvent(String streamName,
XWikiDocument doc,
String type,
int priority,
String title,
XWikiContext context)
Adding an activity event.
|
void |
addDocumentActivityEvent(String streamName,
XWikiDocument doc,
String type,
String title,
List<String> params,
XWikiContext context)
Adding an activity event.
|
void |
addDocumentActivityEvent(String streamName,
XWikiDocument doc,
String type,
String title,
XWikiContext context)
Adding an activity event.
|
void |
deleteActivityEvent(ActivityEvent event,
XWikiContext context)
Delete the given event from the database.
|
List<ActivityEvent> |
getEvents(boolean filter,
int nb,
int start,
XWikiContext context)
Get events from the activity stream.
|
List<ActivityEvent> |
getEvents(String streamName,
boolean filter,
int nb,
int start,
XWikiContext context)
Get events from a particular activity stream.
|
List<ActivityEvent> |
getEventsForSpace(String space,
boolean filter,
int nb,
int start,
XWikiContext context)
Get events from the activity stream of a space.
|
List<ActivityEvent> |
getEventsForSpace(String streamName,
String space,
boolean filter,
int nb,
int start,
XWikiContext context)
Get events from the given activity stream which happened in a particular space.
|
List<ActivityEvent> |
getEventsForUser(String user,
boolean filter,
int nb,
int start,
XWikiContext context)
Get events from the activity stream of a user.
|
List<ActivityEvent> |
getEventsForUser(String streamName,
String user,
boolean filter,
int nb,
int start,
XWikiContext context)
Get events from the given activity stream which have been fired by a particular user.
|
com.sun.syndication.feed.synd.SyndFeed |
getFeed(List<ActivityEvent> events,
String author,
String title,
String description,
String copyright,
String encoding,
String url,
String suffix,
XWikiContext context)
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,
XWikiContext context)
Get a feed from the given events.
|
com.sun.syndication.feed.synd.SyndFeed |
getFeed(List<ActivityEvent> events,
String suffix,
XWikiContext context)
Get a feed from the given events.
|
com.sun.syndication.feed.synd.SyndFeed |
getFeed(List<ActivityEvent> events,
XWikiContext context)
Get a feed from the given events.
|
com.sun.syndication.feed.synd.SyndEntry |
getFeedEntry(ActivityEvent event,
String suffix,
XWikiContext context)
Get the feed entry for the given event.
|
com.sun.syndication.feed.synd.SyndEntry |
getFeedEntry(ActivityEvent event,
XWikiContext context)
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,
String suffix,
XWikiContext context)
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,
XWikiContext context)
Get the string representation of a feed from the given events.
|
String |
getFeedOutput(com.sun.syndication.feed.synd.SyndFeed feed,
String type) |
List<ActivityEvent> |
getRelatedEvents(ActivityEvent event,
XWikiContext context)
Get events that have the same requestId as the event passed as parameter.
|
String |
getStreamName(String space,
XWikiContext context)
Transforms space reference into stream name.
|
void |
init(XWikiContext context)
Init method, must be called on plugin init.
|
List<Object[]> |
searchDailyPages(String optionalWhereClause,
int maxItems,
int startAt,
XWikiContext context)
Get unique pages with events sorted by date, grouped by days.
|
List<Object[]> |
searchDailyPages(String optionalWhereClause,
List<Object> parametersValues,
int maxItems,
int startAt,
XWikiContext context)
Get unique pages with events sorted by date, grouped by days.
|
List<ActivityEvent> |
searchEvents(String hql,
boolean filter,
boolean globalSearch,
int nb,
int start,
List<Object> parameterValues,
XWikiContext context)
Search events.
|
List<ActivityEvent> |
searchEvents(String hql,
boolean filter,
boolean globalSearch,
int nb,
int start,
XWikiContext context)
Search events.
|
List<ActivityEvent> |
searchEvents(String hql,
boolean filter,
int nb,
int start,
XWikiContext context)
Search events.
|
List<ActivityEvent> |
searchEvents(String fromHql,
String hql,
boolean filter,
boolean globalSearch,
int nb,
int start,
List<Object> parameterValues,
XWikiContext context)
Search events.
|
List<ActivityEvent> |
searchEvents(String fromHql,
String hql,
boolean filter,
boolean globalSearch,
int nb,
int start,
XWikiContext context)
Search events.
|
List<ActivityEvent> |
searchEvents(String fromHql,
String hql,
boolean filter,
int nb,
int start,
List<Object> parameterValues,
XWikiContext context)
Search events.
|
List<ActivityEvent> |
searchEvents(String fromHql,
String hql,
boolean filter,
int nb,
int start,
XWikiContext context)
Search events.
|
List<Object[]> |
searchUniquePages(String optionalWhereClause,
int maxItems,
int startAt,
XWikiContext context)
Get unique pages with events sorted by date.
|
List<Object[]> |
searchUniquePages(String optionalWhereClause,
List<Object> parametersValues,
int maxItems,
int startAt,
XWikiContext context)
Get unique pages with events sorted by date.
|
void init(XWikiContext context) throws XWikiException
context
- the XWiki contextXWikiException
- if the init of the activity stream failedString getStreamName(String space, XWikiContext context)
space
- the space local serialized reference to transformcontext
- the XWiki contextvoid addActivityEvent(ActivityEvent event, XWikiContext context) throws ActivityStreamException
event
- event to add to the streamcontext
- the XWiki contextActivityStreamException
- if the addition to the stream failsvoid addActivityEvent(String streamName, String type, String title, XWikiContext context) throws ActivityStreamException
streamName
- name of the stream to use for the additiontype
- type of the eventtitle
- title of the eventcontext
- the XWiki contextActivityStreamException
- if the addition to the stream failsvoid addActivityEvent(String streamName, String type, String title, List<String> params, XWikiContext context) throws ActivityStreamException
streamName
- name of the stream to use for the additiontype
- type of the eventtitle
- title of the eventparams
- parameters of the eventcontext
- the XWiki contextActivityStreamException
- if the addition to the stream failsvoid addDocumentActivityEvent(String streamName, XWikiDocument doc, String type, String title, XWikiContext context) throws ActivityStreamException
streamName
- name of the stream to use for the additiondoc
- which fired the eventtype
- type of the eventtitle
- title of the eventcontext
- the XWiki contextActivityStreamException
- if the addition to the stream failsvoid addDocumentActivityEvent(String streamName, XWikiDocument doc, String type, int priority, String title, XWikiContext context) throws ActivityStreamException
streamName
- name of the stream to use for the additiondoc
- which fired the eventtype
- type of the eventpriority
- priority of the eventtitle
- title of the eventcontext
- the XWiki contextActivityStreamException
- if the addition to the stream failsvoid addDocumentActivityEvent(String streamName, XWikiDocument doc, String type, String title, List<String> params, XWikiContext context) throws ActivityStreamException
streamName
- name of the stream to use for the additiondoc
- which fired the eventtype
- type of the eventtitle
- title of the eventparams
- parameters of the eventcontext
- the XWiki contextActivityStreamException
- if the addition to the stream failsvoid addDocumentActivityEvent(String streamName, XWikiDocument doc, String type, int priority, String title, List<String> params, XWikiContext context) throws ActivityStreamException
streamName
- name of the stream to use for the additiondoc
- which fired the eventtype
- type of the eventpriority
- priority of the eventtitle
- title of the eventparams
- parameters of the eventcontext
- the XWiki contextActivityStreamException
- if the addition to the stream failsvoid deleteActivityEvent(ActivityEvent event, XWikiContext context) throws ActivityStreamException
event
- the event to deletecontext
- the XWiki contextActivityStreamException
- if the delete of the event failsList<ActivityEvent> searchEvents(String hql, boolean filter, int nb, int start, XWikiContext context) throws ActivityStreamException
hql
- HQL where query statementfilter
- true if the events should be filtered by prioritynb
- number of events to retrievestart
- query offsetcontext
- the XWiki contextActivityStreamException
- if the search query failsList<ActivityEvent> searchEvents(String hql, boolean filter, boolean globalSearch, int nb, int start, XWikiContext context) throws ActivityStreamException
hql
- HQL where query statementfilter
- true if the events should be filtered by priorityglobalSearch
- true if the request must be performed on the main databasenb
- number of events to retrievestart
- query offsetcontext
- the XWiki contextActivityStreamException
- if the search query failsList<ActivityEvent> searchEvents(String hql, boolean filter, boolean globalSearch, int nb, int start, List<Object> parameterValues, XWikiContext context) throws ActivityStreamException
hql
- HQL where query statementfilter
- true if the events should be filtered by priorityglobalSearch
- true if the request must be performed on the main databasenb
- number of events to retrievestart
- query offsetparameterValues
- values of the parametrized querycontext
- the XWiki contextActivityStreamException
- if the search query failsList<ActivityEvent> searchEvents(String fromHql, String hql, boolean filter, int nb, int start, XWikiContext context) throws ActivityStreamException
fromHql
- HQL from query statementhql
- HQL where query statementfilter
- true if the events should be filtered by prioritynb
- number of events to retrievestart
- query offsetcontext
- the XWiki contextActivityStreamException
- if the search query failsList<ActivityEvent> searchEvents(String fromHql, String hql, boolean filter, boolean globalSearch, int nb, int start, XWikiContext context) throws ActivityStreamException
fromHql
- HQL from query statementhql
- HQL where query statementfilter
- true if the events should be filtered by priorityglobalSearch
- true if the request must be performed on the main databasenb
- number of events to retrievestart
- query offsetcontext
- the XWiki contextActivityStreamException
- if the search query failsList<ActivityEvent> searchEvents(String fromHql, String hql, boolean filter, int nb, int start, List<Object> parameterValues, XWikiContext context) throws ActivityStreamException
fromHql
- HQL from query statementhql
- HQL where query statementfilter
- true if the events should be filtered by prioritynb
- number of events to retrievestart
- query offsetparameterValues
- values of the parametrized querycontext
- the XWiki contextActivityStreamException
- if the search query failsList<ActivityEvent> searchEvents(String fromHql, String hql, boolean filter, boolean globalSearch, int nb, int start, List<Object> parameterValues, XWikiContext context) throws ActivityStreamException
fromHql
- HQL from query statementhql
- HQL where query statementfilter
- true if the events should be filtered by priorityglobalSearch
- true if the request must be performed on the main databasenb
- number of events to retrievestart
- query offsetparameterValues
- values of the parametrized querycontext
- the XWiki contextActivityStreamException
- if the search query failsList<ActivityEvent> getEvents(boolean filter, int nb, int start, XWikiContext context) throws ActivityStreamException
filter
- true if the events should be filtered by prioritynb
- number of events to retrievestart
- query offsetcontext
- the XWiki contextActivityStreamException
- if the retrieval failsList<ActivityEvent> getEventsForSpace(String space, boolean filter, int nb, int start, XWikiContext context) throws ActivityStreamException
space
- local serialized reference of the space to retrieve the events fromfilter
- true if the events should be filtered by prioritynb
- number of events to retrievestart
- query offsetcontext
- the XWiki contextActivityStreamException
- if the retrieval failsList<ActivityEvent> getEventsForUser(String user, boolean filter, int nb, int start, XWikiContext context) throws ActivityStreamException
user
- user to retrieve the events fromfilter
- true if the events should be filtered by prioritynb
- number of events to retrievestart
- query offsetcontext
- the XWiki contextActivityStreamException
- if the retrieval failsList<ActivityEvent> getEvents(String streamName, boolean filter, int nb, int start, XWikiContext context) throws ActivityStreamException
streamName
- name of the activity stream to retrieve the events fromfilter
- true if the events should be filtered by prioritynb
- number of events to retrievestart
- query offsetcontext
- the XWiki contextActivityStreamException
- if the retrieval failsList<ActivityEvent> getEventsForSpace(String streamName, String space, boolean filter, int nb, int start, XWikiContext context) throws ActivityStreamException
streamName
- name of the activity stream to retrieve the events fromspace
- local serialized reference of the space to retrieve the events fromfilter
- true if the events should be filtered by prioritynb
- number of events to retrievestart
- query offsetcontext
- the XWiki contextActivityStreamException
- if the retrieval failsList<ActivityEvent> getEventsForUser(String streamName, String user, boolean filter, int nb, int start, XWikiContext context) throws ActivityStreamException
streamName
- name of the activity stream to retrieve the events fromuser
- user to retrieve the events fromfilter
- true if the events should be filtered by prioritynb
- number of events to retrievestart
- query offsetcontext
- the XWiki contextActivityStreamException
- if the retrieval failscom.sun.syndication.feed.synd.SyndEntry getFeedEntry(ActivityEvent event, XWikiContext context)
event
- event to get the entry forcontext
- the XWiki contextcom.sun.syndication.feed.synd.SyndEntry getFeedEntry(ActivityEvent event, String suffix, XWikiContext context)
event
- event to get the entry forsuffix
- suffix to add to entry title and body stringscontext
- the XWiki contextcom.sun.syndication.feed.synd.SyndFeed getFeed(List<ActivityEvent> events, XWikiContext context)
events
- events to create the feed fromcontext
- the XWiki contextcom.sun.syndication.feed.synd.SyndFeed getFeed(List<ActivityEvent> events, String suffix, XWikiContext context)
events
- events to create the feed fromsuffix
- suffix to add to entries title and body stringscontext
- the XWiki contextcom.sun.syndication.feed.synd.SyndFeed getFeed(List<ActivityEvent> events, String author, String title, String description, String copyright, String encoding, String url, XWikiContext context)
events
- events to create the feed fromauthor
- author to set in the feed metadatatitle
- title to set in the feed metadatadescription
- description to set in the feed metadatacopyright
- copyright to set in the feed metadataencoding
- encoding to set in the feed metadataurl
- URL to set in the feed metadatacontext
- the XWiki contextcom.sun.syndication.feed.synd.SyndFeed getFeed(List<ActivityEvent> events, String author, String title, String description, String copyright, String encoding, String url, String suffix, XWikiContext context)
events
- events to create the feed fromauthor
- author to set in the feed metadatatitle
- title to set in the feed metadatadescription
- description to set in the feed metadatacopyright
- copyright to set in the feed metadataencoding
- encoding to set in the feed metadataurl
- URL to set in the feed metadatasuffix
- suffix to add to entries title and body stringscontext
- the XWiki contextString getFeedOutput(List<ActivityEvent> events, String author, String title, String description, String copyright, String encoding, String url, String type, XWikiContext context)
events
- events to create the feed fromauthor
- author to set in the feed metadatatitle
- title to set in the feed metadatadescription
- description to set in the feed metadatacopyright
- copyright to set in the feed metadataencoding
- encoding to set in the feed metadataurl
- URL to set in the feed metadatatype
- 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"context
- the XWiki contextString getFeedOutput(List<ActivityEvent> events, String author, String title, String description, String copyright, String encoding, String url, String type, String suffix, XWikiContext context)
events
- events to create the feed fromauthor
- author to set in the feed metadatatitle
- title to set in the feed metadatadescription
- description to set in the feed metadatacopyright
- copyright to set in the feed metadataencoding
- encoding to set in the feed metadataurl
- URL to set in the feed metadatatype
- 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 stringscontext
- the XWiki contextString getFeedOutput(com.sun.syndication.feed.synd.SyndFeed feed, String type)
feed
- the feed to get the string representation fortype
- 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"List<ActivityEvent> getRelatedEvents(ActivityEvent event, XWikiContext context) throws ActivityStreamException
event
- the event for which to look for related eventscontext
- the XWiki contextActivityStreamException
- if the retrieval failsList<Object[]> searchUniquePages(String optionalWhereClause, int maxItems, int startAt, XWikiContext context) throws ActivityStreamException
optionalWhereClause
- optional HQL where query statementmaxItems
- maximum number of documents to retrievestartAt
- query offsetcontext
- the XWiki contextActivityStreamException
- if the search failsList<Object[]> searchUniquePages(String optionalWhereClause, List<Object> parametersValues, int maxItems, int startAt, XWikiContext context) throws ActivityStreamException
optionalWhereClause
- optional HQL where query statementparametersValues
- values for the query parametersmaxItems
- maximum number of documents to retrievestartAt
- query offsetcontext
- the XWiki contextActivityStreamException
- if the search failsList<Object[]> searchDailyPages(String optionalWhereClause, int maxItems, int startAt, XWikiContext context) throws ActivityStreamException
optionalWhereClause
- optional HQL where query statementmaxItems
- maximum number of documents to retrievestartAt
- query offsetcontext
- the XWiki contextActivityStreamException
- if the search failsList<Object[]> searchDailyPages(String optionalWhereClause, List<Object> parametersValues, int maxItems, int startAt, XWikiContext context) throws ActivityStreamException
optionalWhereClause
- optional HQL where query statementparametersValues
- values for the query parametersmaxItems
- maximum number of documents to retrievestartAt
- query offsetcontext
- the XWiki contextActivityStreamException
- if the search failsCopyright © 2004–2017 XWiki. All rights reserved.