org.xwiki.rendering.internal.macro.script
Class NestedScriptMacroValidatorListener

java.lang.Object
  extended by org.xwiki.rendering.internal.macro.script.AbstractScriptCheckerListener
      extended by org.xwiki.rendering.internal.macro.script.NestedScriptMacroValidatorListener
All Implemented Interfaces:
org.xwiki.observation.EventListener

@Component(value="nestedscriptmacrovalidator")
public class NestedScriptMacroValidatorListener
extends AbstractScriptCheckerListener

Listens to ScriptEvaluatingEvent and cancels the evaluation if the script is nested.

Since:
2.5M1
Version:
$Id$

Constructor Summary
NestedScriptMacroValidatorListener()
           
 
Method Summary
protected  void check(org.xwiki.observation.event.CancelableEvent event, org.xwiki.rendering.transformation.MacroTransformationContext context, ScriptMacroParameters parameters)
          This method is called when an ScriptEvaluatingEvent is received.
 java.lang.String getName()
          
 
Methods inherited from class org.xwiki.rendering.internal.macro.script.AbstractScriptCheckerListener
getEvents, onEvent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NestedScriptMacroValidatorListener

public NestedScriptMacroValidatorListener()
Method Detail

getName

public java.lang.String getName()

See Also:
EventListener.getName()

check

protected void check(org.xwiki.observation.event.CancelableEvent event,
                     org.xwiki.rendering.transformation.MacroTransformationContext context,
                     ScriptMacroParameters parameters)
This method is called when an ScriptEvaluatingEvent is received.

Specified by:
check in class AbstractScriptCheckerListener
Parameters:
event - the received event
context - current transformation context
parameters - parameters of the script macro about to be executed
See Also:
AbstractScriptCheckerListener.check(CancelableEvent, MacroTransformationContext, ScriptMacroParameters)


Copyright © 2004-2011 XWiki. All Rights Reserved.