org.xwiki.bridge.event
Class DocumentRollingBackEvent

java.lang.Object
  extended by org.xwiki.observation.event.AbstractFilterableEvent
      extended by org.xwiki.bridge.event.AbstractDocumentEvent
          extended by org.xwiki.bridge.event.DocumentRollingBackEvent
All Implemented Interfaces:
Serializable, org.xwiki.observation.event.Event, org.xwiki.observation.event.FilterableEvent

@Unstable
public class DocumentRollingBackEvent
extends AbstractDocumentEvent

An event triggered before a document is rolled back to a previous revision.

Since:
5.0M2
Version:
$Id: cd274f664786c0342aaa30a65d22607df97fa872 $
See Also:
Serialized Form

Constructor Summary
DocumentRollingBackEvent()
          Matches all DocumentRollingBackEvent events.
DocumentRollingBackEvent(DocumentReference documentReference)
          Matches DocumentRollingBackEvent events that target the specified document.
DocumentRollingBackEvent(DocumentReference documentReference, String revision)
          Matches DocumentRollingBackEvent events that target the specified document and revision.
DocumentRollingBackEvent(org.xwiki.observation.event.filter.EventFilter eventFilter)
          Constructor using a custom EventFilter.
 
Method Summary
 String getRevision()
           
 boolean matches(Object otherEvent)
           
 
Methods inherited from class org.xwiki.observation.event.AbstractFilterableEvent
equals, getEventFilter, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DocumentRollingBackEvent

public DocumentRollingBackEvent()
Matches all DocumentRollingBackEvent events.


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


Copyright © 2004–2014 XWiki. All rights reserved.