|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.xpn.xwiki.plugin.activitystream.impl.ActivityStreamImpl
public class ActivityStreamImpl
Default implementation for ActivityStream.
| Constructor Summary | |
|---|---|
ActivityStreamImpl()
|
|
| Method Summary | |
|---|---|
void |
addActivityEvent(ActivityEvent event,
com.xpn.xwiki.XWikiContext context)
Adding an activity event. |
void |
addActivityEvent(ActivityEvent event,
com.xpn.xwiki.doc.XWikiDocument doc,
com.xpn.xwiki.XWikiContext context)
|
void |
addActivityEvent(String streamName,
String type,
String title,
List<String> params,
com.xpn.xwiki.XWikiContext context)
Adding an activity event. |
void |
addActivityEvent(String streamName,
String type,
String title,
com.xpn.xwiki.XWikiContext context)
Adding an activity event. |
void |
addDocumentActivityEvent(String streamName,
com.xpn.xwiki.doc.XWikiDocument doc,
String type,
int priority,
String title,
List<String> params,
com.xpn.xwiki.XWikiContext context)
Adding an activity event. |
void |
addDocumentActivityEvent(String streamName,
com.xpn.xwiki.doc.XWikiDocument doc,
String type,
int priority,
String title,
com.xpn.xwiki.XWikiContext context)
Adding an activity event. |
void |
addDocumentActivityEvent(String streamName,
com.xpn.xwiki.doc.XWikiDocument doc,
String type,
String title,
List<String> params,
com.xpn.xwiki.XWikiContext context)
Adding an activity event. |
void |
addDocumentActivityEvent(String streamName,
com.xpn.xwiki.doc.XWikiDocument doc,
String type,
String title,
com.xpn.xwiki.XWikiContext context)
Adding an activity event. |
void |
deleteActivityEvent(ActivityEvent event,
com.xpn.xwiki.XWikiContext context)
Delete the given event from the database. |
List<org.xwiki.observation.event.Event> |
getEvents()
|
List<ActivityEvent> |
getEvents(boolean filter,
int nb,
int start,
com.xpn.xwiki.XWikiContext context)
Get events from the activity stream. |
List<ActivityEvent> |
getEvents(String stream,
boolean filter,
int nb,
int start,
com.xpn.xwiki.XWikiContext context)
Get events from a particular activity stream. |
List<ActivityEvent> |
getEventsForSpace(String space,
boolean filter,
int nb,
int start,
com.xpn.xwiki.XWikiContext context)
Get events from the activity stream of a space. |
List<ActivityEvent> |
getEventsForSpace(String stream,
String space,
boolean filter,
int nb,
int start,
com.xpn.xwiki.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,
com.xpn.xwiki.XWikiContext context)
Get events from the activity stream of a user. |
List<ActivityEvent> |
getEventsForUser(String stream,
String user,
boolean filter,
int nb,
int start,
com.xpn.xwiki.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,
com.xpn.xwiki.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,
com.xpn.xwiki.XWikiContext context)
Get a feed from the given events. |
com.sun.syndication.feed.synd.SyndFeed |
getFeed(List<ActivityEvent> events,
String suffix,
com.xpn.xwiki.XWikiContext context)
Get a feed from the given events. |
com.sun.syndication.feed.synd.SyndFeed |
getFeed(List<ActivityEvent> events,
com.xpn.xwiki.XWikiContext context)
Get a feed from the given events. |
com.sun.syndication.feed.synd.SyndEntry |
getFeedEntry(ActivityEvent event,
String suffix,
com.xpn.xwiki.XWikiContext context)
Get the feed entry for the given event. |
com.sun.syndication.feed.synd.SyndEntry |
getFeedEntry(ActivityEvent event,
com.xpn.xwiki.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,
com.xpn.xwiki.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,
com.xpn.xwiki.XWikiContext context)
Get the string representation of a feed from the given events. |
String |
getFeedOutput(com.sun.syndication.feed.synd.SyndFeed feed,
String type)
|
String |
getName()
|
List<ActivityEvent> |
getRelatedEvents(ActivityEvent event,
com.xpn.xwiki.XWikiContext context)
Get events that have the same requestId as the event passed as parameter. |
String |
getStreamName(String space,
com.xpn.xwiki.XWikiContext context)
Tranforms space name into stream name. |
void |
init(com.xpn.xwiki.XWikiContext context)
Init method, must be called on plugin init. |
void |
onEvent(org.xwiki.observation.event.Event event,
Object source,
Object data)
|
List<Object[]> |
searchDailyPages(String optionalWhereClause,
int maxItems,
int startAt,
com.xpn.xwiki.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,
com.xpn.xwiki.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,
com.xpn.xwiki.XWikiContext context)
Search events. |
List<ActivityEvent> |
searchEvents(String hql,
boolean filter,
boolean globalSearch,
int nb,
int start,
com.xpn.xwiki.XWikiContext context)
Search events. |
List<ActivityEvent> |
searchEvents(String hql,
boolean filter,
int nb,
int start,
com.xpn.xwiki.XWikiContext context)
Search events. |
List<ActivityEvent> |
searchEvents(String fromHql,
String hql,
boolean filter,
boolean globalSearch,
int nb,
int start,
List<Object> parameterValues,
com.xpn.xwiki.XWikiContext context)
Search events. |
List<ActivityEvent> |
searchEvents(String fromHql,
String hql,
boolean filter,
boolean globalSearch,
int nb,
int start,
com.xpn.xwiki.XWikiContext context)
Search events. |
List<ActivityEvent> |
searchEvents(String fromHql,
String hql,
boolean filter,
int nb,
int start,
List<Object> parameterValues,
com.xpn.xwiki.XWikiContext context)
Search events. |
List<ActivityEvent> |
searchEvents(String fromHql,
String hql,
boolean filter,
int nb,
int start,
com.xpn.xwiki.XWikiContext context)
Search events. |
List<Object[]> |
searchUniquePages(String optionalWhereClause,
int maxItems,
int startAt,
com.xpn.xwiki.XWikiContext context)
Get unique pages with events sorted by date. |
List<Object[]> |
searchUniquePages(String optionalWhereClause,
List<Object> parametersValues,
int maxItems,
int startAt,
com.xpn.xwiki.XWikiContext context)
Get unique pages with events sorted by date. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ActivityStreamImpl()
| Method Detail |
|---|
public void init(com.xpn.xwiki.XWikiContext context)
throws com.xpn.xwiki.XWikiException
init in interface ActivityStreamcontext - the XWiki context
com.xpn.xwiki.XWikiException - if the init of the activity stream failed
public String getStreamName(String space,
com.xpn.xwiki.XWikiContext context)
getStreamName in interface ActivityStreamspace - space to transformcontext - the XWiki context
public void addActivityEvent(ActivityEvent event,
com.xpn.xwiki.XWikiContext context)
throws ActivityStreamException
addActivityEvent in interface ActivityStreamevent - event to add to the streamcontext - the XWiki context
ActivityStreamException - if the addition to the stream fails
public void addActivityEvent(ActivityEvent event,
com.xpn.xwiki.doc.XWikiDocument doc,
com.xpn.xwiki.XWikiContext context)
throws ActivityStreamException
ActivityStreamException
public void addActivityEvent(String streamName,
String type,
String title,
com.xpn.xwiki.XWikiContext context)
throws ActivityStreamException
addActivityEvent in interface ActivityStreamstreamName - name of the stream to use for the additiontype - type of the eventtitle - title of the eventcontext - the XWiki context
ActivityStreamException - if the addition to the stream fails
public void addActivityEvent(String streamName,
String type,
String title,
List<String> params,
com.xpn.xwiki.XWikiContext context)
throws ActivityStreamException
addActivityEvent in interface ActivityStreamstreamName - name of the stream to use for the additiontype - type of the eventtitle - title of the eventparams - parameters of the eventcontext - the XWiki context
ActivityStreamException - if the addition to the stream fails
public void addDocumentActivityEvent(String streamName,
com.xpn.xwiki.doc.XWikiDocument doc,
String type,
String title,
com.xpn.xwiki.XWikiContext context)
throws ActivityStreamException
addDocumentActivityEvent in interface ActivityStreamstreamName - name of the stream to use for the additiondoc - which fired the eventtype - type of the eventtitle - title of the eventcontext - the XWiki context
ActivityStreamException - if the addition to the stream fails
public void addDocumentActivityEvent(String streamName,
com.xpn.xwiki.doc.XWikiDocument doc,
String type,
int priority,
String title,
com.xpn.xwiki.XWikiContext context)
throws ActivityStreamException
addDocumentActivityEvent in interface ActivityStreamstreamName - 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 context
ActivityStreamException - if the addition to the stream fails
public void addDocumentActivityEvent(String streamName,
com.xpn.xwiki.doc.XWikiDocument doc,
String type,
String title,
List<String> params,
com.xpn.xwiki.XWikiContext context)
throws ActivityStreamException
addDocumentActivityEvent in interface ActivityStreamstreamName - 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 context
ActivityStreamException - if the addition to the stream fails
public void addDocumentActivityEvent(String streamName,
com.xpn.xwiki.doc.XWikiDocument doc,
String type,
int priority,
String title,
List<String> params,
com.xpn.xwiki.XWikiContext context)
throws ActivityStreamException
addDocumentActivityEvent in interface ActivityStreamstreamName - 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 context
ActivityStreamException - if the addition to the stream fails
public void deleteActivityEvent(ActivityEvent event,
com.xpn.xwiki.XWikiContext context)
throws ActivityStreamException
deleteActivityEvent in interface ActivityStreamevent - the event to deletecontext - the XWiki context
ActivityStreamException - if the delete of the event fails
public List<ActivityEvent> searchEvents(String hql,
boolean filter,
int nb,
int start,
com.xpn.xwiki.XWikiContext context)
throws ActivityStreamException
searchEvents in interface ActivityStreamhql - HQL where query statementfilter - true if the events should be filtered by prioritynb - number of events to retrievestart - query offsetcontext - the XWiki context
ActivityStreamException - if the search query fails
public List<ActivityEvent> searchEvents(String hql,
boolean filter,
boolean globalSearch,
int nb,
int start,
com.xpn.xwiki.XWikiContext context)
throws ActivityStreamException
searchEvents in interface ActivityStreamhql - 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 context
ActivityStreamException - if the search query fails
public List<ActivityEvent> searchEvents(String hql,
boolean filter,
boolean globalSearch,
int nb,
int start,
List<Object> parameterValues,
com.xpn.xwiki.XWikiContext context)
throws ActivityStreamException
searchEvents in interface ActivityStreamhql - 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 context
ActivityStreamException - if the search query fails
public List<ActivityEvent> searchEvents(String fromHql,
String hql,
boolean filter,
int nb,
int start,
com.xpn.xwiki.XWikiContext context)
throws ActivityStreamException
searchEvents in interface ActivityStreamfromHql - 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 context
ActivityStreamException - if the search query fails
public List<ActivityEvent> searchEvents(String fromHql,
String hql,
boolean filter,
boolean globalSearch,
int nb,
int start,
com.xpn.xwiki.XWikiContext context)
throws ActivityStreamException
searchEvents in interface ActivityStreamfromHql - 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 context
ActivityStreamException - if the search query fails
public List<ActivityEvent> searchEvents(String fromHql,
String hql,
boolean filter,
int nb,
int start,
List<Object> parameterValues,
com.xpn.xwiki.XWikiContext context)
throws ActivityStreamException
searchEvents in interface ActivityStreamfromHql - 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 context
ActivityStreamException - if the search query fails
public List<ActivityEvent> searchEvents(String fromHql,
String hql,
boolean filter,
boolean globalSearch,
int nb,
int start,
List<Object> parameterValues,
com.xpn.xwiki.XWikiContext context)
throws ActivityStreamException
searchEvents in interface ActivityStreamfromHql - 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 context
ActivityStreamException - if the search query fails
public List<ActivityEvent> getEvents(boolean filter,
int nb,
int start,
com.xpn.xwiki.XWikiContext context)
throws ActivityStreamException
getEvents in interface ActivityStreamfilter - true if the events should be filtered by prioritynb - number of events to retrievestart - query offsetcontext - the XWiki context
ActivityStreamException - if the retrieval fails
public List<ActivityEvent> getEventsForSpace(String space,
boolean filter,
int nb,
int start,
com.xpn.xwiki.XWikiContext context)
throws ActivityStreamException
getEventsForSpace in interface ActivityStreamspace - space to retrieve the events fromfilter - true if the events should be filtered by prioritynb - number of events to retrievestart - query offsetcontext - the XWiki context
ActivityStreamException - if the retrieval fails
public List<ActivityEvent> getEventsForUser(String user,
boolean filter,
int nb,
int start,
com.xpn.xwiki.XWikiContext context)
throws ActivityStreamException
getEventsForUser in interface ActivityStreamuser - user to retrieve the events fromfilter - true if the events should be filtered by prioritynb - number of events to retrievestart - query offsetcontext - the XWiki context
ActivityStreamException - if the retrieval fails
public List<ActivityEvent> getEvents(String stream,
boolean filter,
int nb,
int start,
com.xpn.xwiki.XWikiContext context)
throws ActivityStreamException
getEvents in interface ActivityStreamstream - 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 context
ActivityStreamException - if the retrieval fails
public List<ActivityEvent> getEventsForSpace(String stream,
String space,
boolean filter,
int nb,
int start,
com.xpn.xwiki.XWikiContext context)
throws ActivityStreamException
getEventsForSpace in interface ActivityStreamstream - name of the activity stream to retrieve the events fromspace - space to retrieve the events fromfilter - true if the events should be filtered by prioritynb - number of events to retrievestart - query offsetcontext - the XWiki context
ActivityStreamException - if the retrieval fails
public List<ActivityEvent> getEventsForUser(String stream,
String user,
boolean filter,
int nb,
int start,
com.xpn.xwiki.XWikiContext context)
throws ActivityStreamException
getEventsForUser in interface ActivityStreamstream - 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 context
ActivityStreamException - if the retrieval fails
public com.sun.syndication.feed.synd.SyndEntry getFeedEntry(ActivityEvent event,
com.xpn.xwiki.XWikiContext context)
getFeedEntry in interface ActivityStreamevent - event to get the entry forcontext - the XWiki context
public com.sun.syndication.feed.synd.SyndEntry getFeedEntry(ActivityEvent event,
String suffix,
com.xpn.xwiki.XWikiContext context)
getFeedEntry in interface ActivityStreamevent - event to get the entry forsuffix - suffix to add to entry title and body stringscontext - the XWiki context
public com.sun.syndication.feed.synd.SyndFeed getFeed(List<ActivityEvent> events,
com.xpn.xwiki.XWikiContext context)
getFeed in interface ActivityStreamevents - events to create the feed fromcontext - the XWiki context
public com.sun.syndication.feed.synd.SyndFeed getFeed(List<ActivityEvent> events,
String suffix,
com.xpn.xwiki.XWikiContext context)
getFeed in interface ActivityStreamevents - events to create the feed fromsuffix - suffix to add to entries title and body stringscontext - the XWiki context
public com.sun.syndication.feed.synd.SyndFeed getFeed(List<ActivityEvent> events,
String author,
String title,
String description,
String copyright,
String encoding,
String url,
com.xpn.xwiki.XWikiContext context)
getFeed in interface ActivityStreamevents - 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 context
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,
com.xpn.xwiki.XWikiContext context)
getFeed in interface ActivityStreamevents - 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 context
public String getFeedOutput(List<ActivityEvent> events,
String author,
String title,
String description,
String copyright,
String encoding,
String url,
String type,
com.xpn.xwiki.XWikiContext context)
getFeedOutput in interface ActivityStreamevents - 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 context
public String getFeedOutput(List<ActivityEvent> events,
String author,
String title,
String description,
String copyright,
String encoding,
String url,
String type,
String suffix,
com.xpn.xwiki.XWikiContext context)
getFeedOutput in interface ActivityStreamevents - 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 context
public String getFeedOutput(com.sun.syndication.feed.synd.SyndFeed feed,
String type)
getFeedOutput in interface ActivityStreamfeed - 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"
public List<org.xwiki.observation.event.Event> getEvents()
getEvents in interface org.xwiki.observation.EventListenerEventListener.getEvents()public String getName()
getName in interface org.xwiki.observation.EventListenerEventListener.getName()
public void onEvent(org.xwiki.observation.event.Event event,
Object source,
Object data)
onEvent in interface org.xwiki.observation.EventListenerEventListener.onEvent(org.xwiki.observation.event.Event, java.lang.Object,
java.lang.Object)
public List<ActivityEvent> getRelatedEvents(ActivityEvent event,
com.xpn.xwiki.XWikiContext context)
throws ActivityStreamException
getRelatedEvents in interface ActivityStreamevent - the event for which to look for related eventscontext - the XWiki context
ActivityStreamException - if the retrieval failsActivityStream.getRelatedEvents(ActivityEvent, XWikiContext)
public List<Object[]> searchUniquePages(String optionalWhereClause,
int maxItems,
int startAt,
com.xpn.xwiki.XWikiContext context)
throws ActivityStreamException
searchUniquePages in interface ActivityStreamoptionalWhereClause - optional HQL where query statementmaxItems - maximum number of documents to retrievestartAt - query offsetcontext - the XWiki context
ActivityStreamException - if the search failsActivityStream#searchUniquePages(String, int, int, XWikiContext))
public List<Object[]> searchUniquePages(String optionalWhereClause,
List<Object> parametersValues,
int maxItems,
int startAt,
com.xpn.xwiki.XWikiContext context)
throws ActivityStreamException
searchUniquePages in interface ActivityStreamoptionalWhereClause - optional HQL where query statementparametersValues - values for the query parametersmaxItems - maximum number of documents to retrievestartAt - query offsetcontext - the XWiki context
ActivityStreamException - if the search failsActivityStream#searchUniquePages(String, List, int, int, XWikiContext))
public List<Object[]> searchDailyPages(String optionalWhereClause,
int maxItems,
int startAt,
com.xpn.xwiki.XWikiContext context)
throws ActivityStreamException
searchDailyPages in interface ActivityStreamoptionalWhereClause - optional HQL where query statementmaxItems - maximum number of documents to retrievestartAt - query offsetcontext - the XWiki context
ActivityStreamException - if the search failsActivityStream#searchDailyPages(String, int, int, XWikiContext))
public List<Object[]> searchDailyPages(String optionalWhereClause,
List<Object> parametersValues,
int maxItems,
int startAt,
com.xpn.xwiki.XWikiContext context)
throws ActivityStreamException
searchDailyPages in interface ActivityStreamoptionalWhereClause - optional HQL where query statementparametersValues - values for the query parametersmaxItems - maximum number of documents to retrievestartAt - query offsetcontext - the XWiki context
ActivityStreamException - if the search failsActivityStream#searchDailyPages(String, List, int, int, XWikiContext))
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||