Property Reference

Abstract

Learn to configure Ad Hoc report configuration locations, the maximum number of report results, JNDI Data Sources, logging and more.


Pull Reports™ reads the pullreports.properties file from the root of the JVM classpath on startup. Two properties are always required. The catalogs property lists the available Pull Reports™ catalog configurations and the jndiDataSource property specifies the javax.sql.DataSource used to fulfill the requests to the Pull Reports REST API.

Example 1. Minimal pullreports.properties

This example pullreports.properties file configures three Pull Reports™ XML Catalog files, two located on the JVM classpath and one available via a network URL and one Catalog Configuration Java API CatalogConfigurationFactory. Additionally, the file specifies the java:comp/env/jdbc/my-datasource JNDI resource to fulfill requests to the Export Report REST API.

catalogs=classpath:reports/class-information-catalog.xml \
classpath:reports/student-information-catalog.xml \
http://www.yourcompany.com/common-pullreports-catalogs/enrollment-information-catalog.xml \
factory:com.yourcompany.pullreports.FacilityCatalogConfigurationFactory

jndiDataSource=java:comp/env/jdbc/my-datasource

Overriding a Property

Any property documented with a [.catalogId][.reportId] suffix may be overridden for all <report>s within a <catalog> or a specific <report> by (.) appending the catalog id and, optionally, report id to the property name.

For example, the following configuration sets the global export.report.maxResults to 10000 rows, overrides the value for all reports in <catalog> myCatalog to 2000, and then overrides the catalog value for <report> myReport in myCatalog to 3000.

export.report.maxResults=10000
export.report.maxResults.myCatalog=2000
export.report.maxResults.myCatalog.myReport=3000

Available Properties

catalogs

Required

White space separated list of catalog configuration references to be parsed on Servlet initialization. Each catalog configuration reference is either:

  • Proceeded with classpath: to indicate a Pull Reports™ XML Catalog file file available on the JVM classpath. A common classpath location for Pull Reports™ XML Catalog files is the installation WAR's WEB-INF/classes directory.

  • Any valid java.net.URI to a Pull Reports™ XML Catalog file. Use this method to load a Pull Reports™ XML Catalog file from a file external to the WAR or from a URL.

  • The fully qualified name of a Java class proceeded with the term factory:. The factory class must either implement the CatalogConfigurationFactory interface or meet both of the following criteria:

    1. The factory class must have a constructor which takes a javax.servlet.ServletContext as its single argument.

    2. The factory class must have a public, no-argument method called makeCatalog which returns a java.io.Reader. Pull Reports™ will parse the Pull Reports™ XML Catalog file document from the Reader.

jndiDataSource[.catalogId][.reportId]

Required

JNDI location (e.g. java:comp/env/myDatasource) of a javax.sql.DataSource to be used by the Pull Reports REST API.

To use one DataSource for all reports, simply specify a single jndiDataSource property. To customize the value per-<catalog> or per-<report>, (.) append the catalog id and, optionally, the report id to the property name respectively.

export.report.include.(...)

Optional

Allows decoration of the Export Report REST API html and map formats via Servlet includes. See the export decoration documentation for more details.

export.report.maxResults[.catalogId][.reportId]

Default: 200000

The maximum allowed number of results to be returned from the Export Report REST API. Must be an Integer value. A value less than 0 indicates no maximum. If not set, the default value is 200000.

export.report.postgresql.queryCostMaximum[.catalogId][.reportId]

Default: 50000

The maximum permitted value of the PostgreSQL explain plan's total cost for database queries formulated by the Export Report REST API. A value of less than 0 indicates no maximum. If not set, the default value is 50000. A query which exceeds the maximum will terminate the request and return an HTTP response status code of 400.

This property is only applicable for connections to a PostgreSQL database.

export.sql.active[.catalogId][.reportId]

Default: false

Boolean (true|false) value which controls the availability of the GET Export SQL API. If set to false, the default, a request to the API will return an HTTP status code of 404, Not Found.

Security warning!

Only set export.sql.active to true after properly securing the GET Export SQL API. Since the API returns raw SQL, it may aid attackers in mounting SQL based attacks.

static.resource.prefix

Optional

The resource path prefix used by the map and html export formats when creating paths to Pull Reports™ JavaScript and CSS resources. The default value is the empty String. The value must be set to /static for a Grails 3 installation.

Grails 3 and static resources

In a basic WAR installation, the Servlet Container serves static resources within the pullreports-x.y.z.jar!META-INF/resources directory from at the root of the WAR's context path. Links to these resources are used within Export Report REST API formats which write HTML documents.

Within a Grails 3 Installation, the same resources are served under the /static path. Setting static.resource.path=/static correctly prepends /static to the resource URLs