Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl
Class EngineServiceImpl

    java.lang.Object
      com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl

All Implemented Interfaces:
  EngineService, ReportExecuter, CompiledReportProvider

    public class EngineServiceImpl

extends java.lang.Object
implements EngineService, ReportExecuter, CompiledReportProvider

Version:
  $Id: AbstractAttributedObject.java 2140 2006-02-21 06:41:21Z tony $
Author:
  Teodor Danciu (teodord@users.sourceforge.net)

Nested Class Summary
`protected class` | `EngineServiceImpl.CacheableCompiledReports`
`protected static class` | `EngineServiceImpl.OrigContextClassLoader`
`protected class` | `EngineServiceImpl.TempJarFileCacheObject`

Field Summary
`protected static org.apache.commons.logging.Log` | `log`
`protected RepositoryService` | `repository`

Constructor Summary
`EngineServiceImpl()`

Method Summary
`void` | `clearCaches(java.lang.Class resourceItf, java.lang.String resourceURI)`
`protected net.sf.jasperreports.engine.JasperReport` | `compileReport(java.io.InputStream jrxmlData)`
`ReportDataSourceService` | `createDataSourceService(ReportDataSource dataSource)`
`protected void` | `createJarFilesCache()`
`protected java.lang.ClassLoader` | `createJarsClassLoader(java.lang.ClassLoader origClassLoader, java.util.List jarFiles)`
`protected void` | `dispose(java.util.jar.JarFile jarFile)`
`Result` | `execute(ExecutionContext context, Request request)`
`org.apache.commons.collections.OrderedMap` | `executeQuery(ExecutionContext context, ResourceReference queryReference, java.lang.String keyColumn, java.lang.String[] resultColumns, ResourceReference defaultDataSourceReference)`
`ReportUnitResult` | `executeReport(ExecutionContext context, ReportUnit reportUnit, java.util.Map parameters)`
`ReportUnitResult` | `executeReport(ExecutionContext context, java.lang.String reportUnitURI, java.util.Map parameters)`
`void` | `exportToPdf(ExecutionContext context, java.lang.String reportUnitURI, java.util.Map exportParameters)`
`protected net.sf.jasperreports.engine.JasperPrint` | `fillQueryReport(ExecutionContext context, net.sf.jasperreports.engine.JasperReport report, java.util.Map reportParameters, Query query)`
`protected ReportUnitResult` | `fillReport(ExecutionContext context, net.sf.jasperreports.engine.JasperReport report, java.util.Map reportParameters, ReportDataSource datasource, Query query)`
`protected ReportUnitResult` | `fillReport(ExecutionContext context, ReportUnit reportUnit, java.util.Map parameters, boolean inMemoryUnit)`
`protected RepositoryCacheMap.CacheObject` | `getCacheJarFile(ExecutionContext context, FileResource jar, boolean cache)`
`protected java.io.InputStream` | `getCompiledReport(ExecutionContext context, FileResource jrxml)`
`java.io.InputStream` | `getCompiledReport(ExecutionContext context, java.io.InputStream jrxmlData)`
`java.io.InputStream` | `getCompiledReport(ExecutionContext context, java.lang.String jrxmlURI)`
`RepositoryCache` | `getCompiledReportsCache()`
`ResourceLookup[]` | `getDataSources(ExecutionContext context, java.lang.String queryLanguage)`
`DataSourceServiceFactory` | `getDataSourceServiceFactories()`
`java.util.Set` | `getDataSourceTypes(ExecutionContext context, java.lang.String queryLanguage)`
`protected byte[]` | `getFileResourceData(ExecutionContext context, FileResource fileResource)`
`protected java.io.InputStream` | `getFileResourceDataStream(ExecutionContext context, FileResource fileResource)`
`protected FileResource` | `getFinalFileResource(ExecutionContext context, ResourceReference resRef)`
`protected Resource` | `getFinalResource(ExecutionContext context, ResourceReference res)`
`protected java.util.List` | `getJarFiles(ExecutionContext context, java.util.Map unitResources, boolean cache)`
`protected java.lang.ClassLoader` | `getJarsClassLoader(java.lang.ClassLoader origClassLoader, java.util.List jarFiles)`
`protected net.sf.jasperreports.engine.JasperReport` | `getJasperReport(ExecutionContext context, ReportUnit reportUnit, boolean inMemoryUnit)`
`java.lang.String` | `getLoggedInUserReportParameterName()`
`net.sf.jasperreports.engine.JasperReport` | `getMainJasperReport(ExecutionContext context, java.lang.String reportUnitURI)`
`java.lang.String` | `getQueryLanguage(ExecutionContext context, ResourceReference jrxmlResource)`
`java.util.Map` | `getReportInputControlDefaultValues(ExecutionContext context, java.lang.String reportURI, java.util.Map initialParameters)`
`ProtectionDomainProvider` | `getReportJarsProtectionDomainProvider()`
`protected java.util.Map` | `getReportParameters(ExecutionContext context, java.util.Map requestParameters)`
`protected Resource` | `getRepositoryResource(ExecutionContext context, java.lang.String uri)`
`RepositoryService` | `getRepositoryService()`
`protected java.util.Map` | `getResourceBundleKeys(ExecutionContext context, java.util.Map unitResources)`
`Resource[]` | `getResources(ResourceReference jrxmlReference)` Returns a list of required resources for the report such as images, fonts, subreports, etc.
`protected java.lang.ClassLoader` | `getResourcesClassLoader(java.lang.ClassLoader parent, java.util.Map resourceBundleKeys, boolean inMemoryUnit)`
`SecurityContextProvider` | `getSecurityContextProvider()`
`protected java.util.Map` | `loadFinalResources(ExecutionContext context, ReportUnit reportUnit)`
`protected net.sf.jasperreports.engine.design.JasperDesign` | `loadJRXML(ExecutionContext context, ResourceReference jrxmlResource)`
`protected net.sf.jasperreports.engine.JRTemplate` | `loadTemplate(ExecutionContext context, FileResource resource)`
`void` | `release()`
`protected byte[]` | `reportBytes(net.sf.jasperreports.engine.JasperReport report)`
`protected void` | `revert(EngineServiceImpl.OrigContextClassLoader origContext)`
`void` | `setCompiledReportsCache(RepositoryCache compiledReportsCache)`
`protected EngineServiceImpl.OrigContextClassLoader` | `setContextClassLoader(ExecutionContext context, java.util.Map unitResources, boolean inMemoryUnit)`
`protected EngineServiceImpl.OrigContextClassLoader` | `setContextClassLoader(ExecutionContext context, ReportUnit reportUnit, boolean inMemoryUnit)`
`void` | `setDataSourceServiceFactories(DataSourceServiceFactory dataSourceServiceFactories)`
`void` | `setLoggedInUserReportParameterName(java.lang.String loggedInUserReportParameterName)`
`void` | `setReportJarsProtectionDomainProvider(ProtectionDomainProvider protectionDomainProvider)`
`protected void` | `setReportTemplates(ExecutionContext context, java.util.Map unitResources, java.util.Map reportParameters)`
`void` | `setRepositoryService(RepositoryService repository)`
`void` | `setSecurityContextProvider(SecurityContextProvider securityContextProvider)`
`protected void` | `setThreadRepositoryContext(ExecutionContext context, ReportUnit reportUnit, java.lang.String reportUnitURI, boolean inMemoryUnit)`
`ValidationResult` | `validate(ExecutionContext context, ReportUnit reportUnit)`
`protected void` | `validateJRXML(ExecutionContext context, ValidationResultImpl result, ResourceReference resourceRef)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### log

    protected static final org.apache.commons.logging.Log log

### repository

    protected RepositoryService repository

Constructor Detail

### EngineServiceImpl

    public EngineServiceImpl()

Method Detail

### getRepositoryService

    public RepositoryService getRepositoryService()

### setRepositoryService

    public void setRepositoryService(RepositoryService repository)

### getCompiledReportsCache

    public RepositoryCache getCompiledReportsCache()

### setCompiledReportsCache

    public void setCompiledReportsCache(RepositoryCache compiledReportsCache)

### createJarFilesCache

    protected void createJarFilesCache()

### getFileResourceDataStream

    protected java.io.InputStream getFileResourceDataStream(ExecutionContext context,
                                                            FileResource fileResource)

### getCacheJarFile

    protected RepositoryCacheMap.CacheObject getCacheJarFile(ExecutionContext context,
                                                             FileResource jar,
                                                             boolean cache)

### getFileResourceData

    protected byte[] getFileResourceData(ExecutionContext context,
                                         FileResource fileResource)

### getDataSourceServiceFactories

    public DataSourceServiceFactory getDataSourceServiceFactories()

### setDataSourceServiceFactories

    public void setDataSourceServiceFactories(DataSourceServiceFactory dataSourceServiceFactories)

### execute

    public Result execute(ExecutionContext context,
                          Request request)

  Specified by:
    `execute` in interface `EngineService`

### exportToPdf

    public void exportToPdf(ExecutionContext context,
                            java.lang.String reportUnitURI,
                            java.util.Map exportParameters)

  Specified by:
    `exportToPdf` in interface `EngineService`

### setThreadRepositoryContext

    protected void setThreadRepositoryContext(ExecutionContext context,
                                              ReportUnit reportUnit,
                                              java.lang.String reportUnitURI,
                                              boolean inMemoryUnit)

### fillReport

    protected ReportUnitResult fillReport(ExecutionContext context,
                                          ReportUnit reportUnit,
                                          java.util.Map parameters,
                                          boolean inMemoryUnit)

### getReportParameters

    protected java.util.Map getReportParameters(ExecutionContext context,
                                                java.util.Map requestParameters)

### setReportTemplates

    protected void setReportTemplates(ExecutionContext context,
                                      java.util.Map unitResources,
                                      java.util.Map reportParameters)

### loadTemplate

    protected net.sf.jasperreports.engine.JRTemplate loadTemplate(ExecutionContext context,
                                                                  FileResource resource)

### revert

    protected void revert(EngineServiceImpl.OrigContextClassLoader origContext)

### setContextClassLoader

    protected EngineServiceImpl.OrigContextClassLoader setContextClassLoader(ExecutionContext context,
                                                                             ReportUnit reportUnit,
                                                                             boolean inMemoryUnit)

### loadFinalResources

    protected java.util.Map loadFinalResources(ExecutionContext context,
                                               ReportUnit reportUnit)

### setContextClassLoader

    protected EngineServiceImpl.OrigContextClassLoader setContextClassLoader(ExecutionContext context,
                                                                             java.util.Map unitResources,
                                                                             boolean inMemoryUnit)

### getJarsClassLoader

    protected java.lang.ClassLoader getJarsClassLoader(java.lang.ClassLoader origClassLoader,
                                                       java.util.List jarFiles)

### createJarsClassLoader

    protected java.lang.ClassLoader createJarsClassLoader(java.lang.ClassLoader origClassLoader,
                                                          java.util.List jarFiles)

### getResourcesClassLoader

    protected java.lang.ClassLoader getResourcesClassLoader(java.lang.ClassLoader parent,
                                                            java.util.Map resourceBundleKeys,
                                                            boolean inMemoryUnit)

### getJarFiles

    protected java.util.List getJarFiles(ExecutionContext context,
                                         java.util.Map unitResources,
                                         boolean cache)

### getResourceBundleKeys

    protected java.util.Map getResourceBundleKeys(ExecutionContext context,
                                                  java.util.Map unitResources)

### getJasperReport

    protected net.sf.jasperreports.engine.JasperReport getJasperReport(ExecutionContext context,
                                                                       ReportUnit reportUnit,
                                                                       boolean inMemoryUnit)

### fillReport

    protected ReportUnitResult fillReport(ExecutionContext context,
                                          net.sf.jasperreports.engine.JasperReport report,
                                          java.util.Map reportParameters,
                                          ReportDataSource datasource,
                                          Query query)

### fillQueryReport

    protected net.sf.jasperreports.engine.JasperPrint fillQueryReport(ExecutionContext context,
                                                                      net.sf.jasperreports.engine.JasperReport report,
                                                                      java.util.Map reportParameters,
                                                                      Query query)
                                                               throws net.sf.jasperreports.engine.JRException

  Throws:
    `net.sf.jasperreports.engine.JRException`

### createDataSourceService

    public ReportDataSourceService createDataSourceService(ReportDataSource dataSource)

  Specified by:
    `createDataSourceService` in interface `EngineService`

### getResources

    public Resource[] getResources(ResourceReference jrxmlReference)

  Description copied from interface: `EngineService`
  Returns a list of required resources for the report such as images, fonts, subreports, etc.

  Specified by:
    `getResources` in interface `EngineService`

### getRepositoryResource

    protected Resource getRepositoryResource(ExecutionContext context,
                                             java.lang.String uri)

### getFinalResource

    protected Resource getFinalResource(ExecutionContext context,
                                        ResourceReference res)

### getFinalFileResource

    protected FileResource getFinalFileResource(ExecutionContext context,
                                                ResourceReference resRef)

### validate

    public ValidationResult validate(ExecutionContext context,
                                     ReportUnit reportUnit)

  Specified by:
    `validate` in interface `EngineService`

### validateJRXML

    protected void validateJRXML(ExecutionContext context,
                                 ValidationResultImpl result,
                                 ResourceReference resourceRef)

### executeReport

    public ReportUnitResult executeReport(ExecutionContext context,
                                          java.lang.String reportUnitURI,
                                          java.util.Map parameters)

  Specified by:
    `executeReport` in interface `ReportExecuter`

### executeReport

    public ReportUnitResult executeReport(ExecutionContext context,
                                          ReportUnit reportUnit,
                                          java.util.Map parameters)

  Specified by:
    `executeReport` in interface `ReportExecuter`

### getCompiledReport

    public java.io.InputStream getCompiledReport(ExecutionContext context,
                                                 java.io.InputStream jrxmlData)

  Specified by:
    `getCompiledReport` in interface `CompiledReportProvider`

### compileReport

    protected net.sf.jasperreports.engine.JasperReport compileReport(java.io.InputStream jrxmlData)

### getCompiledReport

    protected java.io.InputStream getCompiledReport(ExecutionContext context,
                                                    FileResource jrxml)

### reportBytes

    protected byte[] reportBytes(net.sf.jasperreports.engine.JasperReport report)

### getCompiledReport

    public java.io.InputStream getCompiledReport(ExecutionContext context,
                                                 java.lang.String jrxmlURI)

  Specified by:
    `getCompiledReport` in interface `CompiledReportProvider`

### getMainJasperReport

    public net.sf.jasperreports.engine.JasperReport getMainJasperReport(ExecutionContext context,
                                                                        java.lang.String reportUnitURI)

  Specified by:
    `getMainJasperReport` in interface `EngineService`

### release

    public void release()

  Specified by:
    `release` in interface `EngineService`

### dispose

    protected void dispose(java.util.jar.JarFile jarFile)

### clearCaches

    public void clearCaches(java.lang.Class resourceItf,
                            java.lang.String resourceURI)

  Specified by:
    `clearCaches` in interface `EngineService`

### getLoggedInUserReportParameterName

    public java.lang.String getLoggedInUserReportParameterName()

### setLoggedInUserReportParameterName

    public void setLoggedInUserReportParameterName(java.lang.String loggedInUserReportParameterName)

### getSecurityContextProvider

    public SecurityContextProvider getSecurityContextProvider()

### setSecurityContextProvider

    public void setSecurityContextProvider(SecurityContextProvider securityContextProvider)

### executeQuery

    public org.apache.commons.collections.OrderedMap executeQuery(ExecutionContext context,
                                                                  ResourceReference queryReference,
                                                                  java.lang.String keyColumn,
                                                                  java.lang.String[] resultColumns,
                                                                  ResourceReference defaultDataSourceReference)

  Specified by:
    `executeQuery` in interface `EngineService`

### getDataSources

    public ResourceLookup[] getDataSources(ExecutionContext context,
                                           java.lang.String queryLanguage)

  Specified by:
    `getDataSources` in interface `EngineService`

### getQueryLanguage

    public java.lang.String getQueryLanguage(ExecutionContext context,
                                             ResourceReference jrxmlResource)

  Specified by:
    `getQueryLanguage` in interface `EngineService`

### loadJRXML

    protected net.sf.jasperreports.engine.design.JasperDesign loadJRXML(ExecutionContext context,
                                                                        ResourceReference jrxmlResource)

### getDataSourceTypes

    public java.util.Set getDataSourceTypes(ExecutionContext context,
                                            java.lang.String queryLanguage)

  Specified by:
    `getDataSourceTypes` in interface `EngineService`

### getReportInputControlDefaultValues

    public java.util.Map getReportInputControlDefaultValues(ExecutionContext context,
                                                            java.lang.String reportURI,
                                                            java.util.Map initialParameters)

  Specified by:
    `getReportInputControlDefaultValues` in interface `EngineService`

### getReportJarsProtectionDomainProvider

    public ProtectionDomainProvider getReportJarsProtectionDomainProvider()

### setReportJarsProtectionDomainProvider

    public void setReportJarsProtectionDomainProvider(ProtectionDomainProvider protectionDomainProvider)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2007. All Rights Reserved.