Class DocumentRolledBackEvent

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

    public class DocumentRolledBackEvent
    extends AbstractDocumentEvent
    An event triggered after a document is rolled back to a previous revision.

    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:
    5.0M2
    Version:
    $Id: c1b9e98c3a59ea0b2a7b4642d98a847ef1e67d6f $
    See Also:
    Serialized Form
    • Constructor Detail

      • DocumentRolledBackEvent

        public DocumentRolledBackEvent​(DocumentReference documentReference)
        Matches DocumentRolledBackEvent events that target the specified document.
        Parameters:
        documentReference - the reference of the document to match
      • DocumentRolledBackEvent

        public DocumentRolledBackEvent​(DocumentReference documentReference,
                                       String revision)
        Matches DocumentRolledBackEvent events that target the specified document and revision. The revision is matched only if it's not null.
        Parameters:
        documentReference - the reference of the document to match
        revision - the revision the document was rolled back to
      • DocumentRolledBackEvent

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

      • getRevision

        public String getRevision()
        Returns:
        the revision the document was rolled back to
      • matches

        public boolean matches​(Object otherEvent)
        Specified by:
        matches in interface org.xwiki.observation.event.Event
        Overrides:
        matches in class org.xwiki.observation.event.AbstractFilterableEvent