public interface Event
Events are identified by:
identifier
unique for each eventgroup identifier
used for all the events caused during the same actionexact date and time
when the event occurredimportance
which allows to order events in the same group, or in the same streamtitle
body
parameters
the application
that created them, like blog, user statuses, or the general
wikieventual sub-stream
inside the application, for example a space for wiki events, or a
certain group for user statusesparticular type
of event, like adding a comment, updating an attachment, setting a new
user statuswiki
,space
,document
affected by the event,entity
inside the document, for example an individual attachment for
attachment events, or an individual object for comment events.user
that caused the eventversion
of the target document at the time that the event occurreddisplay title
of the target document at the time that the event occurredrequested URL
that caused the eventModifier and Type | Interface and Description |
---|---|
static class |
Event.Importance
The importance of an event.
|
Modifier and Type | Field and Description |
---|---|
static String |
FIELD_APPLICATION |
static String |
FIELD_BODY |
static String |
FIELD_DATE |
static String |
FIELD_DOCUMENT |
static String |
FIELD_DOCUMENTTITLE |
static String |
FIELD_DOCUMENTVERSION |
static String |
FIELD_GROUPID |
static String |
FIELD_HIDDEN |
static String |
FIELD_ID |
static String |
FIELD_IMPORTANCE |
static String |
FIELD_PREFILTERED |
static String |
FIELD_RELATEDENTITY |
static String |
FIELD_SPACE |
static String |
FIELD_STREAM |
static String |
FIELD_TARGET |
static String |
FIELD_TITLE |
static String |
FIELD_TYPE |
static String |
FIELD_URL |
static String |
FIELD_USER |
static String |
FIELD_WIKI |
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.
|
DocumentReference |
getDocument()
Document-related events target a certain document.
|
String |
getDocumentTitle()
The document title is usually more important than the document name.
|
String |
getDocumentVersion()
For events related to documents, this field records the version of the document at the time when the event
occurred.
|
String |
getGroupId()
Multiple events can correspond to the same activity, so events can be grouped under the same GroupID.
|
default boolean |
getHidden() |
String |
getId()
Each event has a unique ID.
|
Event.Importance |
getImportance()
Different events can have a different importance.
|
Map<String,String> |
getParameters() |
EntityReference |
getRelatedEntity()
Some events may be related to a more specific entity in the target document, like an attachment or an object, or
may relate to another document besides the
main related document . |
SpaceReference |
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.
|
default Set<String> |
getTarget() |
String |
getTitle()
A name for the event.
|
String |
getType()
Events have different types: adding a comment, updating an attachment, importing an application, etc.
|
URL |
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.
|
DocumentReference |
getUser()
Event usually occur as the result of a registered user activity.
|
WikiReference |
getWiki()
In a wiki farm, each event happens in one of the wikis.
|
default boolean |
isPrefiltered() |
void |
setApplication(String application) |
void |
setBody(String body) |
void |
setDate(Date date) |
void |
setDocument(DocumentReference document) |
void |
setDocumentTitle(String title) |
void |
setDocumentVersion(String version) |
void |
setGroupId(String id) |
default void |
setHidden(boolean isHidden) |
void |
setId(String id) |
void |
setImportance(Event.Importance importance) |
void |
setParameters(Map<String,String> parameters) |
default void |
setPrefiltered(boolean prefiltered) |
void |
setRelatedEntity(EntityReference entity) |
void |
setSpace(SpaceReference space) |
void |
setStream(String stream) |
default void |
setTarget(Set<String> target) |
void |
setTitle(String title) |
void |
setType(String type) |
void |
setUrl(URL url) |
void |
setUser(DocumentReference user) |
void |
setWiki(WikiReference wiki) |
static final String FIELD_ID
getId()
,
Constant Field Valuesstatic final String FIELD_GROUPID
getGroupId()
,
Constant Field Valuesstatic final String FIELD_DATE
getDate()
,
Constant Field Valuesstatic final String FIELD_IMPORTANCE
getImportance()
,
Constant Field Valuesstatic final String FIELD_TITLE
getTitle()
,
Constant Field Valuesstatic final String FIELD_BODY
getBody()
,
Constant Field Valuesstatic final String FIELD_APPLICATION
getApplication()
,
Constant Field Valuesstatic final String FIELD_STREAM
getStream()
,
Constant Field Valuesstatic final String FIELD_TYPE
getType()
,
Constant Field Valuesstatic final String FIELD_WIKI
getWiki()
,
Constant Field Valuesstatic final String FIELD_SPACE
getSpace()
,
Constant Field Valuesstatic final String FIELD_DOCUMENT
getDocument()
,
Constant Field Valuesstatic final String FIELD_DOCUMENTVERSION
getDocumentVersion()
,
Constant Field Valuesstatic final String FIELD_RELATEDENTITY
getRelatedEntity()
,
Constant Field Valuesstatic final String FIELD_USER
getUser()
,
Constant Field Valuesstatic final String FIELD_URL
getUrl()
,
Constant Field Valuesstatic final String FIELD_DOCUMENTTITLE
getDocumentTitle()
,
Constant Field Valuesstatic final String FIELD_TARGET
getTarget()
,
Constant Field Valuesstatic final String FIELD_HIDDEN
getHidden()
,
Constant Field Valuesstatic final String FIELD_PREFILTERED
isPrefiltered()
,
Constant Field ValuesString getId()
String getGroupId()
void setGroupId(String id)
id
- the event group IDgetGroupId()
Date getDate()
Event.Importance getImportance()
void setImportance(Event.Importance importance)
importance
- the importance of the eventgetImportance()
String getTitle()
void setTitle(String title)
title
- the title of the eventgetTitle()
String getBody()
String getApplication()
void setApplication(String application)
application
- the application NamegetApplication()
String getStream()
void setStream(String stream)
stream
- the stream NamegetStream()
String getType()
WikiReference getWiki()
void setWiki(WikiReference wiki)
wiki
- the wiki name in which the event was createdgetWiki()
SpaceReference getSpace()
void setSpace(SpaceReference space)
space
- the space in which the event was createdgetSpace()
DocumentReference getDocument()
void setDocument(DocumentReference document)
document
- the document related to the eventgetDocument()
String getDocumentVersion()
void setDocumentVersion(String version)
version
- the document version when the event occurredgetDocumentVersion()
EntityReference getRelatedEntity()
main related document
. The result of this
method depends on the actual event type.null
void setRelatedEntity(EntityReference entity)
entity
- the eventual entity related to the eventgetRelatedEntity()
DocumentReference getUser()
void setUser(DocumentReference user)
user
- the user creating the eventgetUser()
URL getUrl()
String getDocumentTitle()
void setDocumentTitle(String title)
title
- the title of the related document when the event occurred.getDocumentTitle()
Map<String,String> getParameters()
void setParameters(Map<String,String> parameters)
parameters
- the parameters to associate to the event.getParameters()
default void setTarget(Set<String> target)
target
- a list of entities (users, groups) that are interested by this eventdefault Set<String> getTarget()
default boolean getHidden()
default void setHidden(boolean isHidden)
isHidden
- if the event should be hidden or notdefault boolean isPrefiltered()
default void setPrefiltered(boolean prefiltered)
prefiltered
- true if the event has already been prefilteredCopyright © 2004–2021 XWiki. All rights reserved.