Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## scone
Class Plugin

    java.lang.Object
      scone.Plugin

Direct Known Subclasses:
  AccessTracking, AccessTracking, BuildPopupClientside, MagnifierPlugin, MultilinkExpander, ObserverTestPlugin, RobotMonitor, RobotTestPlugin, RueckspiegelPlugin, ServerSide, StatusBarWizardPlugin, UserHandling, UserHandling, UserTestTool

    public abstract class Plugin

extends java.lang.Object

Classes implementing this interface may be registered as a plugin.
Use `config/scone/plugins.xml` to enable and disable plugins.
Use `config/properties/<plugin-classname>.xml` to configure plugins.
At startup, the registered classes will be instantiated, stored in a Vector to remain in memory and the init() method will be invoked.

Author:
  Harald Weinreich, Volkert Buchmann

Field Summary
`static int` | `ACCESSTRACKING` enable usertracking
`static int` | `ACCESSTRACKING2` enable usertracking2: only with JavaScript but well working
`static int` | `ADDPREAMBLE` use AddPreambleEditor
`static int` | `CALCFINGERPRINT` Calculate a Fingerprint of the Web page source code.
`static int` | `CONSIDERINCLUSIONS` fill InclusionTable and create Inclusion objects
`static int` | `CONSIDERKEYWORDS` fill keywordtable...
`static int` | `CONSIDERLINKS` fill LinkTable and create Link objects.
`static java.lang.String` | `COPYRIGHT`
`static java.lang.String` | `DECENT_HOST_CONDITION` condition for megs that parse any request/response with: !
`static java.lang.String` | `HTDOCCONDITION` the standard condition for megs: !
`static java.lang.String` | `NO_HTDOCCONDITION` condition for megs that handle NON-HTML-Documents: !
`static int` | `NOCACHE` use NoCache - use to avoid caching in the browser...
`static int` | `NOREQUIREMENTS` possible requirements
`static int` | `PAGETIMEOUT` use PageTimout - use to limit caching in the browser...
`static int` | `PARSEDOCUMENT` fill HtmlDocumentTable and create HtmlDocument objects
`static int` | `POSTDATA` Get the Post-Data of the browser's request if available.
`static int` | `RAS` use RAS-Server (Remote Access Server) The Plugin class has to implement ,,public int getRasPort()´´!
`static int` | `RESOURCEGENERATOR` use GeneralResourceGenerator
`static int` | `SAVEBODYTEXT` Save the pure, unescaped text of the document body
`static int` | `SAVESOURCECODE` Save the source Code
`static int` | `USEPARSINGMEG` internal requirement!

Constructor Summary
`Plugin()`

Method Summary
`void` | `addMeg(Meg meg)` adds a MEG to WBI.
`void` | `disable()` overwrite this method to shutdown plugin activities not yet implemented!
`void` | `displayConfigGUI(java.awt.Dialog parent)` displays a GUI that allows for editing the persistent properties for the plugin.
`void` | `displayConfigGUI(java.awt.Frame parent)` displays a GUI that allows for editing the persistent properties for the plugin.
`void` | `enable()` overwrite this method to enable plugin ectivities not yet implemented!
`PersistentProperties` | `getProperties()` returns a PersistentProperties object that the framework provides for the plugin.
`int` | `getRasPort()` Specify the port of the RAS-Server.
`abstract int` | `getRequirements()` Define the requirements of this plugin by implementing this method.
`abstract void` | `init()` Initializes a scone plugin.
`void` | `init(Proxy proxy)` sets the proxy variable.
`void` | `saveProperties()` saves the properties if they have been changed.
`void` | `terminate()` overwrite this method to be notified when the Proxy terminates

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### COPYRIGHT

    public static final java.lang.String COPYRIGHT

See Also:
  Constant Field Values

### USEPARSINGMEG

    public static final int USEPARSINGMEG

  internal requirement! don't use it!

  See Also:
    Constant Field Values

### NOREQUIREMENTS

    public static final int NOREQUIREMENTS

  possible requirements

  See Also:
    Constant Field Values

### PARSEDOCUMENT

    public static final int PARSEDOCUMENT

  fill HtmlDocumentTable and create HtmlDocument objects

  See Also:
    Constant Field Values

### CONSIDERLINKS

    public static final int CONSIDERLINKS

  fill LinkTable and create Link objects.
  Attention: no LinkTokens will be created if CONSIDERLINKS is not required!

  See Also:
    Constant Field Values

### CONSIDERINCLUSIONS

    public static final int CONSIDERINCLUSIONS

  fill InclusionTable and create Inclusion objects

  See Also:
    Constant Field Values

### POSTDATA

    public static final int POSTDATA

  Get the Post-Data of the browser's request if available.

  The Data is made available by the PostDataExtractor and the ParsingMeg and stored in
  `sconePipe.getTokenInputStream().getMetaInfo().get("postData")`

  See Also:
    Constant Field Values

### CONSIDERKEYWORDS

    public static final int CONSIDERKEYWORDS

  fill keywordtable...

  See Also:
    Constant Field Values

