Class AbsoluteUrlMethod

  • All Implemented Interfaces:
    freemarker.template.TemplateMethodModel, freemarker.template.TemplateMethodModelEx, freemarker.template.TemplateModel

    public final class AbsoluteUrlMethod
    extends java.lang.Object
    implements freemarker.template.TemplateMethodModelEx
    Author:
    David Caruana Custom FreeMarker Template language method.

    Render absolute url for the specified url (only if the url isn't already absolute).

    Usage: absurl(String url)

    • Field Summary

      • Fields inherited from interface freemarker.template.TemplateModel

        NOTHING
    • Constructor Summary

      Constructors 
      Constructor Description
      AbsoluteUrlMethod​(java.lang.String basePath)
      Construct
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object exec​(java.util.List args)  
      • Methods inherited from class java.lang.Object

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

      • AbsoluteUrlMethod

        public AbsoluteUrlMethod​(java.lang.String basePath)
        Construct
        Parameters:
        basePath - base path used to construct absolute url
    • Method Detail

      • exec

        public java.lang.Object exec​(java.util.List args)
                              throws freemarker.template.TemplateModelException
        Specified by:
        exec in interface freemarker.template.TemplateMethodModel
        Specified by:
        exec in interface freemarker.template.TemplateMethodModelEx
        Throws:
        freemarker.template.TemplateModelException
        See Also:
        TemplateMethodModel.exec(java.util.List)