org.mmbase.module
Class ProcessorModule

java.lang.Object
  |
  +--org.mmbase.module.Module
        |
        +--org.mmbase.module.ProcessorModule
All Implemented Interfaces:
ProcessorInterface
Direct Known Subclasses:
CALC, CommunityPrc, Config, Counter, HtmlBase, INFO, IrcModule, JDBC, LinkChecker, MMAdmin, MMBase, MMEdit, MMExport, MMImport, MMLanguage, MMUsers, Poll, scanparser, sessions, Stats, Upload, XSLConvert

public class ProcessorModule
extends Module
implements ProcessorInterface

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

Author:
Daniel Ockeloen

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().
 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.
 void init()
          Initializes the module.
 void onload()
           
 boolean process(scanpage sp, java.util.Hashtable cmds, java.util.Hashtable vars)
          Execute the commands provided in the form values
 void reload()
           
 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 shutdown()
           
 void unload()
           
 
Methods inherited from class org.mmbase.module.Module
getClassName, getInitParameter, getInitParameters, getMaintainer, getMimeType, getMimeTypeFile, getModule, getModule, getModuleInfo, getModules, getName, getProperties, getProperty, getVersion, hasStarted, loadModulesFromDisk, maintainance, setClassName, setInitParameter, setMaintainer, setName, setVersion, 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

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
command - the list command to execute.

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

init

public void init()
Description copied from class: Module
Initializes the module. Init can 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.
Overrides:
init in class Module

reload

public void reload()

onload

public void onload()
Overrides:
onload in class Module

unload

public void unload()

shutdown

public void shutdown()


MMBase 2001