### SAVEBODYTEXT

    public static final int SAVEBODYTEXT

  Save the pure, unescaped text of the document body

  See Also:
    Constant Field Values

### SAVESOURCECODE

    public static final int SAVESOURCECODE

  Save the source Code

  See Also:
    Constant Field Values

### CALCFINGERPRINT

    public static final int CALCFINGERPRINT

  Calculate a Fingerprint of the Web page source code.

  See Also:
    Constant Field Values

### ADDPREAMBLE

    public static final int ADDPREAMBLE

  use AddPreambleEditor

  See Also:
    Constant Field Values

### RESOURCEGENERATOR

    public static final int RESOURCEGENERATOR

  use GeneralResourceGenerator

  See Also:
    Constant Field Values

### NOCACHE

    public static final int NOCACHE

  use NoCache - use to avoid caching in the browser...

  See Also:
    Constant Field Values

### PAGETIMEOUT

    public static final int PAGETIMEOUT

  use PageTimout - use to limit caching in the browser...

  See Also:
    Constant Field Values

### RAS

    public static final int RAS

  use RAS-Server (Remote Access Server)
  The Plugin class has to implement ,,public int getRasPort()´´!

  See Also:
    Constant Field Values

### ACCESSTRACKING

    public static final int ACCESSTRACKING

  enable usertracking

  See Also:
    Constant Field Values

### ACCESSTRACKING2

    public static final int ACCESSTRACKING2

  enable usertracking2: only with JavaScript but well working

  See Also:
    Constant Field Values

### HTDOCCONDITION

    public static final java.lang.String HTDOCCONDITION

  the standard condition for megs: !host= & content-type=text/html

  See Also:
    Constant Field Values

### NO_HTDOCCONDITION

    public static final java.lang.String NO_HTDOCCONDITION

  condition for megs that handle NON-HTML-Documents: !host= & !content-type=text/html

  See Also:
    Constant Field Values

### DECENT_HOST_CONDITION

    public static final java.lang.String DECENT_HOST_CONDITION

  condition for megs that parse any request/response with: !host=

  See Also:
    Constant Field Values

Constructor Detail

### Plugin

    public Plugin()

Method Detail

### getRequirements

    public abstract int getRequirements()

  Define the requirements of this plugin by implementing this method.
  A plugin has to specify its requirements which can be as follows:
  NOREQUIREMENTS use this keyword if your plugin does not require any feature.
  PARSEDOCUMENT if required, the HtmlDocument objects will be created and filled.
  ACCESSTRACKING if required, scone's usertracking feature is used
  CONSIDERLINKS if required, Link Objects will be created and filled and LinkToken objects will be created
  CONSIDERINCLUSIONS if required, INCLUSION objects will be created and filled.
  CONSIDERKEYWORDS if required, Keyword objects will be created and filled. This feature will automatically require PARSEDOCUMENT.
  ADDPREAMBLE causes the AddPreambleEditor to be added to the proxy.
  RESOURCEGENERATOR causes the GeneralResourceGenerator to be added to the proxy
  RAS The Remote Access Server is started.

  These requirements have to be combined by the | operator: PARSEDOCUMENT | CONSIDERLINKS will cause scone to create HtmlDocument objects, Link objects and LinkToken objects.

  If a feature is not required by any of the registered plugins, scone will not support it at runtime.

  Returns:
    the requirements

### getRasPort

    public int getRasPort()

  Specify the port of the RAS-Server. This has to be implemented for your Plugin if you want to use the RAS-Server

  Returns:
    The number of the port to be used by the Server.

### init

    public abstract void init()

  Initializes a scone plugin. This method is called by the `Scone` framework.

### init

    public void init(Proxy proxy)

  sets the proxy variable. This method is used by the Scone framework and should not be overwritten.

  Parameters:
    `proxy` - the Proxy object

### addMeg

    public void addMeg(Meg meg)

  adds a MEG to WBI.

  Parameters:
    `meg` - the MEG

### getProperties

    public PersistentProperties getProperties()

  returns a PersistentProperties object that the framework provides for the plugin. It can be used conveniently to store properties. It is automatically stored as
  config/properties/[full.classname].xml

  Returns:
    the PersistentProperties object for the plugin

### saveProperties

    public void saveProperties()

  saves the properties if they have been changed. This method is not called by the framework, strange...

### displayConfigGUI

    public void displayConfigGUI(java.awt.Frame parent)

  displays a GUI that allows for editing the persistent properties for the plugin.

  Parameters:
    `parent` - a parent Frame for the config dialog

### displayConfigGUI

    public void displayConfigGUI(java.awt.Dialog parent)

  displays a GUI that allows for editing the persistent properties for the plugin.

  Parameters:
    `parent` - a parent Dialog for the config dialog

### enable

    public void enable()

  overwrite this method to enable plugin ectivities not yet implemented!

### disable

    public void disable()

  overwrite this method to shutdown plugin activities not yet implemented!

### terminate

    public void terminate()

  overwrite this method to be notified when the Proxy terminates

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD