Class DocumentRollingBackEvent

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

    public class DocumentRollingBackEvent
    extends AbstractDocumentEvent
    An event triggered before 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: 03a734e2cc8d69da8039806b70539df7fc549948 $
    See Also:
    Serialized Form
    • Constructor Detail

      • DocumentRollingBackEvent

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

        public DocumentRollingBackEvent​(DocumentReference documentReference,
                                        String revision)
        Matches DocumentRollingBackEvent 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 is about to be rolled back to
      • DocumentRollingBackEvent

        public DocumentRollingBackEvent​(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 is about to be 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