A few remarks...
Pierre van Rooden wrote:
> - new methods on Cloud interface (see javadoc in Cloud.java):
>
> public Set getFunctions(String setName);
> public Function getFunction(String setName, String functionName);
>
> - new methods on Node interface (see javadoc in Node.java):
> public Parameters createParameters(String functionName);
> public Function getFunction(String functionName);
> public FieldValue getFunctionValue(String functionName, List parameters);
>
> - new methods on Module interface (see javadoc in Module.java):
> public Parameters createParameters(String functionName);
> public Function getFunction(String functionName);
> public FieldValue getFunctionValue(String functionName, List parameters);
Since there is a Set getFunctions on Cloud you may also expect it on Node
and Module? (But, without argument then).
> - Parameters
> This interface is a bit different from the class.
> the method hasParameter() has been remamed containsParameter() to
> match teh naming scheme in List
Perhaps. But I deliberately did not choose 'contains' back then, because the
interface already has a 'contains' method, which means something quite
different (does not look at the parameter definition, but at the parameter
value). To stress that it is a different form of containing I choose another
verb. 'definitionContains(Parameter)'? Perhaps it is not confusing after
all...
>
> - A new class, WrapperFunction, can be used to wrap another function
> (passed to the constructor).
> The bridge wraps functions, so a 'bridge' function always returns a
> FieldValue object.
>
WrappedFunction is used in MMObjectNode, extended by 'NodeFunction':
public final Object getFunctionValue(Parameters parameters) {
parameters.setIfDefined("node",MMObjectNode.this);
return super.getFunctionValue(parameters);
}
and getFunction of MMObjectNode looks like:
public Function getFunction(String functionName) {
Function function = new NodeFunction(parent.getFunction(functionName));
return function;
}
I would have expected to more simple:
public Function getFunction(String functionName) {
return parent.getFunction(this, functionName);
}
without the need of NodeFunction. WrappedFunction is then only used to
extend to 'BasicFunction' of bridge, which is then superfluous, because
BasicFucntion can do that by itself then.
Which would make 'node' functions and 'builder' functions completely
independent, and seperately implementable. Which accords with my way of
thinking.
>
> The code has been tested with the example function tags of the taglibs.
Another big user of function tags (with lots of 'node' functions) are the
cloud context security editors. Did you test those?
But, all in all I think I would be happy with this proposal.
Michiel
--
Michiel Meeuwissen mihxil'
Mediacentrum 140 H'sum [] ()
+31 (0)35 6772979 nl_NL eo_XX en_US
_______________________________________________
Developers mailing list
[EMAIL PROTECTED]
http://lists.mmbase.org/mailman/listinfo/developers