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

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

@Component(value="permissionchecker")
public class PermissionCheckerListener
extends AbstractScriptCheckerListener

Listens to ScriptEvaluatingEvent and aborts execution if the user is not permitted to execute the script.

Since:
2.5M1
Version:
$Id$

Constructor Summary
PermissionCheckerListener()
           
 
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

PermissionCheckerListener

public PermissionCheckerListener()
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(org.xwiki.observation.event.CancelableEvent, org.xwiki.rendering.transformation.MacroTransformationContext, org.xwiki.rendering.macro.script.ScriptMacroParameters)


Copyright © 2004-2011 XWiki. All Rights Reserved.