* The Sone plugin
*/
@Inject
- public WebInterface(SonePlugin sonePlugin) {
+ public WebInterface(SonePlugin sonePlugin, Loaders loaders) {
this.sonePlugin = sonePlugin;
+ this.loaders = loaders;
formPassword = sonePlugin.pluginRespirator().getToadletContainer().getFormPassword();
- soneTextParser = new SoneTextParser(getCore(), getCore());
+ soneTextParser = new SoneTextParser(getCore(), getCore(), getCore());
templateContextFactory = new TemplateContextFactory();
templateContextFactory.addAccessor(Object.class, new ReflectionAccessor());
templateContextFactory.addFilter("unique", new UniqueElementFilter());
templateContextFactory.addFilter("mod", new ModFilter());
templateContextFactory.addFilter("paginate", new PaginationFilter());
+ templateContextFactory.addFilter("build-id", new BuildIdFilter());
templateContextFactory.addProvider(TemplateProvider.TEMPLATE_CONTEXT_PROVIDER);
- templateContextFactory.addProvider(new ClassPathTemplateProvider(WebInterface.class, "/templates/"));
+ templateContextFactory.addProvider(loaders.getTemplateProvider());
templateContextFactory.addTemplateObject("webInterface", this);
templateContextFactory.addTemplateObject("formPassword", formPassword);