Class AbstractTrimDirectiveModel

  • All Implemented Interfaces:
    freemarker.template.TemplateDirectiveModel, freemarker.template.TemplateModel
    Direct Known Subclasses:
    CustomTrimDirective

    public abstract class AbstractTrimDirectiveModel
    extends java.lang.Object
    implements freemarker.template.TemplateDirectiveModel
    The Class AbstractTrimDirectiveModel.

    Created: 2016. 1. 29.

    • Field Summary

      • Fields inherited from interface freemarker.template.TemplateModel

        NOTHING
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      void execute​(freemarker.core.Environment env, java.util.Map params, freemarker.template.TemplateModel[] loopVars, freemarker.template.TemplateDirectiveBody body)  
      protected abstract Trimmer getTrimmer​(java.util.Map params)
      Gets trimmer.
      protected java.lang.String[] parseSequenceParameter​(java.util.Map params, java.lang.String paramName)
      Parse sequence parameter.
      protected java.lang.String parseStringParameter​(java.util.Map params, java.lang.String paramName)
      Parse string parameter.
      • Methods inherited from class java.lang.Object

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

      • AbstractTrimDirectiveModel

        public AbstractTrimDirectiveModel()
    • Method Detail

      • execute

        public void execute​(freemarker.core.Environment env,
                            java.util.Map params,
                            freemarker.template.TemplateModel[] loopVars,
                            freemarker.template.TemplateDirectiveBody body)
                     throws freemarker.template.TemplateException,
                            java.io.IOException
        Specified by:
        execute in interface freemarker.template.TemplateDirectiveModel
        Throws:
        freemarker.template.TemplateException
        java.io.IOException
      • getTrimmer

        protected abstract Trimmer getTrimmer​(java.util.Map params)
                                       throws freemarker.template.TemplateModelException
        Gets trimmer.
        Parameters:
        params - the params
        Returns:
        the trimmer
        Throws:
        freemarker.template.TemplateModelException - the template model exception
      • parseStringParameter

        protected java.lang.String parseStringParameter​(java.util.Map params,
                                                        java.lang.String paramName)
        Parse string parameter.
        Parameters:
        params - the params
        paramName - the param name
        Returns:
        the string
      • parseSequenceParameter

        protected java.lang.String[] parseSequenceParameter​(java.util.Map params,
                                                            java.lang.String paramName)
                                                     throws freemarker.template.TemplateModelException
        Parse sequence parameter.
        Parameters:
        params - the params
        paramName - the param name
        Returns:
        the string [ ]
        Throws:
        freemarker.template.TemplateModelException - the template model exception