This class is intended to be subclassed. Subclasses need declare the key in which they parse, and the type of object they parse into.
Instances need to be declared in a spring context like the following:
<bean id="myKvpParser" class="org.xzy.MyKvpParser"/>
Where com.xzy.MyKvpParser
could be something like: public class MyKvpParser extends KvpParser { public MyKvpParser() { super( "MyKvp", MyObject.class )l } public Object parse( String value ) { return new MyObject( value ); } }
The following bean declaration would create the above kvp parser so that it only engages when the service is "MyService", and the request is "MyRequest".
<bean id="myKvpParser" class="org.xzy.MyKvpParser"> <property name="service">MyService</property> <property name="request">MyRequest</property> <bean>
@author Justin Deoliveira, The Open Planning Project, jdeolive@openplans.org
|
|
|
|
|
|