org.xwiki.script.event
Class ScriptEvaluatingEvent

java.lang.Object
  extended by org.xwiki.observation.event.AbstractFilterableEvent
      extended by org.xwiki.observation.event.AbstractCancelableEvent
          extended by org.xwiki.script.event.ScriptEvaluatingEvent
All Implemented Interfaces:
java.io.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 and org.xwiki.rendering.macro.script.ScriptMacroParameters as data.

Since:
2.6RC2
Version:
$Id$
See Also:
ScriptEvaluatedEvent, Serialized Form

Constructor Summary
ScriptEvaluatingEvent()
          Constructor initializing the event filter with an AlwaysMatchingEventFilter, meaning that this event will match any other event of the same type.
ScriptEvaluatingEvent(EventFilter eventFilter)
          Constructor using a custom EventFilter.
ScriptEvaluatingEvent(java.lang.String scriptMacroName)
          Constructor initializing the event filter with a FixedNameEventFilter, meaning that this event will match only events of the same type affecting the same passed name.
 
Method Summary
 
Methods inherited from class org.xwiki.observation.event.AbstractCancelableEvent
cancel, cancel, getReason, isCanceled
 
Methods inherited from class org.xwiki.observation.event.AbstractFilterableEvent
getEventFilter, matches
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.xwiki.observation.event.Event
matches
 

Constructor Detail

ScriptEvaluatingEvent

public ScriptEvaluatingEvent()
Constructor initializing the event filter with an AlwaysMatchingEventFilter, meaning that this event will match any other event of the same type.


ScriptEvaluatingEvent

public ScriptEvaluatingEvent(java.lang.String scriptMacroName)
Constructor initializing the event filter with a FixedNameEventFilter, 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 custom EventFilter.

Parameters:
eventFilter - the filter to use for matching events


Copyright © 2004-2011 XWiki. All Rights Reserved.