Class SeoTransform

  • All Implemented Interfaces:
    freemarker.template.TemplateModel, freemarker.template.TemplateTransformModel

    public class SeoTransform
    extends java.lang.Object
    implements freemarker.template.TemplateTransformModel
    SeoTransform - Freemarker Transform for URLs (links)
    • Field Summary

      • Fields inherited from interface freemarker.template.TemplateModel

    • Constructor Summary

      Constructor Description
    • 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) getWriter​( 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

      • SeoTransform

        public SeoTransform()
    • Method Detail

      • checkArg

        public boolean checkArg​(java.util.Map<?,​?> args,
                                java.lang.String key,
                                boolean defaultValue)
      • getWriter

        public getWriter​( 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.
        url - , String to do the seo transform
        isAnon - , boolean to indicate whether it's an anonymous visit.
        String, the transformed url.