public class CompilerFacade extends Object implements CompilersConfiguration
Modifier and Type | Field and Description |
---|---|
protected java.util.function.Supplier<Compilers> |
compilers |
protected java.util.function.Supplier<MarkdownCompiler> |
markdownCompiler |
protected Resources |
resources |
protected java.util.function.Supplier<TemplatingEngine> |
templatingEngine |
protected java.util.function.Supplier<ViewCompiler> |
viewCompiler |
Constructor and Description |
---|
CompilerFacade(Env env,
Resources resources) |
Modifier and Type | Method and Description |
---|---|
void |
addHandlebarsResolver(com.github.jknack.handlebars.ValueResolver resolver) |
boolean |
canCompile(String extension) |
CacheEntry |
compile(java.nio.file.Path path) |
CacheEntry |
compile(SourceFile sourceFile) |
String |
compiledExtension(String extension) |
void |
configureHandlebars(java.util.function.Consumer<com.github.jknack.handlebars.Handlebars> action) |
Set<String> |
extensionsThatCompileTo(String extension) |
java.nio.file.Path |
findPublicSourceFor(String uri) |
void |
registerCompiler(java.util.function.Supplier<Compiler> compilerFactory,
String compiledExtension,
String sourceExtension) |
String |
renderView(String uri,
Map<String,?> variables) |
boolean |
supportsTemplating(java.nio.file.Path path) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addHandlebarsHelpers, addHandlebarsHelpers
protected final Resources resources
protected final java.util.function.Supplier<Compilers> compilers
protected final java.util.function.Supplier<TemplatingEngine> templatingEngine
protected final java.util.function.Supplier<ViewCompiler> viewCompiler
protected final java.util.function.Supplier<MarkdownCompiler> markdownCompiler
public void registerCompiler(java.util.function.Supplier<Compiler> compilerFactory, String compiledExtension, String sourceExtension)
registerCompiler
in interface CompilersConfiguration
public void configureHandlebars(java.util.function.Consumer<com.github.jknack.handlebars.Handlebars> action)
configureHandlebars
in interface CompilersConfiguration
public void addHandlebarsResolver(com.github.jknack.handlebars.ValueResolver resolver)
addHandlebarsResolver
in interface CompilersConfiguration
public boolean canCompile(String extension)
public CacheEntry compile(java.nio.file.Path path) throws IOException
IOException
public CacheEntry compile(SourceFile sourceFile) throws IOException
IOException
public boolean supportsTemplating(java.nio.file.Path path)
public java.nio.file.Path findPublicSourceFor(String uri)
Copyright © 2015. All Rights Reserved.