net.spy.jwebkit.struts
Class DBSPAction
java.lang.Object
org.apache.struts.action.Action
net.spy.jwebkit.struts.JWebAction
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:
- reportName - the name of the report
- columnNames - a List containing the names of all of the result
columns
- sptParams - a collection of Parameter objects indicating params for
this spt.
- sptResults - a list of lists of string results.
| Fields inherited from class org.apache.struts.action.Action |
defaultLocale, servlet |
|
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 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 |
DBSPAction
public DBSPAction()
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 doneform - the formrequest - the requestresponse - 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.