Author: bpoussin Date: 2012-04-24 16:55:08 +0200 (Tue, 24 Apr 2012) New Revision: 136 Url: http://chorem.org/repositories/revision/chorem/136 Log: utilisation de WikittyClient au lieu de WikittyProxy Modified: trunk/chorem-entities/src/main/java/org/chorem/entities/InvoiceableUtil.java Modified: trunk/chorem-entities/src/main/java/org/chorem/entities/InvoiceableUtil.java =================================================================== --- trunk/chorem-entities/src/main/java/org/chorem/entities/InvoiceableUtil.java 2012-04-23 13:11:43 UTC (rev 135) +++ trunk/chorem-entities/src/main/java/org/chorem/entities/InvoiceableUtil.java 2012-04-24 14:55:08 UTC (rev 136) @@ -5,6 +5,7 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.nuiton.wikitty.ScriptEvaluator; +import org.nuiton.wikitty.WikittyClient; import org.nuiton.wikitty.WikittyProxy; /** @@ -22,9 +23,9 @@ /** to use log facility, just put in your code: log.info(\"...\"); */ static private Log log = LogFactory.getLog(InvoiceableUtil.class); - static public boolean evalCondition(WikittyProxy proxy, Invoiceable invoiceable) { + static public boolean evalCondition(WikittyClient client, Invoiceable invoiceable) { Map<String, Object> bindings = new HashMap<String, Object>(); - bindings.put("proxy", proxy); + bindings.put("wikittyClient", client); bindings.put("invoiceable", invoiceable); Object resultEval = ScriptEvaluator.eval(null, invoiceable.getName(), invoiceable.getCondition(), @@ -33,9 +34,9 @@ return result; } - static public double evalValue(WikittyProxy proxy, Invoiceable invoiceable) { + static public double evalValue(WikittyClient client, Invoiceable invoiceable) { Map<String, Object> bindings = new HashMap<String, Object>(); - bindings.put("proxy", proxy); + bindings.put("wikittyClient", client); bindings.put("invoiceable", invoiceable); Object resultEval = ScriptEvaluator.eval(null, invoiceable.getName(), invoiceable.getValue(),