Package org.apache.wiki.event
Enum WikiEventEmitter
- All Implemented Interfaces:
Serializable,Comparable<WikiEventEmitter>,java.lang.constant.Constable
public enum WikiEventEmitter extends Enum<WikiEventEmitter>
Emits all kind of
WikiEvents.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants Enum Constant Description INSTANCE -
Method Summary
Modifier and Type Method Description static voidattach(WikiEventListener listener)Registers aWikiEventListenerso it listens events fired from theWikiEventEmitterinstance.static WorkflowEventfireWorkflowEvent(Object src, int type)Fires a Workflow Event from provided source and workflow type.static WikiEventEmitterget()static voidregister(WikiEventListener listener)Registers aWikiEventListenerso it listens events fired from theWikiEventEmitterinstance.static WikiEventEmittervalueOf(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.
-
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:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- 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
WorkflowEventornullif theWikiEventEmitterinstance hasn't listeners attached.
-
attach
Registers aWikiEventListenerso it listens events fired from theWikiEventEmitterinstance. Every otherWikiEventListenerof the same type, listening events from theWikiEventEmitterinstance will stop listening events from it. This ensures events received by theWikiEventListenerwill only process the events once.- Parameters:
listener-WikiEventListener
-
register
Registers aWikiEventListenerso it listens events fired from theWikiEventEmitterinstance. Events received by theWikiEventListenercould process the events more than once or, several instances of the sameWikiEventListenerwould be able to receive the same event.- Parameters:
listener-WikiEventListener
-