From: David ‘Bombe’ Roden Date: Fri, 22 Oct 2010 09:57:20 +0000 (+0200) Subject: Add parameter to get the name of the parameter from the data provider. X-Git-Tag: 0.1-RC1~93 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=c6e1c058d0a83bc523accbe6a6068f295954422e;p=Sone.git Add parameter to get the name of the parameter from the data provider. --- diff --git a/src/main/java/net/pterodactylus/sone/template/RequestChangeFilter.java b/src/main/java/net/pterodactylus/sone/template/RequestChangeFilter.java index d9c453e..bd35fa4 100644 --- a/src/main/java/net/pterodactylus/sone/template/RequestChangeFilter.java +++ b/src/main/java/net/pterodactylus/sone/template/RequestChangeFilter.java @@ -47,6 +47,10 @@ public class RequestChangeFilter implements Filter { public Object format(DataProvider dataProvider, Object data, Map parameters) { Request request = (Request) data; String name = parameters.get("name"); + String nameKey = parameters.get("nameKey"); + if (nameKey != null) { + name = String.valueOf(dataProvider.getData(nameKey)); + } String key = parameters.get("key"); String value = null; if (key != null) {