com.mentata.sg8
Class SG8Servlet

java.lang.Object
  extended byjavax.servlet.GenericServlet
      extended byjavax.servlet.http.HttpServlet
          extended bycom.mentata.sg8.SG8Servlet
All Implemented Interfaces:
Serializable, Servlet, ServletConfig
Direct Known Subclasses:
create, delete, link, mail, retrieve, sign, update

public abstract class SG8Servlet
extends HttpServlet

An HTTP servlet for use in the SG8 gateway. This abstract subclass of Java standard HttpServlet provides methods to support the use of SG8 contexts and objects to perform transactions with the directory through a servlet container. A method of this class returns named contexts from a central persistent store. Another method translates formatted PATH_INFO strings into parameter information.

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

Constructor Summary
SG8Servlet()
           
 
Method Summary
 void doGet(HttpServletRequest req, HttpServletResponse res)
          Sends a response that the servlet doesn't handle GET requests.
 void doPost(HttpServletRequest req, HttpServletResponse res)
          Sends a response that the servlet doesn't handle POST requests.
protected  String getClassName()
          Returns the name of the servlet's Java class.
static SG8Context getContext(L3DPath path)
          Returns the named context from an internally maintained collection.
 L3DPath getPath(HttpServletRequest req)
          Returns a path bean matching the given request.
 
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

SG8Servlet

public SG8Servlet()
Method Detail

doGet

public void doGet(HttpServletRequest req,
                  HttpServletResponse res)
           throws ServletException,
                  IOException
Sends a response that the servlet doesn't handle GET requests.

Parameters:
req - a servlet request
res - a servlet response
Throws:
ServletException
IOException

doPost

public void doPost(HttpServletRequest req,
                   HttpServletResponse res)
            throws ServletException,
                   IOException
Sends a response that the servlet doesn't handle POST requests.

Parameters:
req - a servlet request
res - a servlet response
Throws:
ServletException
IOException

getClassName

protected final String getClassName()
Returns the name of the servlet's Java class.

Returns:
the servlet class name

getPath

public final L3DPath getPath(HttpServletRequest req)
                      throws SG8Exception
Returns a path bean matching the given request.

Parameters:
req - a servlet request
Returns:
the populated L3D path bean
Throws:
SG8Exception - if the request doesn't specify a context or object

getContext

public static final SG8Context getContext(L3DPath path)
                                   throws SG8Exception
Returns the named context from an internally maintained collection.

Parameters:
path - a populated L3D path bean
Returns:
the SG8 Context
Throws:
SG8Exception