com.mentata.sg8
Class retrieve

java.lang.Object
  extended byjavax.servlet.GenericServlet
      extended byjavax.servlet.http.HttpServlet
          extended bycom.mentata.sg8.SG8Servlet
              extended bycom.mentata.sg8.retrieve
All Implemented Interfaces:
Serializable, Servlet, ServletConfig

public class retrieve
extends SG8Servlet

A servlet for finding and expressing entries in the database. If the request does not name a context and object, the servlet will throw an exception. If the context is configured to be closed and the session does not contain an authenticated connection to the given context, the path is stored in the session and the request is forwarded to the authenticate JSP. If the input does not define an identifier or filter, a corresponding SG8Search bean is constructed and passed through the session to the search JSP. Otherwise, a filter is configured and the search is performed based on inputs. If nothing is found, the search bean is forwarded to the disavow JSP. Otherwise, if the output is HTML, the results are packed into the search bean and forwarded to either the list JSP for multiple results or the display JSP in the case of a single matching result. If the output is a format other than HTML, the servlet generates the response directly from the results.

Since:
0.7
Author:
Jon Roberts
See Also:
Serialized Form

Constructor Summary
retrieve()
           
 
Method Summary
 void doDSML(HttpServletRequest req, HttpServletResponse res)
          Outputs search results as DSML.
 void doGet(HttpServletRequest req, HttpServletResponse res)
          Forwards the request to the search JSP.
 void doLDIF(HttpServletRequest req, HttpServletResponse res)
          Outputs search results as LDIF.
 void doPost(HttpServletRequest req, HttpServletResponse res)
          Performs a search of the directory and forwards the results to a requested destination.
 void doTabtext(HttpServletRequest req, HttpServletResponse res)
          Outputs search results as Tab-delimited text.
 
Methods inherited from class com.mentata.sg8.SG8Servlet
getClassName, getContext, getPath
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

retrieve

public retrieve()
Method Detail

doGet

public void doGet(HttpServletRequest req,
                  HttpServletResponse res)
           throws ServletException,
                  IOException
Forwards the request to the search JSP.

Overrides:
doGet in class SG8Servlet
Parameters:
req - the servlet request
res - the servlet response
Throws:
ServletException - if the request is inappropriate
IOException

doPost

public void doPost(HttpServletRequest req,
                   HttpServletResponse res)
            throws ServletException,
                   IOException
Performs a search of the directory and forwards the results to a requested destination.

Overrides:
doPost in class SG8Servlet
Parameters:
req - the servlet request
res - the servlet response
Throws:
ServletException - if the search fails
IOException

doDSML

public void doDSML(HttpServletRequest req,
                   HttpServletResponse res)
            throws ServletException,
                   IOException
Outputs search results as DSML.

Parameters:
req - the servlet request
res - the servlet response
Throws:
ServletException - if a failure occurs before output stream created
IOException

doLDIF

public void doLDIF(HttpServletRequest req,
                   HttpServletResponse res)
            throws ServletException,
                   IOException
Outputs search results as LDIF.

Parameters:
req - the servlet request
res - the servlet response
Throws:
ServletException - if a failure occurs before output stream created
IOException

doTabtext

public void doTabtext(HttpServletRequest req,
                      HttpServletResponse res)
               throws ServletException,
                      IOException
Outputs search results as Tab-delimited text.

Parameters:
req - the servlet request
res - the servlet response
Throws:
ServletException - if a failure occurs before output stream created
IOException