use of org.mule.runtime.config.internal.dsl.SchemaConstants.MULE_ABSTRACT_MESSAGE_SOURCE_TYPE in project mule by mulesoft.
the class SourceSchemaDelegate method registerSourceType.
private void registerSourceType(String name, SourceModel sourceModel, DslElementSyntax dslSyntax, boolean hasImplicitConfig) {
final ExtensionType sourceType = createExecutableType(name, MULE_ABSTRACT_MESSAGE_SOURCE_TYPE, dslSyntax, hasImplicitConfig);
initialiseSequence(sourceType);
ExplicitGroup sequence = sourceType.getSequence();
builder.addInfrastructureParameters(sourceType, sourceModel, sequence);
List<ParameterModel> visitedParameters = new LinkedList<>();
sourceModel.getParameterGroupModels().forEach(group -> {
registerParameterGroup(sourceType, group);
visitedParameters.addAll(group.getParameterModels());
});
sourceModel.getSuccessCallback().map(ParameterizedModel::getParameterGroupModels).ifPresent(groups -> groups.forEach(group -> registerCallbackParameters(sourceType, visitedParameters, group)));
sourceModel.getErrorCallback().map(ParameterizedModel::getParameterGroupModels).ifPresent(groups -> groups.forEach(group -> registerCallbackParameters(sourceType, visitedParameters, group)));
}
Aggregations