ee.mare.indrek.jtlt.macros
Class UrlKeyMacro

Object
  extended byee.mare.indrek.jtlt.macros.KeyMacro
      extended byee.mare.indrek.jtlt.macros.UrlKeyMacro
All Implemented Interfaces:
TemplateMacro

public class UrlKeyMacro
extends KeyMacro

A macro (KEYURL) that encodes data suitable for use inside a URL string.


Nested Class Summary
 
Nested classes inherited from class ee.mare.indrek.jtlt.macros.KeyMacro
KeyMacro.KeyValue
 
Constructor Summary
UrlKeyMacro()
           
UrlKeyMacro(String name)
           
 
Method Summary
 String process(TemplateParams ctx, String name, String args)
          This method is called with given block context whenever a macro with registered name is found inside the tempalate.
 
Methods inherited from class ee.mare.indrek.jtlt.macros.KeyMacro
getName, isParsetime, isRecursive
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UrlKeyMacro

public UrlKeyMacro()

UrlKeyMacro

public UrlKeyMacro(String name)
Method Detail

process

public String process(TemplateParams ctx,
                      String name,
                      String args)
Description copied from interface: TemplateMacro
This method is called with given block context whenever a macro with registered name is found inside the tempalate. The macros are resolved immediately only if they are parsetime, otherwise on every Template.toString the data structures are parsed and macros expanded. If macro is parsetime the ctx is taken from the generator. You can add parameters into the template using the Template.addParam, for parsetime macros you'd have to extend the TemplateGenerator.

Specified by:
process in interface TemplateMacro
Overrides:
process in class KeyMacro