Author: michiel
Date: 2009-11-19 15:32:52 +0100 (Thu, 19 Nov 2009)
New Revision: 39802

Modified:
   mmbase/trunk/core/src/main/java/org/mmbase/util/functions/NodeFunction.java
Log:
sometimes both getFunction(Parameters) and getFunction(Node, Parmeters) are 
overriden, and not doing the exact same. This exposes also 
getFunctionValue(Node, Parameters)

Modified: 
mmbase/trunk/core/src/main/java/org/mmbase/util/functions/NodeFunction.java
===================================================================
--- mmbase/trunk/core/src/main/java/org/mmbase/util/functions/NodeFunction.java 
2009-11-19 13:24:59 UTC (rev 39801)
+++ mmbase/trunk/core/src/main/java/org/mmbase/util/functions/NodeFunction.java 
2009-11-19 14:32:52 UTC (rev 39802)
@@ -109,6 +109,14 @@
      */
     protected abstract R getFunctionValue(Node node, Parameters parameters);
 
+
+    /**
+     * Just a public wrapper around {...@link #getFunctionValue(Node, 
Parameters)} (of which we don't want to loosen the scope, because it may be 
overriden protected).
+     */
+    public final R getFunctionValueForNode(Node node, Parameters parameters) {
+        return getFunctionValue(node, parameters);
+    }
+
     protected Node getNode(Parameters parameters) {
         if (! parameters.containsParameter(Parameter.NODE)) {
             throw new IllegalArgumentException("The function " + toString() + 
" requires a node argument");
@@ -125,6 +133,7 @@
      * This one can be overriden if the same function must <em>also</em> be a 
builder function.
      */
     public  R getFunctionValue(Parameters parameters) {
+        log.debug("Getting for " + this + " " + parameters);
         return  getFunctionValue(getNode(parameters), parameters);
     }
 

_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to