Enum WikiEventEmitter

java.lang.Object
java.lang.Enum<WikiEventEmitter>
org.apache.wiki.event.WikiEventEmitter
All Implemented Interfaces:
Serializable, Comparable<WikiEventEmitter>

Emits all kind of WikiEvents.
  • Enum Constant Details

  • Method Details

    • values

      public static WikiEventEmitter[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static WikiEventEmitter valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • get

      public static WikiEventEmitter get()
    • fireWorkflowEvent

      public static WorkflowEvent fireWorkflowEvent(Object src, int type)
      Fires a Workflow Event from provided source and workflow type.
      Parameters:
      src - the source of the event, which can be any object: a wiki page, group or authentication/authentication/group manager.
      type - the type of event
      Returns:
      fired WorkflowEvent or null if the WikiEventEmitter instance hasn't listeners attached.
    • fireWorkflowEvent

      public static WorkflowEvent fireWorkflowEvent(Object src, int type, Object... args)
      Fires a Workflow Event from provided source and workflow type.
      Parameters:
      src - the source of the event, which can be any object: a wiki page, group or authentication/authentication/group manager.
      type - the type of event
      Returns:
      fired WorkflowEvent or null if the WikiEventEmitter instance hasn't listeners attached.
    • attach

      public static void attach(WikiEventListener listener)
      Registers a WikiEventListener so it listens events fired from the WikiEventEmitter instance. Every other WikiEventListener of the same type, listening events from the WikiEventEmitter instance will stop listening events from it. This ensures events received by the WikiEventListener will only process the events once.
      Parameters:
      listener - WikiEventListener
    • register

      public static void register(WikiEventListener listener)
      Registers a WikiEventListener so it listens events fired from the WikiEventEmitter instance. Events received by the WikiEventListener could process the events more than once or, several instances of the same WikiEventListener would be able to receive the same event.
      Parameters:
      listener - WikiEventListener