public class XmlConfigurationDocumentLoader extends Object
Document object.
If when loading the configuration one, or more, ErrorHandler.error(SAXParseException) are call, at the end of
loadDocument(Optional, String, InputStream) will throw an exception containing all the errors.#loadDocument(Optional, String, InputStream)}| Constructor and Description |
|---|
XmlConfigurationDocumentLoader()
Creates an
XmlConfigurationDocumentLoader using the default DefaultXmlGathererErrorHandlerFactory
to instantiate XmlGathererErrorHandlers objects when executing the loadDocument(Optional, String, InputStream)
method. |
XmlConfigurationDocumentLoader(XmlGathererErrorHandlerFactory xmlGathererErrorHandlerFactory)
Creates an
XmlConfigurationDocumentLoader using a parametrized XmlGathererErrorHandlerFactory
to instantiate XmlGathererErrorHandlers objects when executing the loadDocument(Optional, String, InputStream)
method. |
| Modifier and Type | Method and Description |
|---|---|
Document |
loadDocument(Optional<ExtensionManager> extensionManager,
String filename,
InputStream inputStream)
Creates a
Document from an InputStream with the required configuration
of a mule configuration file parsing. |
Document |
loadDocument(String filename,
InputStream inputStream)
Creates a
Document from an InputStream with the required configuration
of a mule configuration file parsing. |
public XmlConfigurationDocumentLoader()
XmlConfigurationDocumentLoader using the default DefaultXmlGathererErrorHandlerFactory
to instantiate XmlGathererErrorHandlers objects when executing the loadDocument(Optional, String, InputStream)
method.
Using the default constructor implies that all XSD validations will take place and, at the end of the parsing, all
the errors will be contained in an MuleRuntimeException which will be thrown.public XmlConfigurationDocumentLoader(XmlGathererErrorHandlerFactory xmlGathererErrorHandlerFactory)
XmlConfigurationDocumentLoader using a parametrized XmlGathererErrorHandlerFactory
to instantiate XmlGathererErrorHandlers objects when executing the loadDocument(Optional, String, InputStream)
method.
Depending on what type of XmlGathererErrorHandler the factory returns, the loadDocument(Optional, String, InputStream)
method will not thrown any exception if XmlGathererErrorHandler.getErrors() is an empty list.xmlGathererErrorHandlerFactory - to create XmlGathererErrorHandler in the loadDocument(Optional, String, InputStream)public Document loadDocument(String filename, InputStream inputStream)
Document from an InputStream with the required configuration
of a mule configuration file parsing.filename - name of the file to display a better error messages (if there are any). Non null.inputStream - the input stream with the XML configuration content.Document object with the provided content.org.mule.runtime.api.exception.MuleRuntimeException - if an error occurs in DocumentLoader factory, or if the current filename
contains 1 or more errors.DefaultXmlLoggerErrorHandler#getErrors()}public Document loadDocument(Optional<ExtensionManager> extensionManager, String filename, InputStream inputStream)
Document from an InputStream with the required configuration
of a mule configuration file parsing.extensionManager - if the current inputStream relies in other schemas pending to be loaded from anfilename - name of the file to display a better error messages (if there are any). Non null.inputStream - the input stream with the XML configuration content.Document object with the provided content.org.mule.runtime.api.exception.MuleRuntimeException - if an error occurs in DocumentLoader factory, or if the current filename
contains 1 or more errors.DefaultXmlLoggerErrorHandler#getErrors()}Copyright © 2003–2017 MuleSoft, Inc.. All rights reserved.