Package org.apache.wiki.event
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
WikiEvent
s.-
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 aWikiEventListener
so it listens events fired from theWikiEventEmitter
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 aWikiEventListener
so it listens events fired from theWikiEventEmitter
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
-
INSTANCE
-
-
Method Details
-
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
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 namejava.lang.NullPointerException
- if the argument is null
-
get
-
fireWorkflowEvent
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
ornull
if theWikiEventEmitter
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
ornull
if theWikiEventEmitter
instance hasn't listeners attached.
-
attach
Registers aWikiEventListener
so it listens events fired from theWikiEventEmitter
instance. Every otherWikiEventListener
of the same type, listening events from theWikiEventEmitter
instance will stop listening events from it. This ensures events received by theWikiEventListener
will only process the events once.- Parameters:
listener
-WikiEventListener
-
register
Registers aWikiEventListener
so it listens events fired from theWikiEventEmitter
instance. Events received by theWikiEventListener
could process the events more than once or, several instances of the sameWikiEventListener
would be able to receive the same event.- Parameters:
listener
-WikiEventListener
-