From 9e8288cad876b3c86ce3bbd1a7daaee8d32137e2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Fri, 22 Oct 2010 11:46:36 +0200 Subject: [PATCH] Add plugins to template factory. --- src/main/java/net/pterodactylus/sone/web/WebInterface.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/net/pterodactylus/sone/web/WebInterface.java b/src/main/java/net/pterodactylus/sone/web/WebInterface.java index 427570d..b4a0510 100644 --- a/src/main/java/net/pterodactylus/sone/web/WebInterface.java +++ b/src/main/java/net/pterodactylus/sone/web/WebInterface.java @@ -33,6 +33,7 @@ import net.pterodactylus.sone.data.Post; import net.pterodactylus.sone.data.Sone; import net.pterodactylus.sone.freenet.L10nFilter; import net.pterodactylus.sone.main.SonePlugin; +import net.pterodactylus.sone.template.GetPagePlugin; import net.pterodactylus.sone.template.PostAccessor; import net.pterodactylus.sone.template.RequestChangeFilter; import net.pterodactylus.sone.template.SoneAccessor; @@ -46,6 +47,7 @@ import net.pterodactylus.util.logging.Logging; import net.pterodactylus.util.service.AbstractService; import net.pterodactylus.util.template.DateFilter; import net.pterodactylus.util.template.DefaultTemplateFactory; +import net.pterodactylus.util.template.PaginationPlugin; import net.pterodactylus.util.template.ReflectionAccessor; import net.pterodactylus.util.template.Template; import net.pterodactylus.util.template.TemplateException; @@ -157,6 +159,8 @@ public class WebInterface extends AbstractService { templateFactory.addFilter("substring", new SubstringFilter()); templateFactory.addFilter("xml", new XmlFilter()); templateFactory.addFilter("change", new RequestChangeFilter()); + templateFactory.addPlugin("getpage", new GetPagePlugin()); + templateFactory.addPlugin("paginate", new PaginationPlugin()); templateFactory.setTemplateProvider(new ClassPathTemplateProvider(templateFactory)); templateFactory.addTemplateObject("formPassword", sonePlugin.pluginRespirator().getToadletContainer().getFormPassword()); -- 2.7.4