Package org.xwiki.notifications
Class CompositeEvent
- java.lang.Object
-
- org.xwiki.notifications.CompositeEvent
-
public class CompositeEvent extends Object
A group of similar events that compose a "composite" event.- Since:
- 9.4RC1
- Version:
- $Id: cdafec6fe53a76d687067ccb953b21a33073d7ad $
-
-
Constructor Summary
Constructors Constructor Description CompositeEvent(Event event)
Construct a CompositeEvent.CompositeEvent(CompositeEvent compositeEvent)
Copy constructor ofCompositeEvent
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(Event event, int similarity)
Add an event to the composite event.boolean
equals(Object obj)
Date
getDate()
List<Date>
getDates()
org.xwiki.model.reference.DocumentReference
getDocument()
List<String>
getEventIds()
List<Event>
getEvents()
String
getGroupId()
int
getSimilarityBetweenEvents()
String
getType()
Set<org.xwiki.model.reference.DocumentReference>
getUsers()
int
hashCode()
void
remove(Event event)
Remove an event from the current object.
-
-
-
Constructor Detail
-
CompositeEvent
public CompositeEvent(Event event)
Construct a CompositeEvent.- Parameters:
event
- the first event of the composite event
-
CompositeEvent
public CompositeEvent(CompositeEvent compositeEvent)
Copy constructor ofCompositeEvent
.- Parameters:
compositeEvent
- the composite event to copy
-
-
Method Detail
-
add
public void add(Event event, int similarity) throws NotificationException
Add an event to the composite event.- Parameters:
event
- the event to addsimilarity
- the similarity between the event to add and the events of the composite events- Throws:
NotificationException
- if the addition is illegal (lower similarity for example)
-
getSimilarityBetweenEvents
public int getSimilarityBetweenEvents()
- Returns:
- the greatest similarity between events of the composite event
-
getType
public String getType()
- Returns:
- the type of the events that compose the current object
-
getGroupId
public String getGroupId()
- Returns:
- the groupId of the first event of the current object
-
getDocument
public org.xwiki.model.reference.DocumentReference getDocument()
- Returns:
- the document of the first event of the current object
-
getUsers
public Set<org.xwiki.model.reference.DocumentReference> getUsers()
- Returns:
- the users who performed the events
-
getDate
public Date getDate()
- Returns:
- the date of the most recent event
- Since:
- 9.11RC1
-
remove
public void remove(Event event)
Remove an event from the current object.- Parameters:
event
- the event to remove
-
-