it.eng.qbe.services
Class ReportServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by it.eng.qbe.services.ReportServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class ReportServlet
extends javax.servlet.http.HttpServlet

Author:
Gioia
See Also:
Serialized Form

Field Summary
static java.lang.String ACTION_PARAMETER
           
 
Constructor Summary
ReportServlet()
           
 
Method Summary
 java.lang.String getActionParameter(javax.servlet.http.HttpServletRequest request)
           
 java.util.Map getParams()
           
 org.hibernate.Session getSession(java.io.File jarFile, java.lang.String jndiDataSourceName, java.lang.String dialect)
           
 void init(javax.servlet.ServletConfig config)
           
 void service(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Handle an export request of a QBE query resultset.
static void updateCurrentClassLoader(java.io.File jarFile)
          This method update the Thread Context ClassLoader adding to the class loader the jarFile
 
Methods inherited from class javax.servlet.http.HttpServlet
service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ACTION_PARAMETER

public static final java.lang.String ACTION_PARAMETER
See Also:
Constant Field Values
Constructor Detail

ReportServlet

public ReportServlet()
Method Detail

init

public void init(javax.servlet.ServletConfig config)
          throws javax.servlet.ServletException
Specified by:
init in interface javax.servlet.Servlet
Overrides:
init in class javax.servlet.GenericServlet
Throws:
javax.servlet.ServletException

getActionParameter

public java.lang.String getActionParameter(javax.servlet.http.HttpServletRequest request)

service

public void service(javax.servlet.http.HttpServletRequest request,
                    javax.servlet.http.HttpServletResponse response)
             throws java.io.IOException,
                    javax.servlet.ServletException
Handle an export request of a QBE query resultset. First generates a jasper report template. Than compile & fill it. In the end exports the filled report to the target export format. If the parameter action is equal to buildTemplate it juat return the report template

Overrides:
service in class javax.servlet.http.HttpServlet
Throws:
java.io.IOException
javax.servlet.ServletException

getParams

public java.util.Map getParams()

getSession

public org.hibernate.Session getSession(java.io.File jarFile,
                                        java.lang.String jndiDataSourceName,
                                        java.lang.String dialect)

updateCurrentClassLoader

public static void updateCurrentClassLoader(java.io.File jarFile)
This method update the Thread Context ClassLoader adding to the class loader the jarFile

Parameters:
jarFile -