java.lang.Object
de.julianweinelt.datacat.dbx.api.events.Event

public class Event extends Object
  • Constructor Details

    • Event

      public Event(String name)
  • Method Details

    • nonCancellable

      public Event nonCancellable()
      Marks the event as non-cancellable.
      Returns:
      The current Event instance for method chaining.
    • set

      public Event set(String key, Object value)
      Sets a property for the event.
      Parameters:
      key - The property key.
      value - The property value.
      Returns:
      The current Event instance for method chaining.
    • get

      Gets a property of the event.
      Parameters:
      key - The property key.
      Returns:
      The EventProperty associated with the key.
      Throws:
      IllegalArgumentException - if the key does not exist.
    • cancel

      public void cancel() throws IllegalStateException
      Cancels the event if it is cancellable.
      Throws:
      IllegalStateException - if the event is not cancellable.