Project Wiki
Views

JasperServerArchitecture

From Wiki

Jump to: navigation, search

Contents

JasperServer Architecture

  • Overview
  • Components Used
  • Metadata Repository
  • Report Unit
  • JRXML and the Metadata Repository
  • Input Controls and Data Types
  • Security


Overview Image

Architecture Image


Overview: Major Components

Component Purpose Documentation
Spring Framework 2.5.6.SEC02 Inversion of Control Spring MVCHibernate integration http://springframework.org
Spring Security 2.0.4 Authentication, Authorization http://springframework.org
Spring Web Flow 2.0.7 Application control framework http://springframework.org
JasperReports 4.0.0 Report rendering and display http://jasperforge.org/projects/jasperreports
Hibernate 3.3.2 Object relational mapping and persistence http://hibernate.org
SiteMesh 2.2.1 Web layout and decoration http://www.opensymphony.com/sitemesh/
Apache Axis 1.3 and Axis2 axis-saaj-1.3 Web Services http://ws.apache.org/axis
axis-jaxrpc-1.3 and wsdl4j-1.5.1 Web Services http://ws.apache.org/axis
Maven2 2.2.1 - http://maven.apache.org

Individual Sub-Components

Metadata Repository

The metadata repository is a content store that holds configurable resources required for Business Intelligence. The content store is organized into folders, and resources can appear anywhere in the folder hierarchy. Every resource has a name, label, description and type.


Report Unit

The individual reports that people can run are reflected in JasperServer as "Report Units". A report unit contains all the required resources to produce a report, at the very least:

  • JRXML: the JasperReports definition file
  • Data source: A database connection to populate the report.
  • Additional resource types which can be used on an as needed basis include:
  • Images
  • Fonts
  • Sub reports
  • JAR files for JasperReports scriptlets
  • Data types for report parameters
  • Input controls: groupings of data types
  • Resource bundles for localization/internationalization

A report unit can contain private resources only for use by the given report unit, or can refer to resources in the metadata repository that exist independently of a given report unit: eg. there may be a data source, image or font that is useful across report units.

In planning your use of the repository for reporting, consider what resources would be useful across different report units. For example, you are likely to have a limited number of data sources with multiple reports using each data source, so set up the data sources once and then refer to them in the report units. There may be other resources like a common company logo image or deparmental resources that a number of reports will refer to.


JRXML and the Metadata Repository

Usually, JasperReports relies on finding resources it needs either within its libraries (standard fonts) or on the classpath (images, sub reports). JasperServer changes the way that JasperReports runs by allowing resources to be pulled interactively from the metadata repository. For example, an image on the classpath can be referred to in JRXML as:


  "images/MyLogo.jpg"


The JRXML to refer to an image from the metadata repository would be:


  "repo:images/MyLogo.jpg"


The JasperServer will look for an image file named MyLogo.jpg in the images folder.


Input Controls and Data Types

JasperReports allows external parameters to be provided to customize the functionality of a JasperReport. JasperServer includes a variety of "Input Controls" that can be mapped to these parameters. When the report unit is run, the user is prompted to select or fill in the controls with values for the parameters. These values are validated as needed before they are passed on to the report.

Multiple Input Controls may be included in a single report unit. The types of Input Controls are:

  • Single Select (text field)
  • Single Select from a list of values (list box)
  • Boolean (check box)
  • Multiple Select from a list of values - not implemented
  • Multiple Select - not implemented

Since the end-user is free to enter any value into a Single Select Input Control, validation is required. Each Single Select control is associated with a Data Type that defines the validation rules for that control. The Data Type is a resource in the metadata repository and thus has a name, label, and description. In addition, Data Types have the following attributes:

  • Type: Text, Number, Date, Date/Time
  • Pattern: formatting related to the underlying Java data type
  • Minimum Value, Maximum Value: range of values, can be open-ended in one direction
  • Is strict minimum, Is strict maximum: values have to be strictly less than or greater than, not equal to
  • Mandatory: a value is required
  • Read only: the value cannot be altered by the user


Security

The user names and passwords for the application are stored in the metadata repository and use form-based authentication. By default, passwords are unencrypted in the database, though this can be changed through straight forward configuration. Based on the use of the Acegi Security framework, the authentication mechanism can be changed to use external authentication services like LDAP. See here for more details.

The application does not currently manage the distinction between externally defined users and roles. We will work to allow externally authenticated users to have seamless access to reports by "inheriting" the roles external authentication services present to JasperServer.




JSPWikiNotice