net.sf.jasperreports.web
Class WebReportContext

java.lang.Object
  extended by net.sf.jasperreports.web.WebReportContext
All Implemented Interfaces:
ReportContext

public class WebReportContext
extends Object
implements ReportContext

Version:
$Id: WebReportContext.java 5164 2012-03-28 13:05:17Z teodord $
Author:
Teodor Danciu (teodord@users.sourceforge.net)

Field Summary
static String REPORT_CONTEXT_PARAMETER_JASPER_PRINT
          Deprecated. Replaced by REPORT_CONTEXT_PARAMETER_JASPER_PRINT_ACCESSOR.
static String REPORT_CONTEXT_PARAMETER_JASPER_PRINT_ACCESSOR
           
static String REQUEST_PARAMETER_REPORT_CONTEXT_ID
           
 
Method Summary
 boolean containsParameter(String parameterName)
           
 String getId()
           
static WebReportContext getInstance(javax.servlet.http.HttpServletRequest request)
           
static WebReportContext getInstance(javax.servlet.http.HttpServletRequest request, boolean create)
           
 Object getParameterValue(String parameterName)
           
 Map<String,Object> getParameterValues()
           
 String getSessionAttributeName()
          public void setRequest(HttpServletRequest request) { //threadLocalRequest.set(request); requestParameters.clear(); for(@SuppressWarnings("unchecked") Enumeration params = request.getParameterNames(); params.hasMoreElements(); ) { String param = params.nextElement(); String value = request.getParameter(param);// do getValues here?
 void setParameterValue(String parameterName, Object value)
           
 void setParameterValues(Map<String,Object> newValues)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REQUEST_PARAMETER_REPORT_CONTEXT_ID

public static final String REQUEST_PARAMETER_REPORT_CONTEXT_ID
See Also:
Constant Field Values

REPORT_CONTEXT_PARAMETER_JASPER_PRINT

public static final String REPORT_CONTEXT_PARAMETER_JASPER_PRINT
Deprecated. Replaced by REPORT_CONTEXT_PARAMETER_JASPER_PRINT_ACCESSOR.
See Also:
Constant Field Values

REPORT_CONTEXT_PARAMETER_JASPER_PRINT_ACCESSOR

public static final String REPORT_CONTEXT_PARAMETER_JASPER_PRINT_ACCESSOR
See Also:
Constant Field Values
Method Detail

getInstance

public static final WebReportContext getInstance(javax.servlet.http.HttpServletRequest request)

getInstance

public static final WebReportContext getInstance(javax.servlet.http.HttpServletRequest request,
                                                 boolean create)

getId

public String getId()
Specified by:
getId in interface ReportContext

getSessionAttributeName

public String getSessionAttributeName()
public void setRequest(HttpServletRequest request) { //threadLocalRequest.set(request); requestParameters.clear(); for(@SuppressWarnings("unchecked") Enumeration params = request.getParameterNames(); params.hasMoreElements(); ) { String param = params.nextElement(); String value = request.getParameter(param);// do getValues here? requestParameters.put(param, value); } } /**


getParameterValue

public Object getParameterValue(String parameterName)
Specified by:
getParameterValue in interface ReportContext

containsParameter

public boolean containsParameter(String parameterName)
Specified by:
containsParameter in interface ReportContext

setParameterValue

public void setParameterValue(String parameterName,
                              Object value)
Specified by:
setParameterValue in interface ReportContext

setParameterValues

public void setParameterValues(Map<String,Object> newValues)

getParameterValues

public Map<String,Object> getParameterValues()


Copyright © 2012. All Rights Reserved.