org.jpublish.action
Class ScriptAction
java.lang.Object
|
+--org.jpublish.action.ScriptAction
- All Implemented Interfaces:
- Action
- public class ScriptAction
- extends java.lang.Object
- implements Action
An action which is implemented in a BSF supported scripting language. Script
actions have access to several varibles:
vc - The current Velocity context
request - The HTTP request
response - The HTTP response
session - The HTTP session
syslog - Standard logging stream (Log4J Category)
- Author:
- Anthony Eden
Constructor Summary |
ScriptAction(SiteContext siteContext,
java.io.File script)
Construct a new ScriptAction for the given script. |
ScriptAction(SiteContext siteContext,
java.lang.String script)
Construct a new ScriptAction for the given script. |
Method Summary |
void |
execute(org.apache.velocity.VelocityContext context)
Execute the action script represented by this ScriptAction. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ScriptAction
public ScriptAction(SiteContext siteContext,
java.lang.String script)
- Construct a new ScriptAction for the given script. The path to the
script should be an absolute path.
- Parameters:
siteContext
- The SiteContextscript
- The path to the script
ScriptAction
public ScriptAction(SiteContext siteContext,
java.io.File script)
- Construct a new ScriptAction for the given script.
- Parameters:
siteContext
- The SiteContextscript
- The file representing the script
execute
public void execute(org.apache.velocity.VelocityContext context)
throws java.lang.Exception
- Execute the action script represented by this ScriptAction.
- Specified by:
execute
in interface Action
- Parameters:
context
- The current Velocity context- Throws:
java.lang.Exception
-
Copyright (C) 2001 Anthony Eden. All Rights Reserved.