[jbpm-commits] JBoss JBPM SVN: r3285 - in projects/report-server/trunk: core/src/main/java/org/jboss/balalaika and 1 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Tue Dec 9 06:39:08 EST 2008


Author: heiko.braun at jboss.com
Date: 2008-12-09 06:39:08 -0500 (Tue, 09 Dec 2008)
New Revision: 3285

Added:
   projects/report-server/trunk/report-server.iml
Modified:
   projects/report-server/trunk/core/src/main/java/org/jboss/balalaika/BirtService.java
   projects/report-server/trunk/core/src/main/java/org/jboss/balalaika/RenderMetaData.java
   projects/report-server/trunk/server/src/main/java/org/jboss/balalaika/ReportFacade.java
Log:
Add parameter map to RenderMetaData

Modified: projects/report-server/trunk/core/src/main/java/org/jboss/balalaika/BirtService.java
===================================================================
--- projects/report-server/trunk/core/src/main/java/org/jboss/balalaika/BirtService.java	2008-12-09 11:36:55 UTC (rev 3284)
+++ projects/report-server/trunk/core/src/main/java/org/jboss/balalaika/BirtService.java	2008-12-09 11:39:08 UTC (rev 3285)
@@ -105,7 +105,8 @@
          IRunAndRenderTask runRenderTask = engine.createRunAndRenderTask(design);
          //Set parent classloader for engine
          runRenderTask.getAppContext().put(EngineConstants.APPCONTEXT_CLASSLOADER_KEY, metaData.getClassloader());
-
+         runRenderTask.setParameterValues(metaData.getParameters());
+         
          // ------------------
          
          IRenderOption options = new RenderOption();

Modified: projects/report-server/trunk/core/src/main/java/org/jboss/balalaika/RenderMetaData.java
===================================================================
--- projects/report-server/trunk/core/src/main/java/org/jboss/balalaika/RenderMetaData.java	2008-12-09 11:36:55 UTC (rev 3284)
+++ projects/report-server/trunk/core/src/main/java/org/jboss/balalaika/RenderMetaData.java	2008-12-09 11:39:08 UTC (rev 3285)
@@ -21,6 +21,9 @@
  */
 package org.jboss.balalaika;
 
