Modifier and Type | Field and Description |
---|---|
static String |
EXCEPTION_MESSAGE_KEY_TEMPLATE_NOT_FOUND |
static String |
EXCEPTION_MESSAGE_KEY_TEMPLATE_PARSING_ERROR |
static String |
EXCEPTION_MESSAGE_KEY_TEMPLATE_READING_ERROR |
static String |
EXCEPTION_MESSAGE_KEY_URL_CONNECTION_ERROR |
Modifier and Type | Method and Description |
---|---|
static JRXmlTemplateLoader |
getInstance(JasperReportsContext jasperReportsContext) |
static JRTemplate |
load(File file) |
static JRTemplate |
load(InputStream data) |
static JRTemplate |
load(String location) |
static JRTemplate |
load(URL url) |
JRTemplate |
loadTemplate(File file)
Parses a template XML file into a
template object . |
JRTemplate |
loadTemplate(InputStream data)
Parses a template XML data stream into a
template object . |
JRTemplate |
loadTemplate(String location)
Parses a template XML found at a specified location into a
template object . |
JRTemplate |
loadTemplate(URL url)
Parses a template XML located at a URL into a
template object . |
public static final String EXCEPTION_MESSAGE_KEY_TEMPLATE_NOT_FOUND
public static final String EXCEPTION_MESSAGE_KEY_TEMPLATE_PARSING_ERROR
public static final String EXCEPTION_MESSAGE_KEY_TEMPLATE_READING_ERROR
public static final String EXCEPTION_MESSAGE_KEY_URL_CONNECTION_ERROR
public static JRXmlTemplateLoader getInstance(JasperReportsContext jasperReportsContext)
public JRTemplate loadTemplate(String location) throws JRException
template object
.location
- the template XML location.
Can be a URL, a file path or a classloader resource name.JRException
- when the location cannot be resolved or readRepositoryUtil.getBytesFromLocation(String)
public JRTemplate loadTemplate(File file)
template object
.file
- the template XML filepublic JRTemplate loadTemplate(URL url)
template object
.url
- the location of the template XMLpublic JRTemplate loadTemplate(InputStream data)
template object
.data
- the data streampublic static JRTemplate load(String location) throws JRException
JRException
loadTemplate(String)
public static JRTemplate load(File file)
loadTemplate(File)
public static JRTemplate load(URL url)
loadTemplate(URL)
public static JRTemplate load(InputStream data)
loadTemplate(InputStream)
Copyright © 2016. All rights reserved.