private DisplayModel getDisplayModel(ComponentModel componentModel) { final DisplayModel.DisplayModelBuilder displayModelBuilder = DisplayModel.builder(); displayModelBuilder.displayName(componentModel.getParameters().get(DISPLAY_NAME_ATTRIBUTE)); displayModelBuilder.summary(componentModel.getParameters().get(SUMMARY_ATTRIBUTE)); displayModelBuilder.example(componentModel.getParameters().get(EXAMPLE_ATTRIBUTE)); return displayModelBuilder.build(); }
.ifPresent(displayName -> declarer.withDisplayModel(DisplayModel.builder().displayName(displayName.value()).build()));
.withLayout(getLayout(4)) .withDisplayModel(DisplayModel.builder() .displayName(HEADERS_DISPLAY_NAME) .summary("The XML headers to include in the SOAP message.") .build()); .withLayout(LayoutModel.builder().order(2).tabName(TRANSPORT).build()) .withDisplayModel(DisplayModel.builder() .displayName(HEADERS_DISPLAY_NAME) .summary("The headers to set in the transport configuration.") .build());
.ifPresent(displayName -> declarer.withDisplayModel(DisplayModel.builder().displayName(displayName.value()).build()));
.describedAs(TARGET_VALUE_PARAMETER_DESCRIPTION) .withRole(BEHAVIOUR) .withDisplayModel(DisplayModel.builder().displayName(TARGET_VALUE_PARAMETER_DISPLAY_NAME).build()) .withLayout(LayoutModel.builder().tabName(ADVANCED_TAB).build()) .withModelProperty(new TargetModelProperty());
.displayName(displayName) .summary(summary) .example(example)
.displayName(displayName) .summary(summary) .example(example)
/** * Declares a new connection provider for a configuration given a {@link SoapServiceProviderWrapper} declaration. * * @param configDeclarer the configuration declarer that will own the provider * @param provider a {@link SoapServiceProviderWrapper} that describes the {@link SoapServiceProvider} Type. * @param hasCustomTransports if declares custom transport or not. */ public void declare(ConfigurationDeclarer configDeclarer, SoapServiceProviderWrapper provider, boolean hasCustomTransports) { String description = provider.getDescription(); // Declares the Service Provider as a Connection Provider. ConnectionProviderDeclarer providerDeclarer = configDeclarer.withConnectionProvider(provider.getAlias()) .describedAs(description) .withModelProperty(new ConnectionTypeModelProperty(ForwardingSoapClient.class)) //TODO - MULE-14311 - Make loader work in compile time .withModelProperty(new ImplementingTypeModelProperty(provider.getDeclaringClass().get())) .withConnectionManagementType(POOLING) .supportsConnectivityTesting(provider.supportsConnectivityTesting()); ParameterDeclarationContext context = new ParameterDeclarationContext("Service Provider", providerDeclarer.getDeclaration()); parametersLoader.declare(providerDeclarer, provider.getParameters(), context); if (hasCustomTransports) { providerDeclarer.onParameterGroup(TRANSPORT_GROUP) .withRequiredParameter(TRANSPORT_PARAM) .withDisplayModel(DisplayModel.builder().displayName(TRANSPORT_GROUP).build()) .ofType(typeLoader.load(MessageDispatcherProvider.class)) .withLayout(LayoutModel.builder().order(1).tabName(TRANSPORT).build()) .withExpressionSupport(NOT_SUPPORTED); } }