Class DocumentCreatingEvent

  • All Implemented Interfaces:
    Serializable, org.xwiki.observation.event.CancelableEvent, org.xwiki.observation.event.Event, org.xwiki.observation.event.FilterableEvent

    public class DocumentCreatingEvent
    extends AbstractDocumentEvent
    An event triggered before a document is created.

    The event also send the following parameters:

    • source: the current {com.xpn.xwiki.doc.XWikiDocument} instance which is going to be saved
    • data: the current {com.xpn.xwiki.XWikiContext} instance
    Since:
    2.7RC1
    Version:
    $Id: 1eb6ee05e85cb8bb45aa8ed52a9d5d462a5ed755 $
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      DocumentCreatingEvent()
      Constructor initializing the event filter with an AlwaysMatchingEventFilter, meaning that this event will match any other document delete event.
      DocumentCreatingEvent​(DocumentReference documentReference)
      Constructor initializing the event filter with a FixedNameEventFilter, meaning that this event will match only delete events affecting the same document.
      DocumentCreatingEvent​(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
    • Constructor Detail

      • DocumentCreatingEvent

        public DocumentCreatingEvent()
        Constructor initializing the event filter with an AlwaysMatchingEventFilter, meaning that this event will match any other document delete event.
      • DocumentCreatingEvent

        public DocumentCreatingEvent​(DocumentReference documentReference)
        Constructor initializing the event filter with a FixedNameEventFilter, meaning that this event will match only delete events affecting the same document.
        Parameters:
        documentReference - the reference of the document to match
      • DocumentCreatingEvent

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