Class 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 an AlwaysMatchingEventFilter, meaning that this event will match any other annotation add event.
      AnnotationAddedEvent​(String documentName, String identifier)
      Constructor initializing the event filter with a FixedNameEventFilter, 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 custom EventFilter.
    • Method Summary

      • 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
      • Methods inherited from interface org.xwiki.observation.event.Event

        matches
      • Methods inherited from interface org.xwiki.observation.event.FilterableEvent

        getEventFilter
    • Constructor Detail

      • AnnotationAddedEvent

        public AnnotationAddedEvent()
        Constructor initializing the event filter with an AlwaysMatchingEventFilter, meaning that this event will match any other annotation add event.
      • AnnotationAddedEvent

        public AnnotationAddedEvent​(String documentName,
                                    String identifier)
        Constructor initializing the event filter with a FixedNameEventFilter, 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 match
        identifier - the identifier of the added annotation
      • AnnotationAddedEvent

        public AnnotationAddedEvent​(org.xwiki.observation.event.filter.EventFilter eventFilter)
        Constructor using a custom EventFilter.
        Parameters:
        eventFilter - the filter to use for matching events