Class UrlRegexpTransform
- java.lang.Object
-
- org.apache.ofbiz.product.category.ftl.UrlRegexpTransform
-
- All Implemented Interfaces:
freemarker.template.TemplateModel
,freemarker.template.TemplateTransformModel
public class UrlRegexpTransform extends java.lang.Object implements freemarker.template.TemplateTransformModel
UrlRegexpTransform - Freemarker Transform for Products URLs (links)
-
-
Constructor Summary
Constructors Constructor Description UrlRegexpTransform()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
checkArg(java.util.Map<?,?> args, java.lang.String key, boolean defaultValue)
static boolean
forwardUri(javax.servlet.http.HttpServletResponse response, java.lang.String uri)
Forward a uri according to forward pattern regular expressions.java.io.Writer
getWriter(java.io.Writer out, java.util.Map args)
static java.lang.String
seoUrl(java.lang.String url, boolean isAnon)
Transform a url according to seo pattern regular expressions.
-
-
-
Method Detail
-
checkArg
public boolean checkArg(java.util.Map<?,?> args, java.lang.String key, boolean defaultValue)
-
getWriter
public java.io.Writer getWriter(java.io.Writer out, java.util.Map args)
- Specified by:
getWriter
in interfacefreemarker.template.TemplateTransformModel
-
seoUrl
public static java.lang.String seoUrl(java.lang.String url, boolean isAnon)
Transform a url according to seo pattern regular expressions.- Parameters:
url
- , String to do the seo transformisAnon
- , boolean to indicate whether it's an anonymous visit.- Returns:
- String, the transformed url.
-
forwardUri
public static boolean forwardUri(javax.servlet.http.HttpServletResponse response, java.lang.String uri)
Forward a uri according to forward pattern regular expressions. Note: this is developed for Filter usage.- Parameters:
uri
- String to reverse transform- Returns:
- String
-
-