net.sf.jasperreports.web

## Class WebReportContext

- java.lang.Object
- - net.sf.jasperreports.web.WebReportContext

- All Implemented Interfaces:
    ReportContext

      public class WebReportContext
      extends java.lang.Object
      implements ReportContext

  Version:
    $Id: WebReportContext.java 6984 2014-03-21 13:17:53Z narcism $
  Author:
    Teodor Danciu (teodord@users.sourceforge.net)

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `APPLICATION_CONTEXT_PATH`
    `static java.lang.String` | `REPORT_CONTEXT_PARAMETER_JASPER_PRINT` Deprecated. Replaced by `REPORT_CONTEXT_PARAMETER_JASPER_PRINT_ACCESSOR`.
    `static java.lang.String` | `REPORT_CONTEXT_PARAMETER_JASPER_PRINT_ACCESSOR`
    `static java.lang.String` | `REQUEST_PARAMETER_REPORT_CONTEXT_ID`

    - ### Fields inherited from interface net.sf.jasperreports.engine.ReportContext

      `REQUEST_PARAMETER_APPLICATION_DOMAIN`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `containsParameter(java.lang.String parameterName)`
    `java.lang.String` | `getId()`
    `static WebReportContext` | `getInstance(javax.servlet.http.HttpServletRequest request)`
    `static WebReportContext` | `getInstance(javax.servlet.http.HttpServletRequest request, boolean create)`
    `java.lang.Object` | `getParameterValue(java.lang.String parameterName)`
    `java.util.Map<java.lang.String,java.lang.Object>` | `getParameterValues()`
    `java.lang.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(java.lang.String parameterName, java.lang.Object value)`
    `void` | `setParameterValues(java.util.Map<java.lang.String,java.lang.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 java.lang.String REQUEST_PARAMETER_REPORT_CONTEXT_ID

      See Also:
        Constant Field Values

    - #### REPORT_CONTEXT_PARAMETER_JASPER_PRINT

          public static final java.lang.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 java.lang.String REPORT_CONTEXT_PARAMETER_JASPER_PRINT_ACCESSOR

      See Also:
        Constant Field Values

    - #### APPLICATION_CONTEXT_PATH

          public static final java.lang.String APPLICATION_CONTEXT_PATH

      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 java.lang.String getId()

      Specified by:
        `getId` in interface `ReportContext`

    - #### getSessionAttributeName

          public java.lang.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 java.lang.Object getParameterValue(java.lang.String parameterName)

      Specified by:
        `getParameterValue` in interface `ReportContext`

    - #### containsParameter

          public boolean containsParameter(java.lang.String parameterName)

      Specified by:
        `containsParameter` in interface `ReportContext`

    - #### setParameterValue

          public void setParameterValue(java.lang.String parameterName,
                               java.lang.Object value)

      Specified by:
        `setParameterValue` in interface `ReportContext`

    - #### setParameterValues

          public void setParameterValues(java.util.Map<java.lang.String,java.lang.Object> newValues)

    - #### getParameterValues

          public java.util.Map<java.lang.String,java.lang.Object> getParameterValues()

© 2001-2010 Jaspersoft Corporation www.jaspersoft.com