Package org.xwiki.observation.event
Interface CancelableEvent
- All Superinterfaces:
Event
- All Known Implementing Classes:
AbstractCancelableEvent
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: 2254ac34e65b363474be318ffb1f63b282f4740f $
-
Method Summary
-
Method Details
-
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
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()
-