Package net.sf.jasperreports.engine.xml
Class JRXmlTemplateLoader
java.lang.Object
net.sf.jasperreports.engine.xml.JRXmlTemplateLoader
Utility class that loads
templates from XML representations.- Author:
- Lucian Chirita (lucianc@users.sourceforge.net)
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic JRXmlTemplateLoadergetInstance(JasperReportsContext jasperReportsContext) static JRXmlTemplateLoadergetInstance(RepositoryContext repositoryContext) static JRTemplatestatic JRTemplateload(InputStream data) static JRTemplatestatic JRTemplateloadTemplate(File file) Parses a template XML file into atemplate object.loadTemplate(InputStream data) Parses a template XML data stream into atemplate object.loadTemplate(String location) Parses a template XML found at a specified location into atemplate object.loadTemplate(URL url) Parses a template XML located at a URL into atemplate object.
-
Field Details
-
EXCEPTION_MESSAGE_KEY_TEMPLATE_NOT_FOUND
- See Also:
-
EXCEPTION_MESSAGE_KEY_TEMPLATE_PARSING_ERROR
- See Also:
-
EXCEPTION_MESSAGE_KEY_TEMPLATE_READING_ERROR
- See Also:
-
EXCEPTION_MESSAGE_KEY_URL_CONNECTION_ERROR
- See Also:
-
-
Method Details
-
getInstance
-
getInstance
-
loadTemplate
Parses a template XML found at a specified location into atemplate object.- Parameters:
location- the template XML location. Can be a URL, a file path or a classloader resource name.- Returns:
- the template object
- Throws:
JRException- when the location cannot be resolved or read- See Also:
-
loadTemplate
Parses a template XML file into atemplate object.- Parameters:
file- the template XML file- Returns:
- the template object
-
loadTemplate
Parses a template XML located at a URL into atemplate object.- Parameters:
url- the location of the template XML- Returns:
- the template object
-
loadTemplate
Parses a template XML data stream into atemplate object.- Parameters:
data- the data stream- Returns:
- the template object
-
load
- Throws:
JRException- See Also:
-
load
- See Also:
-
load
- See Also:
-
load
- See Also:
-