org.mmbase.bridge
Interface Module

All Known Implementing Classes:
ModuleHandler

public interface Module

Modules are pieces of functionality that are not MMBase objects. e.g. Session, Mail, Upload and other functionality

Version:
$Id: Module.java,v 1.10 2002/08/14 19:08:07 michiel Exp $
Author:
Rob Vermeulen, Pierre van Rooden

Method Summary
 CloudContext getCloudContext()
          Retrieves the CloudContext to which this module belongs
 java.lang.String getDescription()
          Retrieve the description of the module.
 java.lang.String getInfo(java.lang.String command)
          Retrieve info from a module based on a command string.
 java.lang.String getInfo(java.lang.String command, javax.servlet.ServletRequest req, javax.servlet.ServletResponse resp)
          Retrieve info from a module based on a command string Similar to the $MOD command in SCAN.
 NodeList getList(java.lang.String command, java.util.Map parameters)
          Retrieve info (as a list of virtual nodes) from a module based on a command string.
 NodeList getList(java.lang.String command, java.util.Map parameters, javax.servlet.ServletRequest req, javax.servlet.ServletResponse resp)
          Retrieve info from a module based on a command string Similar to the LIST command in SCAN.
 java.lang.String getName()
          Retrieve the name of the module (in the default language defined in mmbaseroot.xml).
 void process(java.lang.String command, java.lang.Object parameter)
          Runs the command with the given parameter(s).
 void process(java.lang.String command, java.lang.Object parameter, java.util.Map auxparameters)
          Runs the command with the given parameter(s).
 void process(java.lang.String command, java.lang.Object parameter, java.util.Map auxparameters, javax.servlet.ServletRequest req, javax.servlet.ServletResponse resp)
          Runs the command with the given parameter(s).
 

Method Detail

getCloudContext

public CloudContext getCloudContext()
Retrieves the CloudContext to which this module belongs

getName

public java.lang.String getName()
Retrieve the name of the module (in the default language defined in mmbaseroot.xml).

getDescription

public java.lang.String getDescription()
Retrieve the description of the module.

process

public void process(java.lang.String command,
                    java.lang.Object parameter)
Runs the command with the given parameter(s).
Parameters:
command - the command to run, i.e. "MESSAGE-UPDATE".
parameters - the main parameter for the command. Depends on the command issued. Not all commands make use of this parameter.

process

public void process(java.lang.String command,
                    java.lang.Object parameter,
                    java.util.Map auxparameters)
Runs the command with the given parameter(s).
Parameters:
command - the command to run, i.e. "MESSAGE-UPDATE".
parameters - the main parameter for the command. Depends on the command issued. Not all commands make use of this parameter.
auxparameters - additional parameters for this command.

process

public void process(java.lang.String command,
                    java.lang.Object parameter,
                    java.util.Map auxparameters,
                    javax.servlet.ServletRequest req,
                    javax.servlet.ServletResponse resp)
Runs the command with the given parameter(s).
Parameters:
command - the command to run, i.e. "MESSAGE-UPDATE".
parameters - the main parameter for the command. Depends on the command issued. Not all commands make use of this parameter.
auxparameters - additional parameters for this command.
req - the Request item to use for obtaining user information. For backward compatibility.
resp - the Response item to use for redirecting users. For backward compatibility.

getInfo

public java.lang.String getInfo(java.lang.String command)
Retrieve info from a module based on a command string. Similar to the $MOD command in SCAN.
Parameters:
command - the info to obtain, i.e. "USER-OS".

getInfo

public java.lang.String getInfo(java.lang.String command,
                                javax.servlet.ServletRequest req,
                                javax.servlet.ServletResponse resp)
Retrieve info from a module based on a command string Similar to the $MOD command in SCAN.
Parameters:
command - the info to obtain, i.e. "USER-OS".
req - the Request item to use for obtaining user information. For backward compatibility.
resp - the Response item to use for redirecting users. For backward compatibility.

getList

public NodeList getList(java.lang.String command,
                        java.util.Map parameters)
Retrieve info (as a list of virtual nodes) from a module based on a command string. Similar to the LIST command in SCAN. The values retrieved are represented as fields of a virtual node, named following the fieldnames listed in the fields paramaters..
Parameters:
command - the info to obtain, i.e. "USER-OS".
fields - The names for the fields to retrieve. This allows a user to set it's own names for the fields (i.e. when calling the COLORS List command of the info module, this could be "RGB,name". If the number of names do not match the number of items returns, any additional items are numbered according to their position, given names such as "item1".
parameters - a hashtable containing the named parameters of the list.

getList

public NodeList getList(java.lang.String command,
                        java.util.Map parameters,
                        javax.servlet.ServletRequest req,
                        javax.servlet.ServletResponse resp)
Retrieve info from a module based on a command string Similar to the LIST command in SCAN. The values retrieved are represented as fields of a virtual node, named following the fieldnames listed in the fields paramaters..
Parameters:
command - the info to obtain, i.e. "USER-OS".
parameters - a hashtable containing the named parameters of the list.
fields - The names for the fields to retrieve. This allows a user to set it's own names for the fields (i.e. when calling the COLORS List command of the info module, this could be "RGB,name". If the number of names do not match the number of items returns, any additional items are numbered according to their position, given names such as "item1".
req - the Request item to use for obtaining user information. For backward compatibility.
resp - the Response item to use for redirecting users. For backward compatibility.


MMBase build 1.6.5.20030923