org.owasp.webscarab.plugin
Class ScriptManager

java.lang.Object
  extended by org.owasp.webscarab.plugin.ScriptManager

public class ScriptManager
extends java.lang.Object

Author:
rogan

Constructor Summary
ScriptManager(Framework framework)
          Creates a new instance of ScriptManager
 
Method Summary
 void addScript(java.lang.String plugin, Hook hook, Script script)
           
 void addScript(java.lang.String plugin, Hook hook, Script script, int position)
           
 void addScriptListener(ScriptListener listener)
           
protected  void fireHookEnded(java.lang.String plugin, Hook hook)
          tells listeners that execution of a Hook has ended
protected  void fireHooksChanged()
          tells listeners that a new Hook has been added
protected  void fireScriptAdded(java.lang.String plugin, Hook hook, Script script)
          tells listeners that a script has been added
protected  void fireScriptChanged(java.lang.String plugin, Hook hook, Script script)
          tells listeners that a Script has changed
protected  void fireScriptEnded(java.lang.String plugin, Hook hook, Script script)
          tells listeners that execution of a Script has ended
protected  void fireScriptError(java.lang.String plugin, Hook hook, Script script, java.lang.Throwable error)
          tells listeners that execution of a Script resulted in an error
protected  void fireScriptRemoved(java.lang.String plugin, Hook hook, Script script)
          tells listeners that a script has been removed
protected  void fireScriptStarted(java.lang.String plugin, Hook hook, Script script)
          tells listeners that execution of a Script has begun
 Hook getHook(java.lang.String plugin, int i)
           
 int getHookCount(java.lang.String plugin)
           
 java.lang.String getPlugin(int i)
           
 int getPluginCount()
           
 void loadScripts()
           
 void registerHooks(java.lang.String pluginName, Hook[] hooks)
           
 void removeScript(java.lang.String plugin, Hook hook, Script script)
           
 void removeScriptListener(ScriptListener listener)
           
 void saveScripts()
           
 void setEnabled(java.lang.String plugin, Hook hook, Script script, boolean enabled)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScriptManager

public ScriptManager(Framework framework)
Creates a new instance of ScriptManager

Method Detail

addScriptListener

public void addScriptListener(ScriptListener listener)

removeScriptListener

public void removeScriptListener(ScriptListener listener)

registerHooks

public void registerHooks(java.lang.String pluginName,
                          Hook[] hooks)

getPluginCount

public int getPluginCount()

getPlugin

public java.lang.String getPlugin(int i)

getHookCount

public int getHookCount(java.lang.String plugin)

getHook

public Hook getHook(java.lang.String plugin,
                    int i)

addScript

public void addScript(java.lang.String plugin,
                      Hook hook,
                      Script script,
                      int position)
               throws org.apache.bsf.BSFException
Throws:
org.apache.bsf.BSFException

addScript

public void addScript(java.lang.String plugin,
                      Hook hook,
                      Script script)
               throws org.apache.bsf.BSFException
Throws:
org.apache.bsf.BSFException

setEnabled

public void setEnabled(java.lang.String plugin,
                       Hook hook,
                       Script script,
                       boolean enabled)

removeScript

public void removeScript(java.lang.String plugin,
                         Hook hook,
                         Script script)

loadScripts

public void loadScripts()

saveScripts

public void saveScripts()

fireHooksChanged

protected void fireHooksChanged()
tells listeners that a new Hook has been added

Parameters:
hook - the hook

fireScriptAdded

protected void fireScriptAdded(java.lang.String plugin,
                               Hook hook,
                               Script script)
tells listeners that a script has been added

Parameters:
hook - the hook
script - the script

fireScriptRemoved

protected void fireScriptRemoved(java.lang.String plugin,
                                 Hook hook,
                                 Script script)
tells listeners that a script has been removed

Parameters:
hook - the hook
script - the script

fireScriptStarted

protected void fireScriptStarted(java.lang.String plugin,
                                 Hook hook,
                                 Script script)
tells listeners that execution of a Script has begun

Parameters:
hook - the hook
script - the script

fireScriptEnded

protected void fireScriptEnded(java.lang.String plugin,
                               Hook hook,
                               Script script)
tells listeners that execution of a Script has ended

Parameters:
hook - the hook
script - the script

fireScriptChanged

protected void fireScriptChanged(java.lang.String plugin,
                                 Hook hook,
                                 Script script)
tells listeners that a Script has changed

Parameters:
hook - the hook
script - the script

fireScriptError

protected void fireScriptError(java.lang.String plugin,
                               Hook hook,
                               Script script,
                               java.lang.Throwable error)
tells listeners that execution of a Script resulted in an error

Parameters:
hook - the hook
script - the script

fireHookEnded

protected void fireHookEnded(java.lang.String plugin,
                             Hook hook)
tells listeners that execution of a Hook has ended

Parameters:
hook - the hook