|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.xpn.xwiki.api.Api
com.xpn.xwiki.plugin.PluginApi<ActivityStreamPlugin>
com.xpn.xwiki.plugin.activitystream.plugin.ActivityStreamPluginApi
public class ActivityStreamPluginApi
API for ActivityStreamPlugin.
| 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(java.lang.String streamName,
java.lang.String type,
java.lang.String title)
Records in database the a event built upon the passed parameters. |
void |
addActivityEvent(java.lang.String streamName,
java.lang.String type,
java.lang.String title,
java.util.List<java.lang.String> params)
Records in database an event built upon the passed document and other parameters. |
void |
addDocumentActivityEvent(java.lang.String streamName,
com.xpn.xwiki.api.Document doc,
java.lang.String type,
int priority,
java.lang.String title)
Records in database an event built upon the passed document and other parameters. |
void |
addDocumentActivityEvent(java.lang.String streamName,
com.xpn.xwiki.api.Document doc,
java.lang.String type,
int priority,
java.lang.String title,
java.util.List<java.lang.String> params)
Records in database an event built upon the passed document and other parameters. |
void |
addDocumentActivityEvent(java.lang.String streamName,
com.xpn.xwiki.api.Document doc,
java.lang.String type,
java.lang.String title)
Records in database an event built upon the passed document and other parameters. |
void |
addDocumentActivityEvent(java.lang.String streamName,
com.xpn.xwiki.api.Document doc,
java.lang.String type,
java.lang.String title,
java.util.List<java.lang.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(java.util.List<ActivityEvent> evs)
Delete the passed events from the database. |
protected ActivityStream |
getActivityStream()
|
java.util.List<ActivityEvent> |
getEvents(boolean filter,
int nb,
int start)
Return the latest recorded events. |
java.util.List<ActivityEvent> |
getEvents(java.lang.String streamName,
boolean filter,
int nb,
int start)
Return the latest events recorded for the given stream name. |
java.util.List<ActivityEvent> |
getEventsForSpace(java.lang.String space,
boolean filter,
int nb,
int start)
Return the latest recorded events for the given wiki space. |
java.util.List<ActivityEvent> |
getEventsForSpace(java.lang.String streamName,
java.lang.String space,
boolean filter,
int nb,
int start)
Return the latest events recorded for the given stream name in the given space. |
java.util.List<ActivityEvent> |
getEventsForUser(java.lang.String user,
boolean filter,
int nb,
int start)
Return the latest recorded events triggered by the given user. |
java.util.List<ActivityEvent> |
getEventsForUser(java.lang.String streamName,
java.lang.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(java.util.List<ActivityEvent> events)
Get a feed from the given events. |
com.sun.syndication.feed.synd.SyndFeed |
getFeed(java.util.List<ActivityEvent> events,
java.lang.String suffix)
Get a feed from the given events. |
com.sun.syndication.feed.synd.SyndFeed |
getFeed(java.util.List<ActivityEvent> events,
java.lang.String author,
java.lang.String title,
java.lang.String description,
java.lang.String copyright,
java.lang.String encoding,
java.lang.String url)
Get a feed from the given events. |
com.sun.syndication.feed.synd.SyndFeed |
getFeed(java.util.List<ActivityEvent> events,
java.lang.String author,
java.lang.String title,
java.lang.String description,
java.lang.String copyright,
java.lang.String encoding,
java.lang.String url,
java.lang.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,
java.lang.String suffix)
Get the feed entry for the given event. |
java.lang.String |
getFeedOutput(java.util.List<ActivityEvent> events,
java.lang.String author,
java.lang.String title,
java.lang.String description,
java.lang.String copyright,
java.lang.String encoding,
java.lang.String url,
java.lang.String type)
Get the string representation of a feed from the given events. |
java.lang.String |
getFeedOutput(java.util.List<ActivityEvent> events,
java.lang.String author,
java.lang.String title,
java.lang.String description,
java.lang.String copyright,
java.lang.String encoding,
java.lang.String url,
java.lang.String type,
java.lang.String suffix)
Get the string representation of a feed from the given events. |
java.lang.String |
getFeedOutput(com.sun.syndication.feed.synd.SyndFeed feed,
java.lang.String type)
Get the string representation of a feed from the given feed. |
java.util.List<ActivityEvent> |
getRelatedEvents(ActivityEvent event)
Get events that have the same requestId as the event passed as parameter. |
java.lang.String |
getStreamName(java.lang.String spaceName)
|
java.util.List<ActivityEvent> |
searchEvents(java.lang.String hql,
boolean filter,
boolean globalSearch,
int nb,
int start)
Search in database activity events matching the given hql query. |
java.util.List<ActivityEvent> |
searchEvents(java.lang.String hql,
boolean filter,
boolean globalSearch,
int nb,
int start,
java.util.List<java.lang.Object> parameterValues)
Search in database activity events matching the given hql query. |
java.util.List<ActivityEvent> |
searchEvents(java.lang.String hql,
boolean filter,
int nb,
int start)
Search in database activity events matching the given hql query. |
java.util.List<ActivityEvent> |
searchEvents(java.lang.String hql,
boolean filter,
int nb,
int start,
java.util.List<java.lang.Object> parameterValues)
Search in database activity events matching the given hql query. |
java.util.List<ActivityEvent> |
searchEvents(java.lang.String fromHql,
java.lang.String hql,
boolean filter,
boolean globalSearch,
int nb,
int start)
Search in database activity events matching the given hql query. |
java.util.List<ActivityEvent> |
searchEvents(java.lang.String fromHql,
java.lang.String hql,
boolean filter,
boolean globalSearch,
int nb,
int start,
java.util.List<java.lang.Object> parameterValues)
Search in database activity events matching the given hql query. |
java.util.List<ActivityEvent> |
searchEvents(java.lang.String fromHql,
java.lang.String hql,
boolean filter,
int nb,
int start)
Search in database activity events matching the given hql query. |
java.util.List<ActivityEvent> |
searchEvents(java.lang.String fromHql,
java.lang.String hql,
boolean filter,
int nb,
int start,
java.util.List<java.lang.Object> parameterValues)
Search in database activity events matching the given hql query. |
java.util.List<java.lang.Object[]> |
searchUniquePages(java.lang.String optionalWhereClause,
int maxItems,
int startAt)
Get unique page events sorted by date |
java.util.List<java.lang.Object[]> |
searchUniquePages(java.lang.String optionalWhereClause,
java.util.List<java.lang.Object> parametersValues,
int maxItems,
int startAt)
Get unique page events sorted by date |
| Methods inherited from class com.xpn.xwiki.plugin.PluginApi |
|---|
getInternalPlugin, getPlugin, getProtectedPlugin, setPlugin |
| Methods inherited from class com.xpn.xwiki.api.Api |
|---|
checkProgrammingRights, convert, convert, getXWikiContext, hasAccessLevel, hasAdminRights, hasProgrammingRights |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ActivityStreamPluginApi(ActivityStreamPlugin plugin,
com.xpn.xwiki.XWikiContext context)
plugin - plugin to wrapcontext - the XWiki contextPluginApi.PluginApi(XWikiPluginInterface, XWikiContext)| Method Detail |
|---|
protected ActivityStream getActivityStream()
ActivityStream component to use inside the API
public void addActivityEvent(ActivityEvent event)
throws ActivityStreamException
ActivityEvent event.
event - the event to record in databases
ActivityStreamException - if the event addition fails
public void addActivityEvent(java.lang.String streamName,
java.lang.String type,
java.lang.String title)
throws ActivityStreamException
streamName - the name of the stream to record the event fortype - the type of event. The type can be a value picked from the list of values defined in
ActivityEventType or any other Stringtitle - the event title
ActivityStreamException - if the event addition fails
public void addActivityEvent(java.lang.String streamName,
java.lang.String type,
java.lang.String title,
java.util.List<java.lang.String> params)
throws ActivityStreamException
streamName - name of the stream to use for the additiontype - type of the eventtitle - title of the eventparams - parameters of the event
ActivityStreamException - if the addition to the stream fails
public void addDocumentActivityEvent(java.lang.String streamName,
com.xpn.xwiki.api.Document doc,
java.lang.String type,
java.lang.String title)
throws ActivityStreamException
streamName - the name of the stream to add the event todoc - the document from which to retrieve document data for the eventtype - the type of event. (see addActivityEvent(String, String, String)title - the title of the event
ActivityStreamException - if the event addition fails
public void addDocumentActivityEvent(java.lang.String streamName,
com.xpn.xwiki.api.Document doc,
java.lang.String type,
int priority,
java.lang.String title)
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 event
ActivityStreamException - if the addition to the stream fails
public void deleteActivityEvents(java.util.List<ActivityEvent> evs)
throws ActivityStreamException
evs - the events to be deleted
ActivityStreamException - if the event deletion fails
public void deleteActivityEvent(ActivityEvent event)
throws ActivityStreamException
event - the event to delete from database
ActivityStreamException - if the event deletion fails
public void addDocumentActivityEvent(java.lang.String streamName,
com.xpn.xwiki.api.Document doc,
java.lang.String type,
java.lang.String title,
java.util.List<java.lang.String> params)
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 event
ActivityStreamException - if the addition to the stream fails
public void addDocumentActivityEvent(java.lang.String streamName,
com.xpn.xwiki.api.Document doc,
java.lang.String type,
int priority,
java.lang.String title,
java.util.List<java.lang.String> params)
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 event
ActivityStreamException - if the addition to the stream fails
public java.util.List<ActivityEvent> searchEvents(java.lang.String hql,
boolean filter,
int nb,
int start)
throws ActivityStreamException
hql - the "where" clause of the hql query to look events forfilter - if true, group the matched events by prioritynb - the number of events to retrievestart - the offset to start retrieving event at
ActivityEvent
objects.
ActivityStreamException - if the search query fails
public java.util.List<ActivityEvent> searchEvents(java.lang.String hql,
boolean filter,
boolean globalSearch,
int nb,
int start)
throws ActivityStreamException
hql - the "where" clause of the hql query to look events forfilter - if true, group the matched events by priorityglobalSearch - true if the request must be performed on the main databasenb - the number of events to retrievestart - the offset to start retrieving event at
ActivityEvent
objects.
ActivityStreamException - if the search query fails
public java.util.List<ActivityEvent> searchEvents(java.lang.String hql,
boolean filter,
int nb,
int start,
java.util.List<java.lang.Object> parameterValues)
throws ActivityStreamException
hql - the "where" clause of the hql query to look events forfilter - if true, group the matched events by prioritynb - the number of events to retrievestart - the offset to start retrieving event atparameterValues - list of parameters to insert in the query
ActivityEvent
objects.
ActivityStreamException - if the search query fails
public java.util.List<ActivityEvent> searchEvents(java.lang.String hql,
boolean filter,
boolean globalSearch,
int nb,
int start,
java.util.List<java.lang.Object> parameterValues)
throws ActivityStreamException
hql - the "where" clause of the hql query to look events forfilter - if true, group the matched events by priorityglobalSearch - true if the request must be performed on the main databasenb - the number of events to retrievestart - the offset to start retrieving event atparameterValues - list of parameters to insert in the query
ActivityEvent
objects.
ActivityStreamException - if the search query fails
public java.util.List<ActivityEvent> searchEvents(java.lang.String fromHql,
java.lang.String hql,
boolean filter,
int nb,
int start)
throws ActivityStreamException
fromHql - the "from" clause of the hql query to look events forhql - the "where" clause of the hql query to look events forfilter - if true, group the matched events by prioritynb - the number of events to retrievestart - the offset to start retrieving event at
ActivityEvent
objects.
ActivityStreamException - if the search query fails
public java.util.List<ActivityEvent> searchEvents(java.lang.String fromHql,
java.lang.String hql,
boolean filter,
boolean globalSearch,
int nb,
int start)
throws ActivityStreamException
fromHql - the "from" clause of the hql query to look events forhql - the "where" clause of the hql query to look events forfilter - if true, group the matched events by priorityglobalSearch - true if the request must be performed on the main databasenb - the number of events to retrievestart - the offset to start retrieving event at
ActivityEvent
objects.
ActivityStreamException - if the search query fails
public java.util.List<ActivityEvent> searchEvents(java.lang.String fromHql,
java.lang.String hql,
boolean filter,
int nb,
int start,
java.util.List<java.lang.Object> parameterValues)
throws ActivityStreamException
fromHql - the "from" clause of the hql query to look events forhql - the "where" clause of the hql query to look events forfilter - if true, group the matched events by prioritynb - the number of events to retrievestart - the offset to start retrieving event atparameterValues - list of parameters to insert in the query
ActivityEvent
objects.
ActivityStreamException - if the search query fails
public java.util.List<ActivityEvent> searchEvents(java.lang.String fromHql,
java.lang.String hql,
boolean filter,
boolean globalSearch,
int nb,
int start,
java.util.List<java.lang.Object> parameterValues)
throws ActivityStreamException
fromHql - the "from" clause of the hql query to look events forhql - the "where" clause of the hql query to look events forfilter - if true, group the matched events by priorityglobalSearch - true if the request must be performed on the main databasenb - the number of events to retrievestart - the offset to start retrieving event atparameterValues - list of parameters to insert in the query
ActivityEvent
objects.
ActivityStreamException - if the search query fails
public java.util.List<ActivityEvent> getEvents(boolean filter,
int nb,
int start)
throws ActivityStreamException
filter - if true, group the matched events by prioritynb - the number of events to retrievestart - the offset to start retrieving event at
ActivityStreamException - if the search query fails
public java.util.List<ActivityEvent> getEventsForSpace(java.lang.String space,
boolean filter,
int nb,
int start)
throws ActivityStreamException
space - the space to retrieve latest events forfilter - if true, group the matched events by prioritynb - the number of events to retrievestart - the offset to start retrieving event at
ActivityStreamException - if the search query failsgetEvents(boolean, int, int)
public java.util.List<ActivityEvent> getEventsForUser(java.lang.String user,
boolean filter,
int nb,
int start)
throws ActivityStreamException
user - the user to retrieve latest events forfilter - if true, group the matched events by prioritynb - the number of events to retrievestart - the offset to start retrieving event at
ActivityStreamException - if the search query failsgetEvents(boolean, int, int)
public java.util.List<ActivityEvent> getEvents(java.lang.String streamName,
boolean filter,
int nb,
int start)
throws ActivityStreamException
streamName - the name of the stream to retrieve latest events forfilter - if true, group the matched events by prioritynb - the number of events to retrievestart - the offset to start retrieving event at
ActivityStreamException - if the search query failsgetEvents(boolean, int, int)
public java.util.List<ActivityEvent> getEventsForSpace(java.lang.String streamName,
java.lang.String space,
boolean filter,
int nb,
int start)
throws ActivityStreamException
streamName - the name of the stream to retrieve latest events forspace - space in which the events have been firedfilter - if true, group the matched events by prioritynb - the number of events to retrievestart - the offset to start retrieving event at
ActivityStreamException - if the search query fails
public java.util.List<ActivityEvent> getEventsForUser(java.lang.String streamName,
java.lang.String user,
boolean filter,
int nb,
int start)
throws ActivityStreamException
streamName - the name of the stream to retrieve latest events foruser - context user at the time the events were firedfilter - if true, group the matched events by prioritynb - the number of events to retrievestart - the offset to start retrieving event at
ActivityStreamException - if the search query failspublic com.sun.syndication.feed.synd.SyndEntry getFeedEntry(ActivityEvent event)
event - event to get the entry for
public com.sun.syndication.feed.synd.SyndEntry getFeedEntry(ActivityEvent event,
java.lang.String suffix)
event - event to get the entry forsuffix - suffix to add to entry title and body strings
public com.sun.syndication.feed.synd.SyndFeed getFeed(java.util.List<ActivityEvent> events)
events - events to create the feed from
public com.sun.syndication.feed.synd.SyndFeed getFeed(java.util.List<ActivityEvent> events,
java.lang.String suffix)
events - events to create the feed fromsuffix - suffix to add to entries title and body strings
public com.sun.syndication.feed.synd.SyndFeed getFeed(java.util.List<ActivityEvent> events,
java.lang.String author,
java.lang.String title,
java.lang.String description,
java.lang.String copyright,
java.lang.String encoding,
java.lang.String url)
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 metadata
public com.sun.syndication.feed.synd.SyndFeed getFeed(java.util.List<ActivityEvent> events,
java.lang.String author,
java.lang.String title,
java.lang.String description,
java.lang.String copyright,
java.lang.String encoding,
java.lang.String url,
java.lang.String suffix)
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 strings
public java.lang.String getFeedOutput(java.util.List<ActivityEvent> events,
java.lang.String author,
java.lang.String title,
java.lang.String description,
java.lang.String copyright,
java.lang.String encoding,
java.lang.String url,
java.lang.String type)
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"
public java.lang.String getFeedOutput(java.util.List<ActivityEvent> events,
java.lang.String author,
java.lang.String title,
java.lang.String description,
java.lang.String copyright,
java.lang.String encoding,
java.lang.String url,
java.lang.String type,
java.lang.String suffix)
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 strings
public java.lang.String getFeedOutput(com.sun.syndication.feed.synd.SyndFeed feed,
java.lang.String type)
feed - the feed to get the string representation fromtype - 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 java.lang.String getStreamName(java.lang.String spaceName)
spaceName - the space for which the stream name must be get
public java.util.List<ActivityEvent> getRelatedEvents(ActivityEvent event)
throws ActivityStreamException
event - the event for which to look for related events
ActivityStreamException - if the retrieval failsActivityStream.getRelatedEvents(com.xpn.xwiki.plugin.activitystream.api.ActivityEvent, XWikiContext)
public java.util.List<java.lang.Object[]> searchUniquePages(java.lang.String optionalWhereClause,
int maxItems,
int startAt)
hql - HQL where query statementnb - number of events to retrievestart - query offset
ActivityStreamException - if the search query fails
public java.util.List<java.lang.Object[]> searchUniquePages(java.lang.String optionalWhereClause,
java.util.List<java.lang.Object> parametersValues,
int maxItems,
int startAt)
hql - HQL where query statementnb - number of events to retrievestart - query offset
ActivityStreamException - if the search query fails
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||