org.mmbase.module
Class ProcessorModule

java.lang.Object
  extended byorg.mmbase.module.Module
      extended byorg.mmbase.module.ProcessorModule
All Implemented Interfaces:
ProcessorInterface
Direct Known Subclasses:
CALC, CommunityPrc, Config, HtmlBase, INFO, JDBC, LinkChecker, MMAdmin, MMBase, MMEdit, MMExport, MMImport, MMLanguage, MMUsers, Naming, RemoteMMCI, scanparser, sessions, Upload, XSLConvert

public class ProcessorModule
extends Module
implements ProcessorInterface

The Processor Module extends the basic module to the Processor interface so it can perform for servscan (pagelets).

Author:
Daniel Ockeloen
To Do:
Should be abstract, deprecated?

Constructor Summary
ProcessorModule()
           
 
Method Summary
 boolean cacheCheck(scanpage sp, java.lang.String cmd)
          Do a cache check (304) for this request
 java.util.Vector getList(scanpage sp, StringTagger params, java.lang.String command)
          Generate a list of values from a command to the processor
 MMObjectBuilder getListBuilder(java.lang.String command, java.util.Map params)
          Returns a virtual builder used to create node lists from the results returned by getList(). The default method does not associate the builder with a cloud (mmbase module), so processormodules that need this association need to override this method. Note that different lists may return different builders.
 java.util.Vector getNodeList(java.lang.Object context, java.lang.String command, java.util.Map params)
          Generate a list of values from a command to the processor. The values are grouped into nodes.
 void init()
          Initializes the module. Init must be overridden to read the environment variables it needs.
This method is called by Module.startModule(), which makes sure it is not called more than once. You should not call init() directly, call startModule() instead.
 void onload()
          prepares the module when loaded. Onload must be overridden to execute methods that need to be performed when the module is loaded but before any other modules are initailized.
This method is called by Module.startModules(). You should not call onload() directly.
 boolean process(scanpage sp, java.util.Hashtable cmds, java.util.Hashtable vars)
          Execute the commands provided in the form values
 void reload()
          Deprecated. called by nothing
 java.lang.String replace(scanpage sp, java.lang.String command)
          Replace a command by a string
 java.lang.String replace(scanpage sp, StringTagger command)
          Replace a command by a string who the hell uses this (daniel)
 void unload()
          Deprecated. called by nothing
 
Methods inherited from class org.mmbase.module.Module
getInitParameter, getInitParameters, getMaintainer, getMimeType, getMimeTypeFile, getModule, getModule, getModuleInfo, getModules, getName, getProperties, getProperty, getVersion, hasStarted, loadModulesFromDisk, maintainance, setInitParameter, setMaintainer, setName, setVersion, shutdown, shutdownModules, startModule, startModules, state
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProcessorModule

public ProcessorModule()
Method Detail

getListBuilder

public MMObjectBuilder getListBuilder(java.lang.String command,
                                      java.util.Map params)
Returns a virtual builder used to create node lists from the results returned by getList(). The default method does not associate the builder with a cloud (mmbase module), so processormodules that need this association need to override this method. Note that different lists may return different builders.

Specified by:
getListBuilder in interface ProcessorInterface
Parameters:
command - the LIST command for which to retrieve the builder
params - contains the attributes for the list

getNodeList

public java.util.Vector getNodeList(java.lang.Object context,
                                    java.lang.String command,
                                    java.util.Map params)
                             throws ParseException
Generate a list of values from a command to the processor. The values are grouped into nodes.

Specified by:
getNodeList in interface ProcessorInterface
Parameters:
context - the context of the page or calling application (currently, this should be a scanpage object)
command - the list command to execute.
params - contains the attributes for the list
Returns:
a Vector that contains the list values contained in MMObjectNode objects
Throws:
ParseException

getList

public java.util.Vector getList(scanpage sp,
                                StringTagger params,
                                java.lang.String command)
                         throws ParseException
Generate a list of values from a command to the processor

Specified by:
getList in interface ProcessorInterface
Parameters:
sp - the page context
params - contains the attributes for the list
Throws:
ParseException

process

public boolean process(scanpage sp,
                       java.util.Hashtable cmds,
                       java.util.Hashtable vars)
Execute the commands provided in the form values

Specified by:
process in interface ProcessorInterface

replace

public java.lang.String replace(scanpage sp,
                                java.lang.String command)
Replace a command by a string

Specified by:
replace in interface ProcessorInterface

replace

public java.lang.String replace(scanpage sp,
                                StringTagger command)
Replace a command by a string who the hell uses this (daniel)

Specified by:
replace in interface ProcessorInterface

cacheCheck

public boolean cacheCheck(scanpage sp,
                          java.lang.String cmd)
Do a cache check (304) for this request

Specified by:
cacheCheck in interface ProcessorInterface

reload

public void reload()
Deprecated. called by nothing

What should this do, when is this called? (MM)

Warning: No Java Documentation Available.

unload

public void unload()
Deprecated. called by nothing

What should this do, when is this called? (MM)

Warning: No Java Documentation Available.

init

public void init()
Initializes the module. Init must be overridden to read the environment variables it needs.
This method is called by Module.startModule(), which makes sure it is not called more than once. You should not call init() directly, call startModule() instead.

Specified by:
init in class Module
Warning: Scope will be changed to:
abstract

onload

public void onload()
prepares the module when loaded. Onload must be overridden to execute methods that need to be performed when the module is loaded but before any other modules are initailized.
This method is called by Module.startModules(). You should not call onload() directly.

Specified by:
onload in class Module
Warning: Scope will be changed to:
abstract


MMBase build 1.7.1.20041002