com.raritantechnologies.quickstart.userInterface
Class DynamicServletHandler
java.lang.Object
com.raritantechnologies.quickstart.userInterface.DynamicServletHandler
- All Implemented Interfaces:
- IConfigurable, IServletHandler
- public class DynamicServletHandler
- extends java.lang.Object
- implements IServletHandler
Dynamic ServletHandler that can make modifications to the http request based on
its current state. Uses a map of request param to IComparators
to determine if a particular request state is matched. The output is a modified request (using the
DynamicHttpServletRequest that is passed on to its
proxy IServletHandler.
XML Configuration Template:
<ServletHandler class="com.raritantechnologies.quickstart.userInterface.DynamicServletHandler" >
<!-- One or more UseHandler tags: -->
<UseHandler isAnd="[ true(default)|false ]" >
<!-- One or more RequestParam tags: -->
<RequestParam name="[ name of the request parameter ]" value="[ exact value of the parameter ]" />
<RequestParam name="[ name of the request parameter ]" >
<Comparator class="[ class of com.raritantechnologies.utils.comparators.IComparator ]" >
</Comparator>
</RequestParam>
<!-- One or more output parameters -->
<OutputParam name="[ name of parameter ]" value="[ value of parameter ]" />
<!-- To Do: Add lookup here: Use SearchSource to lookup a value from a query generated -->
<!-- by the input request -->
</UseHandler>
<ProxyHandler class="[ class of com.raritantechnologies.quickstart.userInterface.IServletHandler ]" >
</ProxyHandler>
</ServletHandler>
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DynamicServletHandler
public DynamicServletHandler()
init
public void init(SearchServlet searchServlet)
- Specified by:
init in interface IServletHandler
service
public void service(DynamicHttpServletRequest pReq,
HttpServletResponse pRes)
throws ServletException,
java.io.IOException
- Specified by:
service in interface IServletHandler
- Throws:
ServletException
java.io.IOException
initialize
public void initialize(org.w3c.dom.Element elem)
- Description copied from interface:
IConfigurable
- Initializes the object from an XML tag or element.
This method is called by the Framework as part of the application initializtion.
see ConfigurationManager, XMLConfigurationManager, XMLSearchFieldMapFactory, XMLSearchSourceFactory.
Configurable objects that are owned or contained by other configurable objects will be initialized
in by the parent object.
- Specified by:
initialize in interface IConfigurable