Package org.xwiki.bridge.event
Class DocumentRollingBackEvent
- java.lang.Object
-
- org.xwiki.observation.event.AbstractFilterableEvent
-
- org.xwiki.observation.event.AbstractCancelableEvent
-
- org.xwiki.bridge.event.AbstractDocumentEvent
-
- org.xwiki.bridge.event.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 Summary
Constructors Constructor Description DocumentRollingBackEvent()
Matches allDocumentRollingBackEvent
events.DocumentRollingBackEvent(DocumentReference documentReference)
MatchesDocumentRollingBackEvent
events that target the specified document.DocumentRollingBackEvent(DocumentReference documentReference, String revision)
MatchesDocumentRollingBackEvent
events that target the specified document and revision.DocumentRollingBackEvent(org.xwiki.observation.event.filter.EventFilter eventFilter)
Constructor using a customEventFilter
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getRevision()
boolean
matches(Object otherEvent)
-
Methods inherited from class org.xwiki.observation.event.AbstractCancelableEvent
cancel, cancel, getReason, isCanceled
-
-
-
-
Constructor Detail
-
DocumentRollingBackEvent
public DocumentRollingBackEvent()
Matches allDocumentRollingBackEvent
events.
-
DocumentRollingBackEvent
public DocumentRollingBackEvent(DocumentReference documentReference)
MatchesDocumentRollingBackEvent
events that target the specified document.- Parameters:
documentReference
- the reference of the document to match
-
DocumentRollingBackEvent
public DocumentRollingBackEvent(DocumentReference documentReference, String revision)
MatchesDocumentRollingBackEvent
events 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 is about to be rolled back to
-
DocumentRollingBackEvent
public DocumentRollingBackEvent(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 is about to be rolled back to
-
matches
public boolean matches(Object otherEvent)
- Specified by:
matches
in interfaceorg.xwiki.observation.event.Event
- Overrides:
matches
in classorg.xwiki.observation.event.AbstractFilterableEvent
-
-