public interface ActivityEvent
Modifier and Type | Method and Description |
---|---|
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(XWikiContext context)
Get a more user-friendly, or a localized version of the
event body . |
String |
getDisplayDate(XWikiContext context)
Get a formatted, localized version of the
event date . |
String |
getDisplayTitle(XWikiContext context)
Get a more user-friendly, or a localized version of the
event title . |
String |
getDisplayUser(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 full 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() |
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.
|
Set<String> |
getTarget() |
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.
|
void |
setApplication(String application) |
void |
setBody(String body) |
void |
setDate(Date date) |
void |
setEventId(String id) |
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 id) |
void |
setSpace(String space) |
void |
setStream(String stream) |
void |
setTarget(Set<String> target) |
void |
setTitle(String title) |
void |
setType(String type) |
void |
setUrl(String url) |
void |
setUser(String user) |
void |
setVersion(String version) |
void |
setWiki(String wiki) |
String getEventId()
void setEventId(String id)
id
- the unique ID of the event to setgetEventId()
String getRequestId()
void setRequestId(String id)
id
- the event group IDgetRequestId()
int getPriority()
void setPriority(int priority)
priority
- the priority of the eventgetPriority()
String getType()
String getApplication()
void setApplication(String application)
application
- the application NamegetApplication()
String getStream()
void setStream(String stream)
stream
- the stream NamegetStream()
Date getDate()
String getUser()
void setUser(String user)
user
- the wiki name of the user creating the eventgetUser()
String getWiki()
void setWiki(String wiki)
wiki
- the wiki name in which the event was createdgetWiki()
String getSpace()
void setSpace(String space)
space
- the local serialized reference of the space in which the event was createdgetSpace()
String getPage()
void setPage(String page)
page
- the full name of the page of the eventgetPage()
String getUrl()
String getTitle()
void setTitle(String title)
title
- the title of the eventgetTitle()
String getBody()
String getVersion()
void setVersion(String version)
version
- the document version when the event occurredgetVersion()
String getParam1()
void setParam1(String param1)
param1
- the first parameter associated with the eventgetParam1()
String getParam2()
void setParam2(String param2)
param2
- the second parameter associated with the eventgetParam2()
String getParam3()
void setParam3(String param3)
param3
- the third parameter associated with the eventgetParam3()
String getParam4()
void setParam4(String param4)
param4
- the fourth parameter associated with the eventgetParam4()
String getParam5()
void setParam5(String param5)
param5
- the fifth parameter associated with the eventgetParam5()
String getDisplayTitle(XWikiContext context)
event title
.context
- the XWiki contextgetTitle()
String getDisplayBody(XWikiContext context)
event body
.context
- the XWiki contextgetBody()
String getDisplayDate(XWikiContext context)
event date
.context
- the XWiki contextgetDate()
String getDisplayUser(XWikiContext context)
user name
as a HTML link.context
- the XWiki contextvoid setParams(List<String> params)
params
- parameters to set, a list of at most 5 entriesvoid setParameters(Map<String,String> parameters)
parameters
- the parameters to associateMap<String,String> getParameters()
void setTarget(Set<String> target)
target
- a list of entities (users, groups) that are interested by this eventCopyright © 2004–2019 XWiki. All rights reserved.