public class JRXmlTemplateLoader
extends java.lang.Object
templates
from XML representations.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
EXCEPTION_MESSAGE_KEY_TEMPLATE_NOT_FOUND |
static java.lang.String |
EXCEPTION_MESSAGE_KEY_TEMPLATE_PARSING_ERROR |
static java.lang.String |
EXCEPTION_MESSAGE_KEY_TEMPLATE_READING_ERROR |
static java.lang.String |
EXCEPTION_MESSAGE_KEY_URL_CONNECTION_ERROR |
Modifier | Constructor and Description |
---|---|
protected |
JRXmlTemplateLoader()
Deprecated.
Replaced by
JRXmlTemplateLoader(JasperReportsContext) . |
Modifier and Type | Method and Description |
---|---|
static JRXmlTemplateLoader |
getInstance(JasperReportsContext jasperReportsContext) |
static JRTemplate |
load(java.io.File file) |
static JRTemplate |
load(java.io.InputStream data) |
static JRTemplate |
load(java.lang.String location) |
static JRTemplate |
load(java.net.URL url) |
JRTemplate |
loadTemplate(java.io.File file)
Parses a template XML file into a
template object . |
JRTemplate |
loadTemplate(java.io.InputStream data)
Parses a template XML data stream into a
template object . |
JRTemplate |
loadTemplate(java.lang.String location)
Parses a template XML found at a specified location into a
template object . |
JRTemplate |
loadTemplate(java.net.URL url)
Parses a template XML located at a URL into a
template object . |
public static final java.lang.String EXCEPTION_MESSAGE_KEY_TEMPLATE_NOT_FOUND
public static final java.lang.String EXCEPTION_MESSAGE_KEY_TEMPLATE_PARSING_ERROR
public static final java.lang.String EXCEPTION_MESSAGE_KEY_TEMPLATE_READING_ERROR
public static final java.lang.String EXCEPTION_MESSAGE_KEY_URL_CONNECTION_ERROR
protected JRXmlTemplateLoader()
JRXmlTemplateLoader(JasperReportsContext)
.public static JRXmlTemplateLoader getInstance(JasperReportsContext jasperReportsContext)
public JRTemplate loadTemplate(java.lang.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(java.io.File file)
template object
.file
- the template XML filepublic JRTemplate loadTemplate(java.net.URL url)
template object
.url
- the location of the template XMLpublic JRTemplate loadTemplate(java.io.InputStream data)
template object
.data
- the data streampublic static JRTemplate load(java.lang.String location) throws JRException
JRException
loadTemplate(String)
public static JRTemplate load(java.io.File file)
loadTemplate(File)
public static JRTemplate load(java.net.URL url)
loadTemplate(URL)
public static JRTemplate load(java.io.InputStream data)
loadTemplate(InputStream)
© 2001-2014 TIBCO Software Inc. www.jaspersoft.com