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: 2254ac34e65b363474be318ffb1f63b282f4740f $
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Cancel the event.
    void
    cancel(String reason)
    Cancel the event, giving a reason why.
    Get the reason why the event was canceled.
    boolean
    Check if this event was canceled by one of the receivers.

    Methods inherited from interface org.xwiki.observation.event.Event

    matches
  • 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

      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()