Search in sources :

Example 1 with XmlExtensionLoaderDelegate

use of org.mule.runtime.extension.internal.loader.XmlExtensionLoaderDelegate in project mule by mulesoft.

the class XmlExtensionModelLoader method declareExtension.

@Override
protected void declareExtension(ExtensionLoadingContext context) {
    final String modulePath = context.<String>getParameter(RESOURCE_XML).orElseThrow(() -> new IllegalArgumentException(format("The attribute '%s' is missing", RESOURCE_XML)));
    final boolean validateXml = context.<Boolean>getParameter(VALIDATE_XML).orElse(false);
    final Optional<String> declarationPath = context.getParameter(RESOURCE_DECLARATION);
    final XmlExtensionLoaderDelegate delegate = new XmlExtensionLoaderDelegate(modulePath, validateXml, declarationPath);
    delegate.declare(context);
}
Also used : XmlExtensionLoaderDelegate(org.mule.runtime.extension.internal.loader.XmlExtensionLoaderDelegate)

Aggregations

XmlExtensionLoaderDelegate (org.mule.runtime.extension.internal.loader.XmlExtensionLoaderDelegate)1