use of org.mule.runtime.extension.internal.property.NoReconnectionStrategyModelProperty in project mule by mulesoft.
the class XmlExtensionLoaderDelegate method loadPropertiesFrom.
private Optional<ConfigurationDeclarer> loadPropertiesFrom(ExtensionDeclarer declarer, ComponentModel moduleModel, Set<ExtensionModel> extensions) {
List<ComponentModel> globalElementsComponentModel = extractGlobalElementsFrom(moduleModel);
List<ComponentModel> configurationProperties = extractProperties(moduleModel);
List<ComponentModel> connectionProperties = extractConnectionProperties(moduleModel);
validateProperties(configurationProperties, connectionProperties);
if (!configurationProperties.isEmpty() || !connectionProperties.isEmpty() || !globalElementsComponentModel.isEmpty()) {
declarer.withModelProperty(new NoReconnectionStrategyModelProperty());
ConfigurationDeclarer configurationDeclarer = declarer.withConfig(CONFIG_NAME);
configurationDeclarer.withModelProperty(new GlobalElementComponentModelModelProperty(globalElementsComponentModel));
configurationProperties.stream().forEach(param -> extractProperty(configurationDeclarer, param));
addConnectionProvider(configurationDeclarer, connectionProperties, globalElementsComponentModel, extensions);
return of(configurationDeclarer);
}
return empty();
}
Aggregations