Class 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)
    • Field Summary

      • Fields inherited from interface freemarker.template.TemplateModel

        NOTHING
    • 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • UrlRegexpTransform

        public UrlRegexpTransform()
    • 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 interface freemarker.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 transform
        isAnon - , 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