Enum WikiEventEmitter

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

public enum WikiEventEmitter
extends java.lang.Enum<WikiEventEmitter>
Emits all kind of WikiEvents.
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    java.lang.Enum.EnumDesc<E extends java.lang.Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant Description
    INSTANCE  
  • Method Summary

    Modifier and Type Method Description
    static void attach​(WikiEventListener listener)
    Registers a WikiEventListener so it listens events fired from the WikiEventEmitter instance.
    static WorkflowEvent fireWorkflowEvent​(java.lang.Object src, int type)
    Fires a Workflow Event from provided source and workflow type.
    static WorkflowEvent fireWorkflowEvent​(java.lang.Object src, int type, java.lang.Object... args)
    Fires a Workflow Event from provided source and workflow type.
    static WikiEventEmitter get()  
    static void register​(WikiEventListener listener)
    Registers a WikiEventListener so it listens events fired from the WikiEventEmitter instance.
    static WikiEventEmitter valueOf​(java.lang.String name)
    Returns the enum constant of this type with the specified name.
    static WikiEventEmitter[] values()
    Returns an array containing the constants of this enum type, in the order they are declared.

    Methods inherited from class java.lang.Enum

    clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • 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​(java.lang.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:
      java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
      java.lang.NullPointerException - if the argument is null
    • get

      public static WikiEventEmitter get()
    • fireWorkflowEvent

      public static WorkflowEvent fireWorkflowEvent​(java.lang.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​(java.lang.Object src, int type, java.lang.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