ro.isdc.wro.extensions.processor.support.handlebarsjs
Class HandlebarsJs

java.lang.Object
  extended by ro.isdc.wro.extensions.processor.support.template.AbstractJsTemplateCompiler
      extended by ro.isdc.wro.extensions.processor.support.handlebarsjs.HandlebarsJs

public class HandlebarsJs
extends AbstractJsTemplateCompiler

HandlebarsJS is a JavaScript templating engine which provides the power necessary to let you build semantic templates effectively with no frustration.

Author:
heldeen

Field Summary
static String HANDLEBARS_JS_TEMPLATES_INIT
          visible for testing, the init of a HandlebarsJs template
 
Constructor Summary
HandlebarsJs()
           
 
Method Summary
 String compile(String content, String name)
          Compiles the javascript template into plain javascript.
protected  String getCompileCommand()
           
protected  InputStream getCompilerAsStream()
           
 
Methods inherited from class ro.isdc.wro.extensions.processor.support.template.AbstractJsTemplateCompiler
getArguments
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HANDLEBARS_JS_TEMPLATES_INIT

public static final String HANDLEBARS_JS_TEMPLATES_INIT
visible for testing, the init of a HandlebarsJs template

See Also:
Constant Field Values
Constructor Detail

HandlebarsJs

public HandlebarsJs()
Method Detail

compile

public String compile(String content,
                      String name)
Description copied from class: AbstractJsTemplateCompiler
Compiles the javascript template into plain javascript.

Overrides:
compile in class AbstractJsTemplateCompiler
Parameters:
content - the template to be compiled.
name - any additional arguments used by template script.
Returns:
the compiled javascript.

getCompileCommand

protected String getCompileCommand()
Specified by:
getCompileCommand in class AbstractJsTemplateCompiler
Returns:
the js statement used to execute the compilation of the template.

getCompilerAsStream

protected InputStream getCompilerAsStream()
Specified by:
getCompilerAsStream in class AbstractJsTemplateCompiler
Returns:
the stream of the compiler resource (javascript) used to compile templates.


Copyright © 2008-2013. All Rights Reserved.