Annotation driven process factory; used to wrap up a bunch of Java beans as a single Process Factory.
To make use of this class you will need to:
- Create an instance passing in a list of "bean" classes you wish to publish:
ProcessFactory factory = new AnnotatedBeanProcessFactory( Text.text("Internal"),"internal", ExampleProcess);
- Create an implementation of each bean class referenced:
- Annotate the class with {@link DescribeProcess}:
@DescribeProcess( title = "bounds", description = "Computes the overlall bounds of the input features") public class BoundsProcess { ... }
- Supply an execute method (which we can call by reflection):
@DescribeResult(name = "bounds", description = "The feature collection bounds") public ReferencedEnvelope execute( @DescribeParameter(name = "features", description = "Collection whose bounds will be computed") FeatureCollection features) { return features.getBounds(); }
- Optional: If you are using this technique in an environment such as Spring you may wish to use a "marker interface" to allow Spring to discover implementations on the classpath.
public class BoundsProcess implements GeoServerProcess { ... }
@source $URL$