jetweb is hosted by Hepforge, IPPP Durham

cedar.jetweb.servlet
Class ServletUtils

java.lang.Object
  extended by cedar.jetweb.servlet.ServletUtils

public abstract class ServletUtils
extends java.lang.Object

Utilities for servlet access to the data base and for job submission (via JobRequest).

Author:
Jon & Susanna Butterworth

Constructor Summary
ServletUtils()
           
 
Method Summary
static void addPlot(java.util.HashMap<java.lang.String,java.lang.String> parameters, Paper paper, java.lang.String key)
          Add a plot which has parameters matching the given key to the given Paper .
static void changePaper(javax.servlet.http.HttpServletRequest request, java.io.PrintWriter out)
          Update a paper in the DB using the information in the servlet request.
static void deletePaper(javax.servlet.http.HttpServletRequest request)
          Delete the paper and all plots associated with it, based on the parameters passed.
static void deletePlots(java.util.HashMap<java.lang.String,java.lang.String> parameters, Paper paper)
          Delete the plots associated with a paper based on the parameters passed.
static void editFit(javax.servlet.http.HttpServletRequest request, java.io.PrintWriter out, java.lang.String servletPath)
          Edit/delete/force update for fit.
static void generatorDefaults(javax.servlet.http.HttpServletRequest request)
           
static void getGeneratorParameters(javax.servlet.http.HttpServletRequest request, Generator gen)
          Get the parameters for the generator from the servlet request.
static java.util.Vector<MCProcessType> makeMCProcessList(javax.servlet.http.HttpServletRequest request)
          Return a Vector full of MCProcessTypes made from the servlet request.
static ResultSearchPattern makePattern(javax.servlet.http.HttpServletRequest request)
          Make a ResultSearchPattern based upon a HTTP servlet request.
static PlotSelection makePlotSelection(javax.servlet.http.HttpServletRequest request)
          Build a PlotSelection from a servlet request.
static void manageProcessTypes(javax.servlet.http.HttpServletRequest request, java.io.PrintWriter out, java.lang.String servletPath)
           
static void modifyPlots(java.util.HashMap<java.lang.String,java.lang.String> parameters, Paper paper)
          Modify the plots associated with a paper based on the parameters passed.
static void performResultSearch(ResultSearchPattern pattern, java.io.PrintWriter out, java.lang.String servletPath, PlotSelection selection, javax.servlet.http.HttpServletRequest request)
          Perform a result search query and return the results.
static void updateConfig(javax.servlet.http.HttpServletRequest request)
          Update the servlet configuration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServletUtils

public ServletUtils()
Method Detail

makePattern

public static ResultSearchPattern makePattern(javax.servlet.http.HttpServletRequest request)
                                       throws JetWebException
Make a ResultSearchPattern based upon a HTTP servlet request.

Parameters:
request -
Returns:
resultSearchPattern
Throws:
JetWebException


makePlotSelection

public static PlotSelection makePlotSelection(javax.servlet.http.HttpServletRequest request)
Build a PlotSelection from a servlet request.


performResultSearch

public static void performResultSearch(ResultSearchPattern pattern,
                                       java.io.PrintWriter out,
                                       java.lang.String servletPath,
                                       PlotSelection selection,
                                       javax.servlet.http.HttpServletRequest request)
Perform a result search query and return the results.


updateConfig

public static void updateConfig(javax.servlet.http.HttpServletRequest request)
Update the servlet configuration.


editFit

public static void editFit(javax.servlet.http.HttpServletRequest request,
                           java.io.PrintWriter out,
                           java.lang.String servletPath)
                    throws JetWebException
Edit/delete/force update for fit.

Throws:
JetWebException


changePaper

public static void changePaper(javax.servlet.http.HttpServletRequest request,
                               java.io.PrintWriter out)
Update a paper in the DB using the information in the servlet request.


modifyPlots

public static void modifyPlots(java.util.HashMap<java.lang.String,java.lang.String> parameters,
                               Paper paper)
                        throws JetWebException
Modify the plots associated with a paper based on the parameters passed.

Throws:
JetWebException


addPlot

public static void addPlot(java.util.HashMap<java.lang.String,java.lang.String> parameters,
                           Paper paper,
                           java.lang.String key)
                    throws JetWebException
Add a plot which has parameters matching the given key to the given Paper .

Throws:
JetWebException


generatorDefaults

public static void generatorDefaults(javax.servlet.http.HttpServletRequest request)

makeMCProcessList

public static java.util.Vector<MCProcessType> makeMCProcessList(javax.servlet.http.HttpServletRequest request)
                                                         throws JetWebException
Return a Vector full of MCProcessTypes made from the servlet request.

Throws:
JetWebException


getGeneratorParameters

public static void getGeneratorParameters(javax.servlet.http.HttpServletRequest request,
                                          Generator gen)
                                   throws JetWebException
Get the parameters for the generator from the servlet request.

Throws:
JetWebException


deletePlots

public static void deletePlots(java.util.HashMap<java.lang.String,java.lang.String> parameters,
                               Paper paper)
                        throws JetWebException
Delete the plots associated with a paper based on the parameters passed.

Throws:
JetWebException


deletePaper

public static void deletePaper(javax.servlet.http.HttpServletRequest request)
                        throws JetWebException
Delete the paper and all plots associated with it, based on the parameters passed.

Throws:
JetWebException


manageProcessTypes

public static void manageProcessTypes(javax.servlet.http.HttpServletRequest request,
                                      java.io.PrintWriter out,
                                      java.lang.String servletPath)
                               throws JetWebException
Throws:
JetWebException