Andrea Aime wrote: >>> And then I guess the factory would take a list of classes with the >>> above annotations. A possible variant would be something that takes >>> parameters as bean properties and has a execute method that takes >>> no extra params (besides and eventual progress listener). >> No real opinion; let us see what the first implementation looks like. > > I have no urgent need for one right now, but let me know if you have > time to hack one up :-p
Oh well, I had to bind some processes that were not one liners and preferred to have each in their own beans so refactored a bit the existing annotation support so that we have both styles, either a class filled with static methods, or a list of classes each with a <retval> execute(params) method Here are the annotation driven factories (base class, static methods, annotated beans): http://svn.codehaus.org/geoserver/trunk/src/community/wps/src/main/java/org/geoserver/wps/jts/AnnotationDrivenProcessFactory.java http://svn.codehaus.org/geoserver/trunk/src/community/wps/src/main/java/org/geoserver/wps/jts/AnnotatedBeanProcessFactory.java http://svn.codehaus.org/geoserver/trunk/src/community/wps/src/main/java/org/geoserver/wps/jts/StaticMethodsProcessFactory.java I guess it is also possible to merge the three in a single class that will eat both static methods and single beans alike. I'll leave this exercise to the reader (this time for good). And then here is an implementation using the static methods approach: http://svn.codehaus.org/geoserver/trunk/src/community/wps/src/main/java/org/geoserver/wps/jts/GeometryFunctions.java http://svn.codehaus.org/geoserver/trunk/src/community/wps/src/main/java/org/geoserver/wps/jts/GeometryProcessFactory.java And one using the beans approach instead (see the whole package): http://svn.codehaus.org/geoserver/trunk/src/community/wps/src/main/java/org/geoserver/wps/gs/ Comments? Cheers Andrea ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ Geotools-devel mailing list Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel