|
||||||||||
| 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)
|
|
| 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 params)
|
void |
addDocumentActivityEvent(java.lang.String streamName,
com.xpn.xwiki.api.Document doc,
java.lang.String type,
int priority,
java.lang.String title)
|
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 params)
|
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 params)
|
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)
Returns the latest events recorded for the given stream name and wiki space name |
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)
Returns the latest events recorded for the given stream name and user name |
com.sun.syndication.feed.synd.SyndFeed |
getFeed(java.util.List<ActivityEvent> events)
|
com.sun.syndication.feed.synd.SyndFeed |
getFeed(java.util.List<ActivityEvent> events,
java.lang.String suffix)
|
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)
|
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)
|
com.sun.syndication.feed.synd.SyndEntry |
getFeedEntry(ActivityEvent event)
|
com.sun.syndication.feed.synd.SyndEntry |
getFeedEntry(ActivityEvent event,
java.lang.String suffix)
|
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 |
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)
|
java.lang.String |
getFeedOutput(com.sun.syndication.feed.synd.SyndFeed feed,
java.lang.String type)
|
java.lang.String |
getStreamName(java.lang.String spaceName)
|
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,
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. |
protected java.util.List<ActivityEvent> |
unwrapEvents(java.util.List<ActivityEvent> events)
|
protected java.util.List<ActivityEvent> |
wrapEvents(java.util.List<ActivityEvent> events)
|
| 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)
PluginApi.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
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
public void addActivityEvent(java.lang.String streamName,
java.lang.String type,
java.lang.String title,
java.util.List params)
throws ActivityStreamException
params - a list of up to 5 "free" String parameters that will be associated with the
event
ActivityStreamExceptionaddActivityEvent(String, String, String)
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
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
priority - the priority for this event. see
ActivityEventPriority
ActivityStreamExceptionaddDocumentActivityEvent(String, Document, String, String)
public void deleteActivityEvents(java.util.List<ActivityEvent> evs)
throws ActivityStreamException
evs - the events to be deleted
ActivityStreamException
public void deleteActivityEvent(ActivityEvent event)
throws ActivityStreamException
event - the event to delete from database
ActivityStreamException
public void addDocumentActivityEvent(java.lang.String streamName,
com.xpn.xwiki.api.Document doc,
java.lang.String type,
java.lang.String title,
java.util.List params)
throws ActivityStreamException
params - a list of up to 5 "free" String parameters that will be associated with the
event
ActivityStreamExceptionaddDocumentActivityEvent(String, Document, String, String)
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 params)
throws ActivityStreamException
ActivityStreamExceptionaddDocumentActivityEvent(String, Document, String, int, String),
addDocumentActivityEvent(String, Document, String, String, List)
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
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
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
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
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
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 for
ActivityStreamExceptiongetEvents(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 for
ActivityStreamExceptiongetEvents(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 for
ActivityStreamExceptiongetEvents(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
ActivityStreamExceptiongetEventsForSpace(String, boolean, int, int),
getEvents(String, boolean, int, int)
public java.util.List<ActivityEvent> getEventsForUser(java.lang.String streamName,
java.lang.String user,
boolean filter,
int nb,
int start)
throws ActivityStreamException
ActivityStreamExceptiongetEventsForUser(String, boolean, int, int),
getEvents(String, boolean, int, int)protected java.util.List<ActivityEvent> wrapEvents(java.util.List<ActivityEvent> events)
protected java.util.List<ActivityEvent> unwrapEvents(java.util.List<ActivityEvent> events)
public com.sun.syndication.feed.synd.SyndEntry getFeedEntry(ActivityEvent event)
public com.sun.syndication.feed.synd.SyndEntry getFeedEntry(ActivityEvent event,
java.lang.String suffix)
public com.sun.syndication.feed.synd.SyndFeed getFeed(java.util.List<ActivityEvent> events)
public com.sun.syndication.feed.synd.SyndFeed getFeed(java.util.List<ActivityEvent> events,
java.lang.String suffix)
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)
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)
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)
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)
public java.lang.String getFeedOutput(com.sun.syndication.feed.synd.SyndFeed feed,
java.lang.String type)
public java.lang.String getStreamName(java.lang.String spaceName)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||