public class ModuleHandler extends Object implements Module, InvocationHandler
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Module m)
Compares this module to the passed object.
|
Parameters |
createParameters(String functionName)
Creates a parameter list for a function.
|
boolean |
equals(Object o)
Compares two modules, and returns true if they are equal.
|
protected Cloud |
getCloud(Map parameters) |
CloudContext |
getCloudContext()
Retrieves the CloudContext to which this module belongs
|
String |
getDescription()
Returns the description of this object for the default locale.
|
String |
getDescription(Locale locale)
Returns the description of this object.
|
Function<?> |
getFunction(String functionName)
Returns a Function object.
|
Collection<Function<?>> |
getFunctions()
Returns all the Function objects of this Module.
|
FieldValue |
getFunctionValue(String functionName,
List<?> parameters)
Executes a function on this module with the given parameters, and returns the result.
|
String |
getGUIName()
Returns the GUI name for this object.
|
String |
getGUIName(Locale locale)
Returns the GUI name for this object in a specified preferred language.
|
String |
getInfo(String command)
Retrieve info from a module based on a command string.
|
String |
getInfo(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(String command,
Map<String,?> parameters)
Retrieve info (as a list of virtual nodes) from a module based on a command string.
|
NodeList |
getList(String command,
Map<String,?> 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.
|
LocalizedString |
getLocalizedDescription()
Returns the set of (localized) descriptions of this object.
|
LocalizedString |
getLocalizedGUIName()
Returns the set of (localized) gui names of this object.
|
static Module |
getModule(Module mod,
CloudContext cloudcontext) |
String |
getName()
Retrieve the name of the module (in the default language defined in mmbaseroot.xml).
|
Map<String,String> |
getProperties()
Retrieve a copy of the module's properties
|
String |
getProperty(String name)
Retrieve a property of the module.
|
int |
hashCode() |
Object |
invoke(Object proxy,
Method method,
Object[] args) |
void |
process(String command,
Object parameter)
Runs the command with the given parameter(s).
|
void |
process(String command,
Object parameter,
Map<String,Object> auxparameters)
Runs the command with the given parameter(s).
|
void |
process(String command,
Object parameter,
Map<String,Object> auxparameters,
javax.servlet.ServletRequest req,
javax.servlet.ServletResponse resp)
Runs the command with the given parameter(s).
|
void |
setDescription(String desc)
Sets the description of this object for the default locale.
|
void |
setDescription(String desc,
Locale locale)
Sets the description of this object.
|
void |
setGUIName(String g)
Sets the GUI name of this object for the default locale.
|
void |
setGUIName(String g,
Locale locale)
Sets the GUI name of this object.
|
protected void |
setLocalizedDescription(LocalizedString description) |
protected void |
setLocalizedGUIName(LocalizedString value) |
public static Module getModule(Module mod, CloudContext cloudcontext)
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
invoke in interface InvocationHandlerThrowablepublic CloudContext getCloudContext()
ModulegetCloudContext in interface Modulepublic String getName()
ModulegetName in interface DescriptorgetName in interface Modulepublic String getProperty(String name)
ModulegetProperty in interface Modulename - the name of the propertypublic Map<String,String> getProperties()
ModulegetProperties in interface Modulepublic String getDescription()
DescriptorgetDescription in interface Descriptorpublic String getDescription(Locale locale)
DescriptorgetDescription in interface Descriptorlocale - The locale for which this must be returned, or null for a default locale.
If no fitting description for the given locale is available, getName() can be returned.public LocalizedString getLocalizedDescription()
DescriptorgetLocalizedDescription in interface Descriptorprotected void setLocalizedDescription(LocalizedString description)
public void setDescription(String desc, Locale locale)
DescriptorsetDescription in interface Descriptordesc - the description as a Stringlocale - The locale for which this is valid, or null for a default locale.public void setDescription(String desc)
DescriptorsetDescription in interface Descriptordesc - the description as a Stringpublic String getGUIName(Locale locale)
DescriptorgetGUIName in interface Descriptorlocale - the locale that determines the language for the GUI namepublic String getGUIName()
DescriptorgetGUIName in interface Descriptorpublic void setGUIName(String g, Locale locale)
DescriptorsetGUIName in interface Descriptorg - the description as a Stringlocale - The locale for which this is valid, or null for the default locale.public void setGUIName(String g)
DescriptorsetGUIName in interface Descriptorg - the description as a Stringpublic LocalizedString getLocalizedGUIName()
DescriptorgetLocalizedGUIName in interface Descriptorprotected void setLocalizedGUIName(LocalizedString value)
public String getInfo(String command)
Modulepublic String getInfo(String command, javax.servlet.ServletRequest req, javax.servlet.ServletResponse resp)
ModulegetInfo in interface Modulecommand - 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.public void process(String command, Object parameter)
Modulepublic void process(String command, Object parameter, Map<String,Object> auxparameters)
Modulepublic void process(String command, Object parameter, Map<String,Object> auxparameters, javax.servlet.ServletRequest req, javax.servlet.ServletResponse resp)
Moduleprocess in interface Modulecommand - the command to run, i.e. "MESSAGE-UPDATE".parameter - 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.public NodeList getList(String command, Map<String,?> parameters)
Modulepublic NodeList getList(String command, Map<String,?> parameters, javax.servlet.ServletRequest req, javax.servlet.ServletResponse resp)
ModulegetList in interface Modulecommand - the info to obtain, i.e. "USER-OS".parameters - a hashtable containing the named parameters of the list.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.public int compareTo(Module m)
compareTo in interface Comparable<Module>m - the Module to compare it withComparable.compareTo(Object)public boolean equals(Object o)
public Collection<Function<?>> getFunctions()
ModulegetFunctions in interface ModuleFunction objects.public Function<?> getFunction(String functionName)
ModuleFunction object.
You need to explicitly cast the result to this object, since not all bridge
implementations (i.e. the RMMCI) support this class.getFunction in interface ModulefunctionName - name of the functionFunction object.public Parameters createParameters(String functionName)
ModulecreateParameters in interface ModulefunctionName - name of the functionParameters object.public FieldValue getFunctionValue(String functionName, List<?> parameters)
ModulegetFunctionValue in interface ModulefunctionName - name of the functionparameters - list with parameters for the functionMMBase 1.9-SNAPSHOT - ${javadoctimestamp}