protected String getTemplate ( Token token ) { TemplateRenderer templateRenderer = activity . getActivityContext ( ) . getTemplateRenderer ( ) ; StringWriter writer = new StringWriter ( ) ; templateRenderer . render ( token . getName ( ) , activity , writer ) ; String result = writer . toString ( ) ; return ( result != null ? result : token . getDefaultValue ( ) ) ; }
Executes template returns the generated output .