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

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
 

Constructor Detail

HandlebarsJs

public HandlebarsJs()
Method Detail

compile

public String compile(String content,
                      String name)
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()
                                   throws IOException

Specified by:
getCompilerAsStream in class AbstractJsTemplateCompiler
Returns:
the stream of the compiler resource (javascript) used to compile templates.
Throws:
IOException - if the stream could not be located.


Copyright © 2008-2013. All Rights Reserved.