com.raritantechnologies.quickstart.userInterface
Class SaveResultsHandler

java.lang.Object
  extended bycom.raritantechnologies.quickstart.userInterface.SaveResultsHandler
All Implemented Interfaces:
IActionHandler, IConfigurable, IServletHandler

public class SaveResultsHandler
extends java.lang.Object
implements IServletHandler, IActionHandler

Implementation of IServletHandler that implements Saved Results. Can be used to push cached results to an output processor.

web.xml configuration:
  <servlet>
    <servlet-name>SaveResultsServlet</servlet-name>
    <servlet-class>com.raritantechnologies.quickstart.userInterface.SearchServlet

    <init-param>
      <param-name>ServletHandler</param-name>
      <param-value>[ name of ServletHandler here ]</param-value>
    </init-param>
  </servlet>

  <servlet-mapping>
    <servlet-name>SaveResultsServlet</servlet-name>
    <url-pattern>doSave</url-pattern>
  </servlet-mapping>
 
XML Configuration Template:
   <SystemObject type="ServletHandler" name="[ name of this ServletHandler - needs to match param-value in web.xml ]" 
                    configurableClass="com.raritantechnologies.userInterface.SaveResultsHandler"
                    cacheResultSetName=="[ cache key for selected results ]"
                    cacheFieldID="[ fieldID of cached records ]" 
                    nameRequestParam="[ name of http request parameter with user-supplied group name ]" >

     <ResultFields saveName="[ name of result field that gets the user-supplied group name ]"
                      userID="[ name of result field that gets UserID ]"
                      timeStamp="[ name of result field that gets save time stamp ]" >
                        dateFormat="MM/dd/yy" />

     <!-- If using an implementation of IResultSetProcessor for output -->
     <ResultSetProcessor class="[ class of com.raritantechnologies.searchApp.IResultSetProcessor ]" >

     </ResultSetProcessor>

     <!-- If using an implementation of IGatewayOutputProcessor -->
     <GatewayOutputProcessor class="[ class of com.raritantechnologies.searchApp.dataCollection.IGatewayOutputProcessor ]" >

     </GatewayOutputProcessor>

   </SystemObject>

 


Constructor Summary
SaveResultsHandler()
           
 
Method Summary
 ActionForward handleAction(ActionMapping mapping, ActionForm form, DynamicHttpServletRequest request, HttpServletResponse response)
          Struts ActionHandler method
 void init(SearchServlet searchServlet)
           
 void initialize(org.w3c.dom.Element elem)
          Initializes the object from an XML tag or element.
 void service(DynamicHttpServletRequest pReq, HttpServletResponse pRes)
          Delegate the service request to the IServletHandler.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SaveResultsHandler

public SaveResultsHandler()
Method Detail

service

public void service(DynamicHttpServletRequest pReq,
                    HttpServletResponse pRes)
             throws ServletException,
                    java.io.IOException
Delegate the service request to the IServletHandler.

Specified by:
service in interface IServletHandler
Throws:
a - ServletException if the IServletHandler is not defined.
ServletException
java.io.IOException

handleAction

public ActionForward handleAction(ActionMapping mapping,
                                  ActionForm form,
                                  DynamicHttpServletRequest request,
                                  HttpServletResponse response)
                           throws java.lang.Exception
Struts ActionHandler method

Specified by:
handleAction in interface IActionHandler
Throws:
java.lang.Exception

init

public void init(SearchServlet searchServlet)
Specified by:
init in interface IServletHandler

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