+import java.util.Map;
+import java.util.HashMap;
+
 /**
  * Drives a {@link org.jboss.balalaika.BirtService#render(RenderMetaData)} call.
  * 
@@ -33,6 +36,7 @@
    private ClassLoader classloader;
    private String reportName;
    private Format format;
+   private Map parameters = new HashMap();
 
    public RenderMetaData()
    {
@@ -80,4 +84,9 @@
    {
       return "RenderMetaData {reportName="+reportName+", format="+format+"}";
    }
+
+   public Map getParameters()
+   {
+      return parameters;
+   }
 }

Added: projects/report-server/trunk/report-server.iml
===================================================================
--- projects/report-server/trunk/report-server.iml	                        (rev 0)
+++ projects/report-server/trunk/report-server.iml	2008-12-09 11:39:08 UTC (rev 3285)
@@ -0,0 +1,368 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module version="4" relativePaths="true" type="JAVA_MODULE">
+  <component name="ModuleRootManager" />
+  <component name="NewModuleRootManager" inherit-compiler-output="true">
+    <exclude-output />
+    <content url="file://$MODULE_DIR$">
+      <sourceFolder url="file://$MODULE_DIR$/core/src/main/java" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/core/src/main/resources" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/server/src/main/java" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/server/src/main/resources" isTestSource="false" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: javax.xml.bind:jaxb-api:jar:2.1:compile">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: org.slf4j:slf4j-simple:jar:1.5.2:compile">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/slf4j/slf4j-simple/1.5.2/slf4j-simple-1.5.2.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: junit:junit:jar:3.8.1:test">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: commons-logging:commons-logging:jar:1.1.1:compile">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: commons-discovery:commons-discovery:jar:0.2:compile">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/commons-discovery/commons-discovery/0.2/commons-discovery-0.2.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: com.ibm.icu:icu4j:jar:3.6.1:compile">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/com/ibm/icu/icu4j/3.6.1/icu4j-3.6.1.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: javax.servlet:servlet-api:jar:2.5:compile">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/javax/servlet/servlet-api/2.5/servlet-api-2.5.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: javax.annotation:jsr250-api:jar:1.0:compile">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/javax/annotation/jsr250-api/1.0/jsr250-api-1.0.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: commons-httpclient:commons-httpclient:jar:3.1:compile">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/commons-httpclient/commons-httpclient/3.1/commons-httpclient-3.1.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: org.eclipse.emf:common:jar:2.2.1.v200702131851:compile">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/eclipse/emf/common/2.2.1.v200702131851/common-2.2.1.v200702131851.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: commons-cli:commons-cli:jar:1.0:compile">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/commons-cli/commons-cli/1.0/commons-cli-1.0.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: org.eclipse.birt:engineapi:jar:2.2.2:compile">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/eclipse/birt/engineapi/2.2.2/engineapi-2.2.2.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: javax.xml.stream:stax-api:jar:1.0:compile">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/javax/xml/stream/stax-api/1.0/stax-api-1.0.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: javax.activation:activation:jar:1.1:compile">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/javax/activation/activation/1.1/activation-1.1.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: org.eclipse.birt:coreapi:jar:2.2.2:compile">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/eclipse/birt/coreapi/2.2.2/coreapi-2.2.2.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: com.sun.xml.fastinfoset:FastInfoset:jar:1.2.2:compile">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/com/sun/xml/fastinfoset/FastInfoset/1.2.2/FastInfoset-1.2.2.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: commons-codec:commons-codec:jar:1.3:compile">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/commons-codec/commons-codec/1.3/commons-codec-1.3.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: org.eclipse.birt:dataadapterapi:jar:2.2.2:compile">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/eclipse/birt/dataadapterapi/2.2.2/dataadapterapi-2.2.2.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: org.w3c:sac:jar:1.3:compile">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/w3c/sac/1.3/sac-1.3.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: org.slf4j:slf4j-api:jar:1.5.2:compile">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/slf4j/slf4j-api/1.5.2/slf4j-api-1.5.2.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: org.eclipse.birt:chartengineapi:jar:2.2.2:compile">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/eclipse/birt/chartengineapi/2.2.2/chartengineapi-2.2.2.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: org.eclipse.birt:dteapi:jar:2.2.2:compile">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/eclipse/birt/dteapi/2.2.2/dteapi-2.2.2.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: org.eclipse.emf:ecore:jar:2.2.2.v200702131851:compile">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/eclipse/emf/ecore/2.2.2.v200702131851/ecore-2.2.2.v200702131851.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: org.codehaus.jettison:jettison:jar:1.0.1:compile">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/codehaus/jettison/jettison/1.0.1/jettison-1.0.1.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: com.sun.xml.stream:sjsxp:jar:1.0.1:compile">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/com/sun/xml/stream/sjsxp/1.0.1/sjsxp-1.0.1.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: javax.mail:mail:jar:1.4:compile">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/javax/mail/mail/1.4/mail-1.4.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: javassist:javassist:jar:3.6.0.GA:compile">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/javassist/javassist/3.6.0.GA/javassist-3.6.0.GA.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: rhino:js:jar:1.6R2:compile">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/rhino/js/1.6R2/js-1.6R2.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: org.jyaml:jyaml:jar:1.3:compile">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/jyaml/jyaml/1.3/jyaml-1.3.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: tjws:webserver:jar:1.3.3:compile">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/tjws/webserver/1.3.3/webserver-1.3.3.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: com.lowagie:itext:jar:1.3:compile">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/com/lowagie/itext/1.3/itext-1.3.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: org.jboss.resteasy:resteasy-jaxrs:jar:1.0-beta-8:compile">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/jboss/resteasy/resteasy-jaxrs/1.0-beta-8/resteasy-jaxrs-1.0-beta-8.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: org.eclipse.emf:ecore-xmi:jar:2.2.2.v200702131851:compile">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/eclipse/emf/ecore-xmi/2.2.2.v200702131851/ecore-xmi-2.2.2.v200702131851.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: org.jboss.resteasy:jaxrs-api:jar:1.0-beta-8:compile">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/jboss/resteasy/jaxrs-api/1.0-beta-8/jaxrs-api-1.0-beta-8.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: org.eclipse.birt:modelapi:jar:2.2.2:compile">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/eclipse/birt/modelapi/2.2.2/modelapi-2.2.2.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: org.w3c:flute:jar:1.2:compile">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/w3c/flute/1.2/flute-1.2.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: com.sun.xml.bind:jaxb-impl:jar:2.1.2:compile">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/com/sun/xml/bind/jaxb-impl/2.1.2/jaxb-impl-2.1.2.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: org.eclipse.birt:scriptapi:jar:2.2.2:compile">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/eclipse/birt/scriptapi/2.2.2/scriptapi-2.2.2.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: org.scannotation:scannotation:jar:1.0.2:compile">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/scannotation/scannotation/1.0.2/scannotation-1.0.2.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntryProperties />
+  </component>
+</module>
+

Modified: projects/report-server/trunk/server/src/main/java/org/jboss/balalaika/ReportFacade.java
===================================================================
--- projects/report-server/trunk/server/src/main/java/org/jboss/balalaika/ReportFacade.java	2008-12-09 11:36:55 UTC (rev 3284)
+++ projects/report-server/trunk/server/src/main/java/org/jboss/balalaika/ReportFacade.java	2008-12-09 11:39:08 UTC (rev 3285)
@@ -29,6 +29,9 @@
 import javax.ws.rs.core.Context;
 import javax.ws.rs.core.Response;
 import java.io.*;
+import java.util.HashMap;
+import java.util.Enumeration;
+import java.util.Map;
 
 /**
  * BIRT integration facade.<p>
@@ -40,12 +43,12 @@
  *    <li>report template location: $WORK_DIR/
  *    <li>output directory: $WORK_DIR/output
  * </ul>
- * 
+ *
  * NOTE: It requires a BIRT report engine to be installed in the work directory:
  * (<code>$WORK_DIR/ReportEngine</code>.
  *
  * @see org.jboss.balalaika.JMXServerConfig
- * 
+ *
  * @author Heiko.Braun <heiko.braun at jboss.com>
  */
 @Path("report")
