net.spy.jwebkit.struts
Class DBSPAction

java.lang.Object
  extended by org.apache.struts.action.Action
      extended by net.spy.jwebkit.struts.JWebAction
          extended by net.spy.jwebkit.struts.DBSPAction

public abstract class DBSPAction
extends JWebAction

This action, combined with a DBSPMapping is used to map an spt directly into your struts config.

The following request attributes will be defined:


Nested Class Summary
static class DBSPAction.Parameter
           
 
Field Summary
 
Fields inherited from class org.apache.struts.action.Action
defaultLocale, servlet
 
Constructor Summary
DBSPAction()
           
 
Method Summary
protected abstract  net.spy.util.SpyConfig getSpyConfig(org.apache.struts.action.ActionMapping mapping)
          Get the DB config that will be used to access the DB to execute this report.
protected  void setPostParams(net.spy.db.DBSP db, org.apache.struts.action.ActionMapping mapping, javax.servlet.http.HttpServletRequest request)
          Set any parameters that should be overridden for this spt after populating the values from the request parameters.
protected  void setPreParams(net.spy.db.DBSP db, org.apache.struts.action.ActionMapping mapping, javax.servlet.http.HttpServletRequest request)
          Set any default parameters for this spt before receiving them from the request parameters.
 org.apache.struts.action.ActionForward spyExecute(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          This will execute an SPT and set request attributes containing the results.
 
Methods inherited from class net.spy.jwebkit.struts.JWebAction
execute, getLogger, spyCancel
 
Methods inherited from class org.apache.struts.action.Action
addErrors, addMessages, execute, generateToken, getDataSource, getDataSource, getErrors, getLocale, getMessages, getResources, getResources, getServlet, isCancelled, isTokenValid, isTokenValid, resetToken, saveErrors, saveErrors, saveErrors, saveMessages, saveMessages, saveToken, setLocale, setServlet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DBSPAction

public DBSPAction()
Method Detail

getSpyConfig

protected abstract net.spy.util.SpyConfig getSpyConfig(org.apache.struts.action.ActionMapping mapping)
Get the DB config that will be used to access the DB to execute this report.

Parameters:
mapping - the DBSPMapping that specifies the need for the connection
Returns:
a SpyConfig instance

setPreParams

protected void setPreParams(net.spy.db.DBSP db,
                            org.apache.struts.action.ActionMapping mapping,
                            javax.servlet.http.HttpServletRequest request)
                     throws java.sql.SQLException
Set any default parameters for this spt before receiving them from the request parameters.

Throws:
java.sql.SQLException

setPostParams

protected void setPostParams(net.spy.db.DBSP db,
                             org.apache.struts.action.ActionMapping mapping,
                             javax.servlet.http.HttpServletRequest request)
                      throws java.sql.SQLException
Set any parameters that should be overridden for this spt after populating the values from the request parameters.

Throws:
java.sql.SQLException

spyExecute

public org.apache.struts.action.ActionForward spyExecute(org.apache.struts.action.ActionMapping mapping,
                                                         org.apache.struts.action.ActionForm form,
                                                         javax.servlet.http.HttpServletRequest request,
                                                         javax.servlet.http.HttpServletResponse response)
                                                  throws java.lang.Exception
This will execute an SPT and set request attributes containing the results.

Specified by:
spyExecute in class JWebAction
Parameters:
mapping - a DBSPMapping desccribing what needs to be done
form - the form
request - the request
response - the response
Returns:
the ``next-hop'' forward
Throws:
java.lang.Exception - if there's a problem with the action


Copyright © 1995-2007 SPY Internetworking. All Rights Reserved.