Package org.xwiki.annotation.event
Class AnnotationAddedEvent
- java.lang.Object
-
- org.xwiki.observation.event.AbstractFilterableEvent
-
- org.xwiki.observation.event.AbstractCancelableEvent
-
- org.xwiki.bridge.event.AbstractDocumentEvent
-
- org.xwiki.annotation.event.AbstractAnnotationEvent
-
- org.xwiki.annotation.event.AnnotationAddedEvent
-
- All Implemented Interfaces:
Serializable
,AnnotationEvent
,org.xwiki.observation.event.CancelableEvent
,org.xwiki.observation.event.Event
,org.xwiki.observation.event.FilterableEvent
public class AnnotationAddedEvent extends AbstractAnnotationEvent
An event triggered when an annotation is added.The event also send the following parameters:
- source: the current {com.xpn.xwiki.doc.XWikiDocument} instance
- data: the current {com.xpn.xwiki.XWikiContext} instance
- Since:
- 2.6RC2
- Version:
- $Id: 33de848a3fc0b9fbabdf7eef177a86aba38a6859 $
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AnnotationAddedEvent()
Constructor initializing the event filter with anAlwaysMatchingEventFilter
, meaning that this event will match any other annotation add event.AnnotationAddedEvent(String documentName, String identifier)
Constructor initializing the event filter with aFixedNameEventFilter
, meaning that this event will match only annotation add events affecting the document matching the passed document name.AnnotationAddedEvent(org.xwiki.observation.event.filter.EventFilter eventFilter)
Constructor using a customEventFilter
.
-
Method Summary
-
Methods inherited from class org.xwiki.annotation.event.AbstractAnnotationEvent
getIdentifier
-
Methods inherited from class org.xwiki.bridge.event.AbstractDocumentEvent
getDocumentReference
-
Methods inherited from class org.xwiki.observation.event.AbstractCancelableEvent
cancel, cancel, getReason, isCanceled
-
Methods inherited from class org.xwiki.observation.event.AbstractFilterableEvent
equals, getEventFilter, hashCode, matches
-
-
-
-
Constructor Detail
-
AnnotationAddedEvent
public AnnotationAddedEvent()
Constructor initializing the event filter with anAlwaysMatchingEventFilter
, meaning that this event will match any other annotation add event.
-
AnnotationAddedEvent
public AnnotationAddedEvent(String documentName, String identifier)
Constructor initializing the event filter with aFixedNameEventFilter
, meaning that this event will match only annotation add events affecting the document matching the passed document name.- Parameters:
documentName
- the name of the document to matchidentifier
- the identifier of the added annotation
-
AnnotationAddedEvent
public AnnotationAddedEvent(org.xwiki.observation.event.filter.EventFilter eventFilter)
Constructor using a customEventFilter
.- Parameters:
eventFilter
- the filter to use for matching events
-
-