Package org.xwiki.bridge.event
Class DocumentRolledBackEvent
- java.lang.Object
-
- org.xwiki.observation.event.AbstractFilterableEvent
-
- org.xwiki.observation.event.AbstractCancelableEvent
-
- org.xwiki.bridge.event.AbstractDocumentEvent
-
- org.xwiki.bridge.event.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 Summary
Constructors Constructor Description DocumentRolledBackEvent()Matches allDocumentRolledBackEventevents.DocumentRolledBackEvent(DocumentReference documentReference)MatchesDocumentRolledBackEventevents that target the specified document.DocumentRolledBackEvent(DocumentReference documentReference, String revision)MatchesDocumentRolledBackEventevents that target the specified document and revision.DocumentRolledBackEvent(org.xwiki.observation.event.filter.EventFilter eventFilter)Constructor using a customEventFilter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetRevision()booleanmatches(Object otherEvent)-
Methods inherited from class org.xwiki.bridge.event.AbstractDocumentEvent
getDocumentReference
-
Methods inherited from class org.xwiki.observation.event.AbstractCancelableEvent
cancel, cancel, getReason, isCanceled
-
-
-
-
Constructor Detail
-
DocumentRolledBackEvent
public DocumentRolledBackEvent()
Matches allDocumentRolledBackEventevents.
-
DocumentRolledBackEvent
public DocumentRolledBackEvent(DocumentReference documentReference)
MatchesDocumentRolledBackEventevents that target the specified document.- Parameters:
documentReference- the reference of the document to match
-
DocumentRolledBackEvent
public DocumentRolledBackEvent(DocumentReference documentReference, String revision)
MatchesDocumentRolledBackEventevents that target the specified document and revision. The revision is matched only if it's notnull.- Parameters:
documentReference- the reference of the document to matchrevision- the revision the document was rolled back to
-
DocumentRolledBackEvent
public DocumentRolledBackEvent(org.xwiki.observation.event.filter.EventFilter eventFilter)
Constructor using a customEventFilter.- 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:
matchesin interfaceorg.xwiki.observation.event.Event- Overrides:
matchesin classorg.xwiki.observation.event.AbstractFilterableEvent
-
-