|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mmbase.bridge.implementation.ModuleHandler
public class ModuleHandler
ModuleHandler Creates a framework for calling modules. Supports calls to the methods supported by the MMBase ProcessorModules.
| Method Summary | |
|---|---|
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,
ServletRequest req,
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,
ServletRequest req,
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,
ServletRequest req,
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)
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
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()
Module
getCloudContext in interface Moduleprotected Cloud getCloud(Map parameters)
public String getName()
Module
getName in interface DescriptorgetName in interface Modulepublic String getProperty(String name)
Module
getProperty in interface Modulename - the name of the property
public Map<String,String> getProperties()
Module
getProperties in interface Modulepublic String getDescription()
Descriptor
getDescription in interface Descriptorpublic String getDescription(Locale locale)
Descriptor
getDescription 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()
Descriptor
getLocalizedDescription in interface Descriptorprotected void setLocalizedDescription(LocalizedString description)
public void setDescription(String desc,
Locale locale)
Descriptor
setDescription 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)
Descriptor
setDescription in interface Descriptordesc - the description as a Stringpublic String getGUIName(Locale locale)
Descriptor
getGUIName in interface Descriptorlocale - the locale that determines the language for the GUI name
public String getGUIName()
Descriptor
getGUIName in interface Descriptor
public void setGUIName(String g,
Locale locale)
Descriptor
setGUIName 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)
Descriptor
setGUIName in interface Descriptorg - the description as a Stringpublic LocalizedString getLocalizedGUIName()
Descriptor
getLocalizedGUIName in interface Descriptorprotected void setLocalizedGUIName(LocalizedString value)
public String getInfo(String command)
Module
getInfo in interface Modulecommand - the info to obtain, i.e. "USER-OS".
public String getInfo(String command,
ServletRequest req,
ServletResponse resp)
Module
getInfo 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)
Module
process 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.
public void process(String command,
Object parameter,
Map<String,Object> auxparameters)
Module
process 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.
public void process(String command,
Object parameter,
Map<String,Object> auxparameters,
ServletRequest req,
ServletResponse resp)
Module
process 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)
Module
getList in interface Modulecommand - the info to obtain, i.e. "USER-OS".parameters - a hashtable containing the named parameters of the list.
public NodeList getList(String command,
Map<String,?> parameters,
ServletRequest req,
ServletResponse resp)
Module
getList 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 with
Comparable.compareTo(Object)public boolean equals(Object o)
equals in class Objecto - the object to compare it withpublic int hashCode()
hashCode in class Objectpublic Collection<Function<?>> getFunctions()
Module
getFunctions 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 function
Function object.public Parameters createParameters(String functionName)
Module
createParameters in interface ModulefunctionName - name of the function
Parameters object.
public FieldValue getFunctionValue(String functionName,
List<?> parameters)
Module
getFunctionValue in interface ModulefunctionName - name of the functionparameters - list with parameters for the function
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||