org.xwiki.bridge.event
Class DocumentRolledBackEvent

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

@Unstable
public class DocumentRolledBackEvent
extends AbstractDocumentEvent

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

Since:
5.0M2
Version:
$Id: 7e675deb5f529e6f05e00414623de3b7740fbb94 $
See Also:
Serialized Form

Constructor Summary
DocumentRolledBackEvent()
          Matches all DocumentRolledBackEvent events.
DocumentRolledBackEvent(DocumentReference documentReference)
          Matches DocumentRolledBackEvent events that target the specified document.
DocumentRolledBackEvent(DocumentReference documentReference, String revision)
          Matches DocumentRolledBackEvent events that target the specified document and revision.
DocumentRolledBackEvent(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

DocumentRolledBackEvent

public DocumentRolledBackEvent()
Matches all DocumentRolledBackEvent events.


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


Copyright © 2004–2014 XWiki. All rights reserved.