org.mmbase.util.functions
Class PatternNodeFunctionProvider
java.lang.Object
org.mmbase.util.functions.FunctionProvider
org.mmbase.util.functions.PatternNodeFunctionProvider
public class PatternNodeFunctionProvider
- extends FunctionProvider
This Function provider creates function objects , which can create a String function based on a
pattern. Several kind of patterns are recognized. {PARAM.abc} creates a parameter 'abc' and puts the
value of it on that place in the result. {NODE.title}, puts the title field of the node on which
the function was applied on that place, and {REQUEST.getContextPath} applies that method to the
request parameter (and the result is added). {INITPARAM.xyz} access the servletcontext init parameters xyz.
It is also possible to use request parameters and attributes with {REQUESTPARAM.xxx} and {REQUESTATTRIBUTE.yyy}.
The functions which are created have silly names like string0, string1 etc, so you want to wrap
them in a function with a reasonable name (this is done when specifying this thing in the builder
xml).
- Since:
- MMBase-1.8
- Version:
- $Id: PatternNodeFunctionProvider.java 41943 2010-04-16 17:18:19Z michiel $
- Author:
- Michiel Meeuwissen
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PatternNodeFunctionProvider
public PatternNodeFunctionProvider()
getInstance
public static PatternNodeFunctionProvider getInstance()
getFunction
public Function<String> getFunction(String name)
- Description copied from class:
FunctionProvider
- Returns the Function object with given name.
- Overrides:
getFunction in class FunctionProvider
- Returns:
- Function object or
null if no such function is provided.
getRequestMethods
public static Map<String,Method> getRequestMethods(String template)
handleRequest
public static void handleRequest(StringBuffer sb,
Parameters parameters,
Map<String,Method> requestMethods)
- Parameters:
sb - StringBuffer (not a StringBuilder, because there is no appendTail(StringBuilder)...)- Since:
- MMBase-1.9
MMBase 2.0-SNAPSHOT - null