org.owasp.webscarab.plugin.fragments
Class Fragments

java.lang.Object
  extended by org.owasp.webscarab.plugin.fragments.Fragments
All Implemented Interfaces:
java.lang.Runnable, Plugin

public class Fragments
extends java.lang.Object
implements Plugin

This plugin looks for comments and scripts in the source of HTML pages.

Author:
knoppix

Constructor Summary
Fragments(Framework framework)
          Creates a new instance of Fragments
 
Method Summary
 void analyse(ConversationID id, Request request, Response response, java.lang.String origin)
           
 void flush()
          called to instruct the plugin to flush any memory-only state to the store.
 FragmentsModel getModel()
           
 java.lang.String getPluginName()
          returns the name of the plugin
 java.lang.Object getScriptableObject()
           
 Hook[] getScriptingHooks()
           
 java.lang.String getStatus()
          called to determine what the current status of the plugin is
 boolean isBusy()
          called to test whether the plugin is able to be stopped
 boolean isModified()
          called to determine whether the data stored within the plugin has been modified and should be saved
 boolean isRunning()
           
 void run()
          calls the main loop of the plugin
 void setSession(java.lang.String type, java.lang.Object store, java.lang.String session)
          Sets the store that this plugin uses
 boolean stop()
          stops the plugin running
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Fragments

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

Parameters:
props - contains the user's configuration properties
Method Detail

getModel

public FragmentsModel getModel()

setSession

public void setSession(java.lang.String type,
                       java.lang.Object store,
                       java.lang.String session)
                throws StoreException
Sets the store that this plugin uses

Specified by:
setSession in interface Plugin
Parameters:
session - the new session
Throws:
StoreException

getPluginName

public java.lang.String getPluginName()
returns the name of the plugin

Specified by:
getPluginName in interface Plugin
Returns:
the name of the plugin

run

public void run()
calls the main loop of the plugin

Specified by:
run in interface java.lang.Runnable
Specified by:
run in interface Plugin

stop

public boolean stop()
stops the plugin running

Specified by:
stop in interface Plugin
Returns:
true if the plugin could be stopped within a (unspecified) timeout period, false otherwise

analyse

public void analyse(ConversationID id,
                    Request request,
                    Response response,
                    java.lang.String origin)
Specified by:
analyse in interface Plugin

flush

public void flush()
           throws StoreException
Description copied from interface: Plugin
called to instruct the plugin to flush any memory-only state to the store.

Specified by:
flush in interface Plugin
Throws:
StoreException - if there is any problem saving the session data

isBusy

public boolean isBusy()
Description copied from interface: Plugin
called to test whether the plugin is able to be stopped

Specified by:
isBusy in interface Plugin
Returns:
false if the plugin can be stopped

getStatus

public java.lang.String getStatus()
Description copied from interface: Plugin
called to determine what the current status of the plugin is

Specified by:
getStatus in interface Plugin

isModified

public boolean isModified()
Description copied from interface: Plugin
called to determine whether the data stored within the plugin has been modified and should be saved

Specified by:
isModified in interface Plugin

isRunning

public boolean isRunning()
Specified by:
isRunning in interface Plugin

getScriptableObject

public java.lang.Object getScriptableObject()
Specified by:
getScriptableObject in interface Plugin

getScriptingHooks

public Hook[] getScriptingHooks()
Specified by:
getScriptingHooks in interface Plugin