edu.mssm.crover.webservices.rbde
Class StoreDiagram

java.lang.Object
  |
  +--javax.servlet.GenericServlet
        |
        +--javax.servlet.http.HttpServlet
              |
              +--edu.mssm.crover.webservices.rbde.StoreDiagram
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig, javax.servlet.SingleThreadModel

public class StoreDiagram
extends javax.servlet.http.HttpServlet
implements javax.servlet.SingleThreadModel

1/ Starts a guest session if none is available. 2/ Stores a CustomizedDiagram in this session if none exists with this identificator. SingleThreadModel ensures the calls are handled in the order they appear in the HTML file.

See Also:
Serialized Form

Constructor Summary
StoreDiagram()
           
 
Method Summary
 void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Does whatever the parameter request to do, return an image that encodes the success or failure of the operation.
 void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 void fails(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.io.OutputStream dest)
           
 java.awt.Image getFailureImage()
           
 java.awt.image.BufferedImage getImage(java.awt.Color color)
           
 long getLastModified(javax.servlet.http.HttpServletRequest request)
           
 javax.servlet.http.HttpSession getSession(javax.servlet.http.HttpServletRequest request)
          Returns a guest session.
 java.awt.Image getSuccessImage()
           
 void log(int level, java.lang.String msg)
           
 void log(int level, java.lang.String msg, java.lang.Exception e)
           
 boolean parseSequence(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, DS_UserSession us)
          Parses the residue codes out of the parameters.
 boolean parseSSE(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, DS_UserSession us)
           
 boolean parseTM(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, DS_UserSession us)
           
 void succeeds(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.io.OutputStream dest)
           
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, 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

StoreDiagram

public StoreDiagram()
Method Detail

doGet

public void doGet(javax.servlet.http.HttpServletRequest request,
                  javax.servlet.http.HttpServletResponse response)
           throws java.io.IOException,
                  javax.servlet.ServletException
Does whatever the parameter request to do, return an image that encodes the success or failure of the operation.

Overrides:
doGet in class javax.servlet.http.HttpServlet
java.io.IOException
javax.servlet.ServletException

parseSequence

public boolean parseSequence(javax.servlet.http.HttpServletRequest request,
                             javax.servlet.http.HttpServletResponse response,
                             DS_UserSession us)
Parses the residue codes out of the parameters. Updates the session's CustomizedDiagram with the residue codes when appropriate (ie residues specified are different).

Returns:
True for success, False for failure.

parseTM

public boolean parseTM(javax.servlet.http.HttpServletRequest request,
                       javax.servlet.http.HttpServletResponse response,
                       DS_UserSession us)

parseSSE

public boolean parseSSE(javax.servlet.http.HttpServletRequest request,
                        javax.servlet.http.HttpServletResponse response,
                        DS_UserSession us)

log

public void log(int level,
                java.lang.String msg,
                java.lang.Exception e)

log

public void log(int level,
                java.lang.String msg)

fails

public void fails(javax.servlet.http.HttpServletRequest request,
                  javax.servlet.http.HttpServletResponse response,
                  java.io.OutputStream dest)
           throws java.io.IOException
java.io.IOException

succeeds

public void succeeds(javax.servlet.http.HttpServletRequest request,
                     javax.servlet.http.HttpServletResponse response,
                     java.io.OutputStream dest)
              throws java.io.IOException
java.io.IOException

doPost

public void doPost(javax.servlet.http.HttpServletRequest request,
                   javax.servlet.http.HttpServletResponse response)
            throws java.io.IOException,
                   javax.servlet.ServletException
Overrides:
doPost in class javax.servlet.http.HttpServlet
java.io.IOException
javax.servlet.ServletException

getLastModified

public long getLastModified(javax.servlet.http.HttpServletRequest request)
Overrides:
getLastModified in class javax.servlet.http.HttpServlet

getSession

public javax.servlet.http.HttpSession getSession(javax.servlet.http.HttpServletRequest request)
Returns a guest session.


getImage

public java.awt.image.BufferedImage getImage(java.awt.Color color)

getSuccessImage

public java.awt.Image getSuccessImage()

getFailureImage

public java.awt.Image getFailureImage()


Copyright @ 2003 Mount Sinai School of Medicine. All Rights Reserved.