@@ -54,8 +57,8 @@
    private static final Log log = LogFactory.getLog(ReportFacade.class);
    private BirtService birtService;
    private boolean isInitialized;
- 
-   public void lazyInitialize(HttpServletRequest request)         
+
+   public void lazyInitialize(HttpServletRequest request)
    {
       if(!isInitialized)
       {
@@ -66,7 +69,7 @@
          String absServerDataDir = severDataDir.getAbsolutePath();
 
          String birtDataDir = absServerDataDir + "/birt";
-         String defaultBirtHome = birtDataDir + "/ReportEngine";         
+         String defaultBirtHome = birtDataDir + "/ReportEngine";
          String birtOutputDir = birtDataDir + "/output";
 
          File birtOutput = new File(birtOutputDir);
@@ -94,7 +97,7 @@
 
          log.info("BIRT home: " +iConfig.getBirtHome());
          log.info("Output dir: " +iConfig.getOutputDir());
-         log.info("Report dir: " +iConfig.getReportDir());        
+         log.info("Report dir: " +iConfig.getReportDir());
 
          this.birtService = new BirtService(iConfig);
          this.birtService.create();
@@ -110,16 +113,19 @@
          @PathParam("fileName")
          String fileName,
          @Context HttpServletRequest
-         request
-         )
+               request
+   )
    {
       lazyInitialize(request);
 
+      Map queryParams = convertRequestParametersToMap(request);
+
       RenderMetaData renderMeta = new RenderMetaData();
       renderMeta.setReportName(fileName);
       renderMeta.setFormat(RenderMetaData.Format.HTML);
       renderMeta.setClassloader(Thread.currentThread().getContextClassLoader());
-
+      renderMeta.getParameters().putAll(queryParams);
+      
       String outputFileName = birtService.render(renderMeta);
       String absoluteFile = birtService.getIConfig().getOutputDir() + outputFileName;
       log.info("Render " + absoluteFile);
@@ -134,11 +140,11 @@
          @PathParam("fileName")
          String fileName,
          @Context HttpServletRequest
-         request
+               request
    )
    {
       lazyInitialize(request);
-
+      
       String imageDir = birtService.getIConfig().getImageDirectory();
       String absName = imageDir + fileName;
       File imageFile = new File(absName);
@@ -146,4 +152,16 @@
          throw new IllegalArgumentException("Image " +absName+" doesn't exist");
       return Response.ok(imageFile).build();
    }
+
+   static public Map<String, String> convertRequestParametersToMap(HttpServletRequest request){
+      Enumeration<?> initParameters=request.getParameterNames();
+      HashMap<String, String> parameterMap = new HashMap<String, String>();
+      while (initParameters.hasMoreElements()) {
+         String param = (String) initParameters.nextElement();
+         String value = request.getParameter(param);
+         if (param != null & value != null)
+            parameterMap.put(param, value);
+      }
+      return parameterMap;
+   }
 }




More information about the jbpm-commits mailing list