Package org.xwiki.script.event
Class ScriptEvaluatingEvent
- java.lang.Object
-
- org.xwiki.observation.event.AbstractFilterableEvent
-
- org.xwiki.observation.event.AbstractCancelableEvent
-
- org.xwiki.script.event.ScriptEvaluatingEvent
-
- All Implemented Interfaces:
Serializable
,CancelableEvent
,Event
,FilterableEvent
public class ScriptEvaluatingEvent extends AbstractCancelableEvent
An event triggered just before evaluation of a script macro (Groovy, Velocity, etc.) is started. The script will not be executed if this event is canceled.This event is supposed to be sent with
org.xwiki.rendering.transformation.MacroTransformationContext
as the source andorg.xwiki.rendering.macro.script.ScriptMacroParameters
as data.- Since:
- 2.6RC2
- Version:
- $Id: 7d0c1237cbdd0acc5816aacdcf7e66293abe1615 $
- See Also:
ScriptEvaluatedEvent
, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ScriptEvaluatingEvent()
Constructor initializing the event filter with anAlwaysMatchingEventFilter
, meaning that this event will match any other event of the same type.ScriptEvaluatingEvent(String scriptMacroName)
Constructor initializing the event filter with aFixedNameEventFilter
, meaning that this event will match only events of the same type affecting the same passed name.ScriptEvaluatingEvent(EventFilter eventFilter)
Constructor using a customEventFilter
.
-
Method Summary
-
Methods inherited from class org.xwiki.observation.event.AbstractCancelableEvent
cancel, cancel, getReason, isCanceled
-
Methods inherited from class org.xwiki.observation.event.AbstractFilterableEvent
equals, getEventFilter, hashCode, matches
-
-
-
-
Constructor Detail
-
ScriptEvaluatingEvent
public ScriptEvaluatingEvent()
Constructor initializing the event filter with anAlwaysMatchingEventFilter
, meaning that this event will match any other event of the same type.
-
ScriptEvaluatingEvent
public ScriptEvaluatingEvent(String scriptMacroName)
Constructor initializing the event filter with aFixedNameEventFilter
, meaning that this event will match only events of the same type affecting the same passed name.- Parameters:
scriptMacroName
- name of the macro to match, e.g. "velocity"
-
ScriptEvaluatingEvent
public ScriptEvaluatingEvent(EventFilter eventFilter)
Constructor using a customEventFilter
.- Parameters:
eventFilter
- the filter to use for matching events
-
-