ar.com.fdvs.dj.struts2
Class DJStruts2Result
java.lang.Object
org.apache.struts2.dispatcher.StrutsResultSupport
org.apache.struts2.views.jasperreports.JasperReportsResult
ar.com.fdvs.dj.struts2.DJStruts2Result
- All Implemented Interfaces:
- com.opensymphony.xwork2.Result, java.io.Serializable, org.apache.struts2.StrutsStatics, org.apache.struts2.views.jasperreports.JasperReportConstants
public class DJStruts2Result
- extends org.apache.struts2.views.jasperreports.JasperReportsResult
- Author:
- Alejandro Gomez, Juan Alvarez
Date: Feb 22, 2007
Time: 4:32:34 PM
- See Also:
- Serialized Form
| Fields inherited from class org.apache.struts2.views.jasperreports.JasperReportsResult |
contentDisposition, dataSource, delimiter, documentName, exportParameters, format, imageServletUrl, reportParameters |
| Fields inherited from class org.apache.struts2.dispatcher.StrutsResultSupport |
DEFAULT_PARAM |
| Fields inherited from interface org.apache.struts2.views.jasperreports.JasperReportConstants |
FORMAT_CSV, FORMAT_HTML, FORMAT_PDF, FORMAT_RTF, FORMAT_XLS, FORMAT_XML |
| Fields inherited from interface org.apache.struts2.StrutsStatics |
HTTP_REQUEST, HTTP_RESPONSE, PAGE_CONTEXT, SERVLET_CONTEXT, SERVLET_DISPATCHER, STRUTS_PORTLET_CONTEXT |
|
Method Summary |
protected net.sf.jasperreports.engine.JRDataSource |
buildJRDataSource(java.lang.Object dsCandidate)
returns the JRDataSource pointed by the result-type parameter "dataSource"
Accepts JRDataSource, Collection, ResultSet and Object[] |
protected void |
checkParams()
|
protected java.lang.Object |
conditionalParse(java.lang.String _param,
com.opensymphony.xwork2.ActionInvocation _invocation,
java.lang.Class _type)
|
protected void |
doExecute(java.lang.String _finalLocation,
com.opensymphony.xwork2.ActionInvocation _invocation)
Executes the result given a final location (jsp page, action, etc) and the action invocation
(the state in which the action was executed). |
protected java.lang.String |
getContentDisposition(com.opensymphony.xwork2.ActionInvocation _invocation)
|
protected java.lang.String |
getDocumentName(com.opensymphony.xwork2.ActionInvocation _invocation)
|
protected DynamicReport |
getDynamicReport(com.opensymphony.xwork2.ActionInvocation _invocation)
|
java.lang.String |
getExportParams()
|
protected java.util.Map |
getExportParams(com.opensymphony.xwork2.ActionInvocation _invocation)
|
protected java.lang.String |
getFormat(com.opensymphony.xwork2.ActionInvocation _invocation)
|
java.lang.String |
getLayoutManager()
|
protected LayoutManager |
getLayOutManagerObj(com.opensymphony.xwork2.ActionInvocation _invocation)
Returns the export format indicated in the result-type parameter "layoutManager" |
protected java.util.Map |
getParametersMap(com.opensymphony.xwork2.ActionInvocation _invocation)
Returns the object pointed by the result-type parameter "parameters" |
protected void |
handleConTypeRequest(javax.servlet.http.HttpServletResponse _response)
|
void |
setDynamicReport(java.lang.String _dynamicReport)
|
void |
setExportParams(java.lang.String exportParams)
|
void |
setLayoutManager(java.lang.String layoutManager)
|
void |
setParameters(java.lang.String parameters)
|
void |
setParse(boolean _parse)
|
protected void |
setResponseHeaders(javax.servlet.http.HttpServletResponse _response,
com.opensymphony.xwork2.ActionInvocation _invocation)
|
protected void |
writeReponse(javax.servlet.http.HttpServletRequest _request,
javax.servlet.http.HttpServletResponse _response,
net.sf.jasperreports.engine.JasperPrint _jasperPrint,
com.opensymphony.xwork2.ActionInvocation _invocation)
|
| Methods inherited from class org.apache.struts2.views.jasperreports.JasperReportsResult |
getExportParameters, getImageServletUrl, getReportParameters, setContentDisposition, setDataSource, setDelimiter, setDocumentName, setExportParameters, setFormat, setImageServletUrl, setReportParameters |
| Methods inherited from class org.apache.struts2.dispatcher.StrutsResultSupport |
conditionalParse, execute, getLastFinalLocation, getLocation, setEncode, setLocation |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LAYOUT_CLASSIC
public static final java.lang.String LAYOUT_CLASSIC
- See Also:
- Constant Field Values
LAYOUT_LIST
public static final java.lang.String LAYOUT_LIST
- See Also:
- Constant Field Values
dynamicReport
protected java.lang.String dynamicReport
documentFormat
protected java.lang.String documentFormat
layoutManager
protected java.lang.String layoutManager
- The layout manager to use. Possible values are: classic, list, or a fully qualified java name
exportParams
protected java.lang.String exportParams
parameters
protected java.lang.String parameters
DJStruts2Result
public DJStruts2Result()
setDynamicReport
public void setDynamicReport(java.lang.String _dynamicReport)
setParse
public void setParse(boolean _parse)
- Overrides:
setParse in class org.apache.struts2.dispatcher.StrutsResultSupport
doExecute
protected void doExecute(java.lang.String _finalLocation,
com.opensymphony.xwork2.ActionInvocation _invocation)
throws java.lang.Exception
- Executes the result given a final location (jsp page, action, etc) and the action invocation
(the state in which the action was executed). Subclasses must implement this class to handle
custom logic for result handling.
- Overrides:
doExecute in class org.apache.struts2.views.jasperreports.JasperReportsResult
- Parameters:
_finalLocation - the location (jsp page, action, etc) to go to._invocation - the execution state of the action.
- Throws:
java.lang.Exception - if an error occurs while executing the result.
getParametersMap
protected java.util.Map getParametersMap(com.opensymphony.xwork2.ActionInvocation _invocation)
- Returns the object pointed by the result-type parameter "parameters"
- Parameters:
_invocation -
- Returns:
buildJRDataSource
protected net.sf.jasperreports.engine.JRDataSource buildJRDataSource(java.lang.Object dsCandidate)
- returns the JRDataSource pointed by the result-type parameter "dataSource"
Accepts JRDataSource, Collection, ResultSet and Object[]
- Parameters:
dsCandidate -
- Returns:
getLayOutManagerObj
protected LayoutManager getLayOutManagerObj(com.opensymphony.xwork2.ActionInvocation _invocation)
- Returns the export format indicated in the result-type parameter "layoutManager"
- Parameters:
_invocation -
- Returns:
handleConTypeRequest
protected void handleConTypeRequest(javax.servlet.http.HttpServletResponse _response)
throws javax.servlet.ServletException
- Throws:
javax.servlet.ServletException
checkParams
protected void checkParams()
setResponseHeaders
protected void setResponseHeaders(javax.servlet.http.HttpServletResponse _response,
com.opensymphony.xwork2.ActionInvocation _invocation)
writeReponse
protected void writeReponse(javax.servlet.http.HttpServletRequest _request,
javax.servlet.http.HttpServletResponse _response,
net.sf.jasperreports.engine.JasperPrint _jasperPrint,
com.opensymphony.xwork2.ActionInvocation _invocation)
throws net.sf.jasperreports.engine.JRException,
java.io.IOException
- Throws:
net.sf.jasperreports.engine.JRException
java.io.IOException
getExportParams
protected java.util.Map getExportParams(com.opensymphony.xwork2.ActionInvocation _invocation)
getDynamicReport
protected DynamicReport getDynamicReport(com.opensymphony.xwork2.ActionInvocation _invocation)
getFormat
protected java.lang.String getFormat(com.opensymphony.xwork2.ActionInvocation _invocation)
getDocumentName
protected java.lang.String getDocumentName(com.opensymphony.xwork2.ActionInvocation _invocation)
getContentDisposition
protected java.lang.String getContentDisposition(com.opensymphony.xwork2.ActionInvocation _invocation)
conditionalParse
protected java.lang.Object conditionalParse(java.lang.String _param,
com.opensymphony.xwork2.ActionInvocation _invocation,
java.lang.Class _type)
getLayoutManager
public java.lang.String getLayoutManager()
setLayoutManager
public void setLayoutManager(java.lang.String layoutManager)
getExportParams
public java.lang.String getExportParams()
setExportParams
public void setExportParams(java.lang.String exportParams)
setParameters
public void setParameters(java.lang.String parameters)
Copyright © 2006-2008 FDV Solutions. All Rights Reserved.