Class ArgReplaceMethod
- java.lang.Object
-
- org.springframework.extensions.webscripts.ArgReplaceMethod
-
- All Implemented Interfaces:
freemarker.template.TemplateMethodModel,freemarker.template.TemplateMethodModelEx,freemarker.template.TemplateModel
public final class ArgReplaceMethod extends java.lang.Object implements freemarker.template.TemplateMethodModelExCustom FreeMarker Template language method.Given a URL string and N named/value pairs, replace each URL argument with respective name/value pair (if name matches existing URL argument), or add name/value pair to URL (if name does not match existing URL argument).
Usage: argreplace(url.args, "skipCount", cursor.nextPage, ...) Example: argreplace("?a=0&b=2", "a", 1, "c", 3) returns "?a=1&b=2&c=3"
- Author:
- davidc
-
-
Constructor Summary
Constructors Constructor Description ArgReplaceMethod()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectexec(java.util.List args)
-
-
-
Method Detail
-
exec
public java.lang.Object exec(java.util.List args) throws freemarker.template.TemplateModelException- Specified by:
execin interfacefreemarker.template.TemplateMethodModel- Specified by:
execin interfacefreemarker.template.TemplateMethodModelEx- Throws:
freemarker.template.TemplateModelException- See Also:
TemplateMethodModel.exec(java.util.List)
-
-