Add filter that can remove single elements from collections.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Tue, 31 Jul 2012 09:10:41 +0000 (11:10 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Tue, 31 Jul 2012 09:10:41 +0000 (11:10 +0200)
src/main/java/net/pterodactylus/demoscenemusic/core/TemplateServlet.java

index 0eb9e3e..cfc3fdb 100644 (file)
@@ -60,6 +60,7 @@ import net.pterodactylus.util.template.CollectionSortFilter;
 import net.pterodactylus.util.template.HtmlFilter;
 import net.pterodactylus.util.template.MatchFilter;
 import net.pterodactylus.util.template.ReflectionAccessor;
+import net.pterodactylus.util.template.RemoveFilter;
 import net.pterodactylus.util.template.Template;
 import net.pterodactylus.util.template.TemplateContextFactory;
 import net.pterodactylus.util.template.TemplateParser;
@@ -129,6 +130,7 @@ public class TemplateServlet extends HttpServlet {
                templateContextFactory.addFilter("matches", new MatchFilter());
                templateContextFactory.addFilter("time", new DurationFilter());
                templateContextFactory.addFilter("concise", new ConciseNumberFilter());
+               templateContextFactory.addFilter("remove", new RemoveFilter());
 
                templateContextFactory.addTemplateObject("core", core);
                templateContextFactory.addTemplateObject("dataManager", core.getDataManager());