org.xwiki.observation.event
Interface CancelableEvent

All Superinterfaces:
Event
All Known Implementing Classes:
AbstractCancelableEvent

public interface CancelableEvent
extends Event

This event can be canceled by the receiver. Sender of this event must take care of undoing any changes in this case.

Since:
2.5M1
Version:
$Id$

Method Summary
 void cancel()
          Cancel the event.
 void cancel(String reason)
          Cancel the event, giving a reason why.
 String getReason()
          Get the reason why the event was canceled.
 boolean isCanceled()
          Check if this event was canceled by one of the receivers.
 
Methods inherited from interface org.xwiki.observation.event.Event
matches
 

Method Detail

isCanceled

boolean isCanceled()
Check if this event was canceled by one of the receivers.

Returns:
true if the event was canceled, false otherwise

cancel

void cancel()
Cancel the event. The actual canceling will be performed by the sender.


cancel

void cancel(String reason)
Cancel the event, giving a reason why. The actual canceling will be performed by the sender.

Parameters:
reason - the reason why the event was canceled

getReason

String getReason()
Get the reason why the event was canceled.

Returns:
reason for cancel or null of the event was not canceled or canceled using cancel()


Copyright © 2004-2012 XWiki. All Rights Reserved.