org.mmbase.module
Class ProcessorModule

java.lang.Object
  extended by org.mmbase.util.functions.FunctionProvider
      extended by org.mmbase.util.functions.DescribedFunctionProvider
          extended by org.mmbase.module.Module
              extended by org.mmbase.module.ProcessorModule
All Implemented Interfaces:
Descriptor
Direct Known Subclasses:
CALC, HtmlBase, INFO, JDBC, LinkChecker, MMAdmin, MMBase, MMEdit, MMLanguage, MMUsers, scanparser, sessions, Upload, XSLConvert

public abstract class ProcessorModule
extends Module

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?

Nested Class Summary
protected  class ProcessorModule.GetNodeListFunction
          Function implementation around getNodeList(Object, String, Map).
protected  class ProcessorModule.ProcessFunction
          Function implementation around process(PageInfo, Hashtable, Hashtable).
protected  class ProcessorModule.ReplaceFunction
          Function implementation around replace(PageInfo, String).
 
Field Summary
protected static Parameter.Wrapper PARAM_PAGEINFO
           
protected static Parameter[] PARAMS_PAGEINFO
           
 
Fields inherited from class org.mmbase.module.Module
configurationPath, getMaintainerFunction, getVersionFunction, properties, STATE_START_TIME
 
Fields inherited from class org.mmbase.util.functions.DescribedFunctionProvider
description, guiName, name
 
Fields inherited from class org.mmbase.util.functions.FunctionProvider
functions, getFunctions
 
Constructor Summary
ProcessorModule()
           
ProcessorModule(String name)
           
 
Method Summary
 List<String> getList(PageInfo sp, StringTagger params, String command)
           
 MMObjectBuilder getListBuilder(String command, Map<String,?> params)
           
 List<MMObjectNode> getNodeList(Object context, String command, Map<String,?> params)
          This method is a wrapper around getList(PageInfo, StringTagger, String)
 void init()
          Initializes the module.
 void onload()
          prepares the module when loaded.
 boolean process(PageInfo sp, Hashtable<String,Object> cmds, Hashtable<String,Object> vars)
           
 void reload()
          Deprecated. called by nothing
 String replace(PageInfo sp, String command)
           
 String replace(PageInfo sp, StringTagger command)
           
 void unload()
          Deprecated. called by nothing
 
Methods inherited from class org.mmbase.module.Module
addInitParameters, checkModules, getInitParameter, getInitParameter, getInitParameter, getInitParameters, getInitParameters, getMaintainer, getModule, getModule, getModule, getModule, getModuleInfo, getModuleLoader, getModuleReader, getModuleReader, getModules, getState, getStates, getVersion, hasModule, hasStarted, loadInitParameters, loadInitParameters, maintainance, setInitParameter, setMaintainer, setState, setVersion, shutdown, shutdownModules, startModule, startModules
 
Methods inherited from class org.mmbase.util.functions.DescribedFunctionProvider
getDefaultLocale, getDescription, getDescription, getGUIName, getGUIName, getLocalizedDescription, getLocalizedGUIName, getName, setDescription, setDescription, setGUIName, setGUIName, setLocalizedDescription, setLocalizedGUIName, setName
 
Methods inherited from class org.mmbase.util.functions.FunctionProvider
addFunction, createParameters, getFunction, getFunctions, getFunctionValue, newFunctionInstance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PARAMS_PAGEINFO

protected static final Parameter[] PARAMS_PAGEINFO

PARAM_PAGEINFO

protected static final Parameter.Wrapper PARAM_PAGEINFO
Constructor Detail

ProcessorModule

public ProcessorModule()

ProcessorModule

public ProcessorModule(String name)
Method Detail

getListBuilder

public MMObjectBuilder getListBuilder(String command,
                                      Map<String,?> params)
Javadoc:

getNodeList

public List<MMObjectNode> getNodeList(Object context,
                                      String command,
                                      Map<String,?> params)
This method is a wrapper around getList(PageInfo, StringTagger, String)

Parameters:
context - The PageInfo object. It beats me why it is Object and not PageInfo. I think it's silly.
command - The command to execute
params - Parameters, they will be added to the StringTagger.

getList

public List<String> getList(PageInfo sp,
                            StringTagger params,
                            String command)
Javadoc:

process

public boolean process(PageInfo sp,
                       Hashtable<String,Object> cmds,
                       Hashtable<String,Object> vars)
Javadoc:

replace

public String replace(PageInfo sp,
                      String command)
Javadoc:

replace

public String replace(PageInfo sp,
                      StringTagger command)
Javadoc:
who the hell uses this (daniel)

reload

public void reload()
Deprecated. called by nothing

What should this do, when is this called?

Javadoc:

unload

public void unload()
Deprecated. called by nothing

What should this do, when is this called?

Javadoc:

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.

Overrides:
init in class Module
Scope:
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.

Overrides:
onload in class Module
Scope:
abstract


MMBase 2.0-SNAPSHOT - null