|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.xpn.xwiki.plugin.activitystream.impl.ActivityEventImpl
public class ActivityEventImpl
| Field Summary | |
|---|---|
protected String |
application
Application which fired the event (as of august 2009 this application is always "xwiki"). |
protected String |
body
Body message of the event. |
protected Date |
date
Date the event occured. |
protected String |
eventId
ID. |
protected boolean |
hidden
True if the page which fired the event is marked as hidden, false otherwise. |
protected String |
page
Name of the document which fired the event, example: "Main.WebHome". |
protected String |
param1
Free param 1. |
protected String |
param2
Free param 2. |
protected String |
param3
Free param 3. |
protected String |
param4
Free param 4. |
protected String |
param5
Free param 5. |
protected Map<String,String> |
parameters
Named parameters. |
protected int |
priority
Priority. |
protected String |
requestId
Request ID. |
protected String |
space
Space in which the event occured, example: "Main". |
protected String |
stream
Stream the event belongs to. |
protected String |
title
Title of the event. |
protected String |
type
Type of the event, see ActivityEventType. |
protected String |
url
URL of the document which fired the event, example: "/xwiki/bin/view/Main/WebHome". |
protected String |
user
Context user at the time the event has been fired. |
protected String |
version
Version of the document at the time the event occured. |
protected String |
wiki
Wiki in which the event occured, example: "xwiki". |
| Constructor Summary | |
|---|---|
ActivityEventImpl()
|
|
| Method Summary | |
|---|---|
String |
getApplication()
Events can be triggered by different applications, not only the main wiki update events: user statuses, blog pingbacks, new extension added... |
String |
getBody()
A larger section of text where the event can store some data. |
Date |
getDate()
An event happens at a precise date. |
String |
getDisplayBody(com.xpn.xwiki.XWikiContext context)
Get a more user-friendly, or a localized version of the event body. |
String |
getDisplayDate(com.xpn.xwiki.XWikiContext context)
Get a formatted, localized version of the event date. |
String |
getDisplayTitle(com.xpn.xwiki.XWikiContext context)
Get a more user-friendly, or a localized version of the event title. |
String |
getDisplayUser(com.xpn.xwiki.XWikiContext context)
Get the user name as a HTML link. |
String |
getEventId()
Each event has a unique ID. |
String |
getPage()
Document-related events target a certain document, and documents have a name; this is the name of the target document. |
String |
getParam1()
Free form parameter to be used by the event consumer. |
String |
getParam2()
Free form parameter to be used by the event consumer. |
String |
getParam3()
Free form parameter to be used by the event consumer. |
String |
getParam4()
Free form parameter to be used by the event consumer. |
String |
getParam5()
Free form parameter to be used by the event consumer. |
Map<String,String> |
getParameters()
|
List<String> |
getParams()
|
int |
getPriority()
Different events can have a different priority. |
String |
getRequestId()
Multiple events can correspond to the same activity, so events can be grouped under the same request ID. |
String |
getSpace()
Document-related events target a certain document, and documents belong to a space; this is the space of the target document. |
String |
getStream()
Events can happen in different contexts; for example, wiki activity events happen in different spaces, user statuses are targeted to different groups. |
String |
getTitle()
A name for the event. |
String |
getType()
|
String |
getUrl()
If an event happens in an URL-accessible location (a document), or if the event itself can be seen at a given URL, this field stores that URL. |
String |
getUser()
Event usually occur as the result of a registered user activity. |
String |
getVersion()
For events related to documents, this field records the version of the document at the time when the event occurred. |
String |
getWiki()
In a wiki farm, each event happens in one of the wikis. |
boolean |
isHidden()
|
void |
setApplication(String application)
|
void |
setBody(String body)
|
void |
setDate(Date date)
|
void |
setEventId(String eventId)
|
void |
setHidden(Boolean hidden)
|
void |
setPage(String page)
|
void |
setParam1(String param1)
|
void |
setParam2(String param2)
|
void |
setParam3(String param3)
|
void |
setParam4(String param4)
|
void |
setParam5(String param5)
|
void |
setParameters(Map<String,String> parameters)
Associates name-value pair parameters with this event. |
void |
setParams(List<String> params)
Set all parameters at once. |
void |
setPriority(int priority)
|
void |
setRequestId(String requestId)
|
void |
setSpace(String space)
|
void |
setStream(String stream)
|
void |
setTitle(String title)
|
void |
setType(String type)
|
void |
setUrl(String url)
|
void |
setUser(String user)
|
void |
setVersion(String version)
|
void |
setWiki(String wiki)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected String eventId
protected String requestId
protected int priority
protected Date date
protected String stream
protected String application
protected String type
ActivityEventType.
protected String user
protected String wiki
protected String space
protected String page
protected String url
protected String title
protected String body
protected String version
protected String param1
protected String param2
protected String param3
protected String param4
protected String param5
protected boolean hidden
protected Map<String,String> parameters
| Constructor Detail |
|---|
public ActivityEventImpl()
| Method Detail |
|---|
public String getDisplayTitle(com.xpn.xwiki.XWikiContext context)
ActivityEventevent title.
getDisplayTitle in interface ActivityEventcontext - the XWiki context
ActivityEvent.getTitle()public String getDisplayBody(com.xpn.xwiki.XWikiContext context)
ActivityEventevent body.
getDisplayBody in interface ActivityEventcontext - the XWiki context
ActivityEvent.getBody()public String getDisplayDate(com.xpn.xwiki.XWikiContext context)
ActivityEventevent date.
getDisplayDate in interface ActivityEventcontext - the XWiki context
ActivityEvent.getDate()public String getDisplayUser(com.xpn.xwiki.XWikiContext context)
ActivityEventuser name as a HTML link.
getDisplayUser in interface ActivityEventcontext - the XWiki context
public void setParams(List<String> params)
ActivityEvent
setParams in interface ActivityEventparams - parameters to set, a list of at most 5 entriespublic List<String> getParams()
public String getEventId()
ActivityEvent
getEventId in interface ActivityEventpublic void setEventId(String eventId)
setEventId in interface ActivityEventeventId - the unique ID of the event to setActivityEvent.getEventId()public String getRequestId()
ActivityEvent
getRequestId in interface ActivityEventpublic void setRequestId(String requestId)
setRequestId in interface ActivityEventrequestId - the event group IDActivityEvent.getRequestId()public int getPriority()
ActivityEvent
getPriority in interface ActivityEventpublic void setPriority(int priority)
setPriority in interface ActivityEventpriority - the priority of the eventActivityEvent.getPriority()public String getApplication()
ActivityEvent
getApplication in interface ActivityEventpublic void setStream(String stream)
setStream in interface ActivityEventstream - the stream NameActivityEvent.getStream()public String getVersion()
ActivityEvent
getVersion in interface ActivityEventpublic void setVersion(String version)
setVersion in interface ActivityEventversion - the document version when the event occurredActivityEvent.getVersion()public String getParam1()
ActivityEvent
getParam1 in interface ActivityEventpublic void setParam1(String param1)
setParam1 in interface ActivityEventparam1 - the first parameter associated with the eventActivityEvent.getParam1()public String getParam2()
ActivityEvent
getParam2 in interface ActivityEventpublic void setParam2(String param2)
setParam2 in interface ActivityEventparam2 - the second parameter associated with the eventActivityEvent.getParam2()public String getParam3()
ActivityEvent
getParam3 in interface ActivityEventpublic void setParam3(String param3)
setParam3 in interface ActivityEventparam3 - the third parameter associated with the eventActivityEvent.getParam3()public String getParam4()
ActivityEvent
getParam4 in interface ActivityEventpublic void setParam4(String param4)
setParam4 in interface ActivityEventparam4 - the fourth parameter associated with the eventActivityEvent.getParam4()public String getParam5()
ActivityEvent
getParam5 in interface ActivityEventpublic void setParam5(String param5)
setParam5 in interface ActivityEventparam5 - the fifth parameter associated with the eventActivityEvent.getParam5()public String getWiki()
ActivityEvent
getWiki in interface ActivityEventpublic void setWiki(String wiki)
setWiki in interface ActivityEventwiki - the wiki name in which the event was createdActivityEvent.getWiki()public String getType()
getType in interface ActivityEventpublic void setType(String type)
setType in interface ActivityEventtype - The type of the eventActivityEvent.getType()public String getUser()
ActivityEvent
getUser in interface ActivityEventpublic void setUser(String user)
setUser in interface ActivityEventuser - the wiki name of the user creating the eventActivityEvent.getUser()public String getSpace()
ActivityEvent
getSpace in interface ActivityEventpublic void setSpace(String space)
setSpace in interface ActivityEventspace - the space name in which the event was createdActivityEvent.getSpace()public String getPage()
ActivityEvent
getPage in interface ActivityEventpublic void setPage(String page)
setPage in interface ActivityEventpage - the page of the eventActivityEvent.getPage()public String getUrl()
ActivityEvent
getUrl in interface ActivityEventpublic void setUrl(String url)
setUrl in interface ActivityEventurl - the URL related to the eventActivityEvent.getUrl()public String getTitle()
ActivityEvent
getTitle in interface ActivityEventpublic void setTitle(String title)
setTitle in interface ActivityEventtitle - the title of the eventActivityEvent.getTitle()public String getBody()
ActivityEvent
getBody in interface ActivityEventpublic void setBody(String body)
setBody in interface ActivityEventbody - the body of the eventActivityEvent.getBody()public Date getDate()
ActivityEvent
getDate in interface ActivityEventpublic void setDate(Date date)
setDate in interface ActivityEventdate - the event dateActivityEvent.getDate()public String getStream()
ActivityEvent
getStream in interface ActivityEventpublic void setApplication(String application)
setApplication in interface ActivityEventapplication - the application NameActivityEvent.getApplication()public void setParameters(Map<String,String> parameters)
ActivityEvent
setParameters in interface ActivityEventparameters - the parameters to associatepublic Map<String,String> getParameters()
getParameters in interface ActivityEventpublic boolean isHidden()
public void setHidden(Boolean hidden)
hidden - the event hidden flag.isHidden()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||