Package net.sf.jasperreports.j2ee.web
Class WebReportContext
- java.lang.Object
-
- net.sf.jasperreports.j2ee.web.WebReportContext
-
- All Implemented Interfaces:
ReportContext
public class WebReportContext extends Object implements ReportContext
- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
-
-
Field Summary
Fields Modifier and Type Field Description static String
REPORT_CONTEXT_PARAMETER_JASPER_PRINT_ACCESSOR
Deprecated.static String
REQUEST_PARAMETER_REPORT_CONTEXT_ID
-
Fields inherited from interface net.sf.jasperreports.engine.ReportContext
REQUEST_PARAMETER_APPLICATION_DOMAIN
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearParameterValues()
boolean
containsParameter(String parameterName)
String
getId()
static WebReportContext
getInstance(javax.servlet.http.HttpServletRequest request)
static WebReportContext
getInstance(javax.servlet.http.HttpServletRequest request, boolean create)
static WebReportContext
getInstance(javax.servlet.http.HttpServletRequest request, String reportContextId)
static WebReportContext
getInstance(javax.servlet.http.HttpServletRequest request, String reportContextId, 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") Enumerationparams = request.getParameterNames(); params.hasMoreElements(); ) { String param = params.nextElement(); String value = request.getParameter(param);// do getValues here? Object
removeParameterValue(String parameterName)
void
setParameterValue(String parameterName, Object value)
void
setParameterValues(Map<String,Object> newValues)
-
-
-
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_ACCESSOR
public static final String REPORT_CONTEXT_PARAMETER_JASPER_PRINT_ACCESSOR
Deprecated.- 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, String reportContextId)
-
getInstance
public static final WebReportContext getInstance(javax.servlet.http.HttpServletRequest request, boolean create)
-
getInstance
public static final WebReportContext getInstance(javax.servlet.http.HttpServletRequest request, String reportContextId, boolean create)
-
getId
public String getId()
- Specified by:
getId
in interfaceReportContext
-
getSessionAttributeName
public String getSessionAttributeName()
public void setRequest(HttpServletRequest request) { //threadLocalRequest.set(request); requestParameters.clear(); for(@SuppressWarnings("unchecked") Enumerationparams = 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 interfaceReportContext
-
containsParameter
public boolean containsParameter(String parameterName)
- Specified by:
containsParameter
in interfaceReportContext
-
setParameterValue
public void setParameterValue(String parameterName, Object value)
- Specified by:
setParameterValue
in interfaceReportContext
-
getParameterValues
public Map<String,Object> getParameterValues()
- Specified by:
getParameterValues
in interfaceReportContext
-
removeParameterValue
public Object removeParameterValue(String parameterName)
- Specified by:
removeParameterValue
in interfaceReportContext
-
clearParameterValues
public void clearParameterValues()
- Specified by:
clearParameterValues
in interfaceReportContext
-
-