use of org.mule.runtime.module.deployment.impl.internal.application.ApplicationDescriptorFactory in project mule by mulesoft.
the class TestApplicationFactory method createTestApplicationFactory.
public static TestApplicationFactory createTestApplicationFactory(MuleApplicationClassLoaderFactory applicationClassLoaderFactory, DomainManager domainManager, ServiceRepository serviceRepository, ExtensionModelLoaderRepository extensionModelLoaderRepository, ModuleRepository moduleRepository, DescriptorLoaderRepository descriptorLoaderRepository) {
ArtifactPluginDescriptorFactory artifactPluginDescriptorFactory = new ArtifactPluginDescriptorFactory();
ArtifactPluginDescriptorLoader artifactPluginDescriptorLoader = new ArtifactPluginDescriptorLoader(artifactPluginDescriptorFactory);
ApplicationDescriptorFactory applicationDescriptorFactory = new ApplicationDescriptorFactory(artifactPluginDescriptorLoader, descriptorLoaderRepository, ArtifactDescriptorValidatorBuilder.builder());
final DefaultClassLoaderManager artifactClassLoaderManager = new DefaultClassLoaderManager();
PluginDependenciesResolver pluginDependenciesResolver = new BundlePluginDependenciesResolver(artifactPluginDescriptorFactory);
ApplicationClassLoaderBuilderFactory applicationClassLoaderBuilderFactory = new ApplicationClassLoaderBuilderFactory(applicationClassLoaderFactory, new TrackingArtifactClassLoaderFactory<>(artifactClassLoaderManager, new ArtifactPluginClassLoaderFactory()), new DefaultRegionPluginClassLoadersFactory(new ArtifactPluginClassLoaderFactory(), moduleRepository));
return new TestApplicationFactory(applicationClassLoaderBuilderFactory, applicationDescriptorFactory, domainManager, serviceRepository, extensionModelLoaderRepository, artifactClassLoaderManager, mock(PolicyTemplateClassLoaderBuilderFactory.class), pluginDependenciesResolver, artifactPluginDescriptorLoader);
}
Aggregations