org.owasp.webscarab.plugin
Class Framework

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

public class Framework
extends java.lang.Object

creates a class that contains and controls the plugins.

Author:
knoppix

Constructor Summary
Framework()
          Creates a new instance of Framework
 
Method Summary
 void addConversation(ConversationID id, java.util.Date when, Request request, Response response, java.lang.String origin)
           
 void addConversation(ConversationID id, Request request, Response response, java.lang.String origin)
           
 ConversationID addConversation(Request request, Response response, java.lang.String origin)
           
 void addPlugin(Plugin plugin)
          adds a new plugin into the framework
 CredentialManager getCredentialManager()
           
 FrameworkModel getModel()
          provided to allow plugins to gain access to the model.
 Plugin getPlugin(java.lang.String name)
          retrieves the named plugin, if it exists
 ScriptManager getScriptManager()
           
 java.lang.String[] getStatus()
           
 java.lang.String getVersion()
          returns the build version of WebScarab.
 boolean isBusy()
           
 boolean isModified()
           
 boolean isRunning()
           
 ConversationID reserveConversationID()
           
 void saveSessionData()
          called to instruct the various plugins to save their current state to the store.
 void setSession(java.lang.String type, java.lang.Object store, java.lang.String session)
          instructs the framework to use the provided model.
 void setUI(FrameworkUI ui)
          links the framework to its GUI
 void startPlugins()
          starts all the plugins in the framework
 boolean stopPlugins()
          stops all the plugins in the framework
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Framework

public Framework()
Creates a new instance of Framework

Method Detail

getScriptManager

public ScriptManager getScriptManager()

getCredentialManager

public CredentialManager getCredentialManager()

setUI

public void setUI(FrameworkUI ui)
links the framework to its GUI

Parameters:
ui - a class implementing the necessary interface methods

setSession

public void setSession(java.lang.String type,
                       java.lang.Object store,
                       java.lang.String session)
                throws StoreException
instructs the framework to use the provided model. The framework notifies all plugins that the session has changed.

Throws:
StoreException

getModel

public FrameworkModel getModel()
provided to allow plugins to gain access to the model.

Returns:
the SiteModel

addPlugin

public void addPlugin(Plugin plugin)
adds a new plugin into the framework

Parameters:
plugin - the plugin to add

getPlugin

public Plugin getPlugin(java.lang.String name)
retrieves the named plugin, if it exists

Parameters:
name - the name of the plugin
Returns:
the plugin if it exists, or null

startPlugins

public void startPlugins()
starts all the plugins in the framework


isBusy

public boolean isBusy()

isRunning

public boolean isRunning()

isModified

public boolean isModified()

getStatus

public java.lang.String[] getStatus()

stopPlugins

public boolean stopPlugins()
stops all the plugins in the framework


saveSessionData

public void saveSessionData()
                     throws StoreException
called to instruct the various plugins to save their current state to the store.

Throws:
StoreException - if there is any problem saving the session data

getVersion

public java.lang.String getVersion()
returns the build version of WebScarab. This is extracted from the webscarab.jar Manifest, if webscarab is running from a jar.

Returns:
the version string

reserveConversationID

public ConversationID reserveConversationID()

addConversation

public void addConversation(ConversationID id,
                            Request request,
                            Response response,
                            java.lang.String origin)

addConversation

public void addConversation(ConversationID id,
                            java.util.Date when,
                            Request request,
                            Response response,
                            java.lang.String origin)

addConversation

public ConversationID addConversation(Request request,
                                      Response response,
                                      java.lang.String origin)