use of org.mule.runtime.dsl.api.component.ComponentBuildingDefinition in project mule by mulesoft.
the class CoreComponentBuildingDefinitionProvider method getTransformersBuildingDefinitions.
private List<ComponentBuildingDefinition> getTransformersBuildingDefinitions() {
List<ComponentBuildingDefinition> transformerComponentBuildingDefinitions = new ArrayList<>();
transformerComponentBuildingDefinitions.add(getCoreTransformerBaseBuilder(XmlEntityEncoder.class).withIdentifier("xml-entity-encoder-transformer").build());
transformerComponentBuildingDefinitions.add(getCoreTransformerBaseBuilder(XmlEntityDecoder.class).withIdentifier("xml-entity-decoder-transformer").build());
transformerComponentBuildingDefinitions.add(getCoreTransformerBaseBuilder(GZipCompressTransformer.class).withIdentifier("gzip-compress-transformer").build());
transformerComponentBuildingDefinitions.add(getCoreTransformerBaseBuilder(GZipUncompressTransformer.class).withIdentifier("gzip-uncompress-transformer").build());
KeyAttributeDefinitionPair strategyParameterDefinition = newBuilder().withKey("strategy").withAttributeDefinition(fromSimpleReferenceParameter("strategy-ref").build()).build();
transformerComponentBuildingDefinitions.add(getTransformerBaseBuilder(getEncryptionTransformerConfigurationFactory(EncryptionTransformer.class), EncryptionTransformer.class, strategyParameterDefinition).withIdentifier("encrypt-transformer").withNamespace(CORE_PREFIX).build());
transformerComponentBuildingDefinitions.add(getTransformerBaseBuilder(getEncryptionTransformerConfigurationFactory(DecryptionTransformer.class), DecryptionTransformer.class, strategyParameterDefinition).withIdentifier("decrypt-transformer").withNamespace(CORE_PREFIX).build());
transformerComponentBuildingDefinitions.add(getCoreTransformerBaseBuilder(ByteArrayToHexString.class).withIdentifier("byte-array-to-hex-string-transformer").build());
transformerComponentBuildingDefinitions.add(getCoreTransformerBaseBuilder(HexStringToByteArray.class).withIdentifier("hex-string-to-byte-array-transformer").build());
transformerComponentBuildingDefinitions.add(getCoreTransformerBaseBuilder(ByteArrayToObject.class).withIdentifier("byte-array-to-object-transformer").build());
transformerComponentBuildingDefinitions.add(getCoreTransformerBaseBuilder(ObjectToByteArray.class).withIdentifier("object-to-byte-array-transformer").build());
transformerComponentBuildingDefinitions.add(getCoreTransformerBaseBuilder(ObjectToString.class).withIdentifier("object-to-string-transformer").build());
transformerComponentBuildingDefinitions.add(getCoreTransformerBaseBuilder(ByteArrayToSerializable.class).withIdentifier("byte-array-to-serializable-transformer").build());
transformerComponentBuildingDefinitions.add(getCoreTransformerBaseBuilder(SerializableToByteArray.class).withIdentifier("serializable-to-byte-array-transformer").build());
transformerComponentBuildingDefinitions.add(getCoreTransformerBaseBuilder(ObjectToString.class).withIdentifier("byte-array-to-string-transformer").build());
transformerComponentBuildingDefinitions.add(getCoreTransformerBaseBuilder(ObjectToByteArray.class).withIdentifier("string-to-byte-array-transformer").build());
transformerComponentBuildingDefinitions.add(baseDefinition.withIdentifier("parse-template").withTypeDefinition(fromType(ParseTemplateProcessor.class)).withSetterParameterDefinition("content", fromChildConfiguration(String.class).withIdentifier("content").build()).withSetterParameterDefinition("target", fromSimpleParameter("target").build()).withSetterParameterDefinition("location", fromSimpleParameter("location").build()).withSetterParameterDefinition("targetValue", fromSimpleParameter("targetValue").build()).build());
transformerComponentBuildingDefinitions.add(getCoreMuleMessageTransformerBaseBuilder().withIdentifier("content").withTypeDefinition(fromType(String.class)).build());
transformerComponentBuildingDefinitions.add(getCoreTransformerBaseBuilder(AutoTransformer.class).withIdentifier("auto-transformer").build());
transformerComponentBuildingDefinitions.add(getCoreMuleMessageTransformerBaseBuilder().withIdentifier("append-string-transformer").withTypeDefinition(fromType(StringAppendTransformer.class)).withSetterParameterDefinition("message", fromSimpleParameter("message").build()).build());
transformerComponentBuildingDefinitions.add(getTransformerBaseBuilder(getCustomTransformerConfigurationFactory(), Transformer.class, newBuilder().withKey("class").withAttributeDefinition(fromSimpleParameter("class").build()).build()).withTypeDefinition(fromConfigurationAttribute("class")).withIdentifier("custom-transformer").withNamespace(CORE_PREFIX).build());
transformerComponentBuildingDefinitions.add(getTransformerBaseBuilder(getExpressionTransformerConfigurationFactory(), ExpressionTransformer.class, newBuilder().withKey("returnSourceIfNull").withAttributeDefinition(fromSimpleParameter("returnSourceIfNull").build()).build(), newBuilder().withKey("expression").withAttributeDefinition(fromSimpleParameter("expression").build()).build(), newBuilder().withKey("arguments").withAttributeDefinition(fromChildCollectionConfiguration(ExpressionArgument.class).build()).build()).withIdentifier("expression-transformer").withNamespace(CORE_PREFIX).withTypeDefinition(fromType(ExpressionTransformer.class)).build());
transformerComponentBuildingDefinitions.add(baseDefinition.withObjectFactoryType(ConfigurableObjectFactory.class).withIdentifier("return-argument").withTypeDefinition(fromType(ExpressionArgument.class)).withSetterParameterDefinition("factory", fromFixedValue(getExpressionArgumentConfigurationFactory()).build()).withSetterParameterDefinition("parameters", fromMultipleDefinitions(newBuilder().withKey("optional").withAttributeDefinition(fromSimpleParameter("optional").build()).build(), newBuilder().withKey("expression").withAttributeDefinition(fromSimpleParameter("expression").build()).build(), newBuilder().withKey("muleContext").withAttributeDefinition(fromReferenceObject(MuleContext.class).build()).build()).build()).build());
transformerComponentBuildingDefinitions.add(baseDefinition.withObjectFactoryType(ConfigurableObjectFactory.class).withIdentifier("bean-property").withTypeDefinition(fromType(ExpressionArgument.class)).withSetterParameterDefinition("factory", fromFixedValue(getExpressionArgumentConfigurationFactory()).build()).withSetterParameterDefinition("parameters", fromMultipleDefinitions(newBuilder().withKey("optional").withAttributeDefinition(fromSimpleParameter("optional").build()).build(), newBuilder().withKey("expression").withAttributeDefinition(fromSimpleParameter("expression").build()).build(), newBuilder().withKey("muleContext").withAttributeDefinition(fromReferenceObject(MuleContext.class).build()).build(), newBuilder().withKey("propertyName").withAttributeDefinition(fromSimpleParameter("property-name").build()).build()).build()).build());
return transformerComponentBuildingDefinitions;
}
use of org.mule.runtime.dsl.api.component.ComponentBuildingDefinition in project mule by mulesoft.
the class CoreComponentBuildingDefinitionProvider method getIdempotentValidatorsDefinitions.
private List<ComponentBuildingDefinition> getIdempotentValidatorsDefinitions() {
List<ComponentBuildingDefinition> definitions = new LinkedList<>();
ComponentBuildingDefinition.Builder baseIdempotentMessageFilterDefinition = baseDefinition.withSetterParameterDefinition("idExpression", fromSimpleParameter("idExpression").build()).withSetterParameterDefinition("valueExpression", fromSimpleParameter("valueExpression").build()).withSetterParameterDefinition("storePrefix", fromSimpleParameter("storePrefix").build()).withSetterParameterDefinition("throwOnUnaccepted", fromSimpleParameter("throwOnUnaccepted").build()).withSetterParameterDefinition("objectStore", fromSimpleReferenceParameter("objectStore").build()).withSetterParameterDefinition("unacceptedMessageProcessor", fromSimpleReferenceParameter("onUnaccepted").build()).withSetterParameterDefinition("privateObjectStore", fromChildConfiguration(ValueResolver.class).build());
definitions.add(baseIdempotentMessageFilterDefinition.withIdentifier("idempotent-message-validator").withTypeDefinition(fromType(IdempotentMessageValidator.class)).build());
return definitions;
}
use of org.mule.runtime.dsl.api.component.ComponentBuildingDefinition in project mule by mulesoft.
the class CoreComponentBuildingDefinitionProvider method getReconnectionDefinitions.
private List<ComponentBuildingDefinition> getReconnectionDefinitions() {
List<ComponentBuildingDefinition> buildingDefinitions = new ArrayList<>();
ComponentBuildingDefinition.Builder baseReconnectDefinition = baseDefinition.withTypeDefinition(fromType(RetryPolicyTemplate.class)).withObjectFactoryType(RetryPolicyTemplateObjectFactory.class).withSetterParameterDefinition("blocking", fromSimpleParameter("blocking").build()).withSetterParameterDefinition("frequency", fromSimpleParameter("frequency").build());
buildingDefinitions.add(baseReconnectDefinition.withIdentifier(RECONNECT_FOREVER_ELEMENT_IDENTIFIER).withSetterParameterDefinition("count", fromFixedValue(RETRY_COUNT_FOREVER).build()).build());
buildingDefinitions.add(baseReconnectDefinition.withIdentifier(RECONNECT_ELEMENT_IDENTIFIER).withSetterParameterDefinition("retryNotifier", fromChildConfiguration(RetryNotifier.class).build()).withSetterParameterDefinition("count", fromSimpleParameter("count").build()).build());
buildingDefinitions.add(baseDefinition.withIdentifier(RECONNECTION_ELEMENT_IDENTIFIER).withTypeDefinition(fromType(ReconnectionConfig.class)).withObjectFactoryType(ReconnectionConfigObjectFactory.class).withSetterParameterDefinition("failsDeployment", fromSimpleParameter("failsDeployment").build()).withSetterParameterDefinition("retryPolicyTemplate", fromChildConfiguration(RetryPolicyTemplate.class).build()).build());
return buildingDefinitions;
}
use of org.mule.runtime.dsl.api.component.ComponentBuildingDefinition in project mule by mulesoft.
the class CoreComponentBuildingDefinitionProvider method getComponentBuildingDefinitions.
@Override
public List<ComponentBuildingDefinition> getComponentBuildingDefinitions() {
LinkedList<ComponentBuildingDefinition> componentBuildingDefinitions = new LinkedList<>();
AttributeDefinition messageProcessorListAttributeDefinition = fromChildCollectionConfiguration(Processor.class).build();
ComponentBuildingDefinition.Builder onErrorBaseBuilder = baseDefinition.withSetterParameterDefinition(MESSAGE_PROCESSORS, messageProcessorListAttributeDefinition).withSetterParameterDefinition(WHEN, fromSimpleParameter(WHEN).build()).withSetterParameterDefinition(ERROR_TYPE, fromSimpleParameter(TYPE).build()).withSetterParameterDefinition(LOG_EXCEPTION, fromSimpleParameter(LOG_EXCEPTION).withDefaultValue("true").build());
componentBuildingDefinitions.add(baseDefinition.withIdentifier(ON_ERROR).withTypeDefinition(fromType(TemplateOnErrorHandler.class)).withObjectFactoryType(OnErrorFactoryBean.class).withConstructorParameterDefinition(fromSimpleReferenceParameter("ref").build()).build());
componentBuildingDefinitions.add(onErrorBaseBuilder.withIdentifier(ON_ERROR_CONTINUE).withTypeDefinition(fromType(OnErrorContinueHandler.class)).asPrototype().build());
componentBuildingDefinitions.add(onErrorBaseBuilder.withIdentifier(ON_ERROR_PROPAGATE).withTypeDefinition(fromType(OnErrorPropagateHandler.class)).asPrototype().build());
componentBuildingDefinitions.add(baseDefinition.withIdentifier(ERROR_HANDLER).withTypeDefinition(fromType(ErrorHandler.class)).withObjectFactoryType(ErrorHandlerFactoryBean.class).withSetterParameterDefinition("delegate", fromSimpleReferenceParameter("ref").build()).withSetterParameterDefinition(NAME, fromSimpleParameter(NAME).build()).withSetterParameterDefinition("exceptionListeners", fromChildCollectionConfiguration(FlowExceptionHandler.class).build()).asPrototype().build());
componentBuildingDefinitions.add(baseDefinition.withIdentifier(SET_PAYLOAD).withTypeDefinition(fromType(SetPayloadMessageProcessor.class)).withSetterParameterDefinition("value", fromSimpleParameter("value").build()).withSetterParameterDefinition("mimeType", fromSimpleParameter("mimeType").build()).withSetterParameterDefinition("encoding", fromSimpleParameter("encoding").build()).build());
componentBuildingDefinitions.add(baseDefinition.withIdentifier(LOGGER).withTypeDefinition(fromType(LoggerMessageProcessor.class)).withSetterParameterDefinition("message", fromSimpleParameter("message").build()).withSetterParameterDefinition("category", fromSimpleParameter("category").build()).withSetterParameterDefinition("level", fromSimpleParameter("level").build()).build());
componentBuildingDefinitions.add(getSetVariablePropertyBaseBuilder(getAddVariableTransformerInstanceFactory(AddFlowVariableProcessor.class), AddFlowVariableProcessor.class, newBuilder().withKey("identifier").withAttributeDefinition(fromSimpleParameter("variableName").build()).build(), newBuilder().withKey("value").withAttributeDefinition(fromSimpleParameter("value").build()).build()).withIdentifier("set-variable").withTypeDefinition(fromType(AddFlowVariableProcessor.class)).build());
componentBuildingDefinitions.add(getCoreMuleMessageTransformerBaseBuilder().withIdentifier("remove-variable").withTypeDefinition(fromType(RemoveFlowVariableProcessor.class)).withSetterParameterDefinition("identifier", fromSimpleParameter("variableName").build()).build());
componentBuildingDefinitions.add(baseDefinition.withIdentifier("global-property").withTypeDefinition(fromType(String.class)).withConstructorParameterDefinition(fromSimpleParameter("value").build()).build());
componentBuildingDefinitions.add(baseDefinition.withIdentifier(TRANSFORMER).withTypeDefinition(fromType(Transformer.class)).build());
componentBuildingDefinitions.add(baseDefinition.withIdentifier(CUSTOM_PROCESSOR).withTypeDefinition(fromConfigurationAttribute(CLASS_ATTRIBUTE).checkingThatIsClassOrInheritsFrom(MESSAGE_PROCESSOR_CLASS)).asPrototype().build());
componentBuildingDefinitions.add(baseDefinition.withIdentifier(PROCESSOR_CHAIN).withTypeDefinition(fromType(AnnotatedProcessor.class)).withObjectFactoryType(MessageProcessorChainObjectFactory.class).withSetterParameterDefinition(MESSAGE_PROCESSORS, fromChildCollectionConfiguration(Processor.class).build()).asPrototype().build());
componentBuildingDefinitions.add(baseDefinition.withIdentifier(ROUTE).withTypeDefinition(fromType(MessageProcessorChain.class)).withObjectFactoryType(MessageProcessorChainFactoryBean.class).withSetterParameterDefinition(MESSAGE_PROCESSORS, fromChildCollectionConfiguration(Processor.class).build()).asPrototype().build());
addModuleOperationChainParser(componentBuildingDefinitions);
componentBuildingDefinitions.add(baseDefinition.withIdentifier(SUB_FLOW).withTypeDefinition(fromType(MessageProcessorChain.class)).withObjectFactoryType(SubflowMessageProcessorChainFactoryBean.class).withSetterParameterDefinition(MESSAGE_PROCESSORS, fromChildCollectionConfiguration(Processor.class).build()).withSetterParameterDefinition(NAME, fromSimpleParameter(NAME).build()).asPrototype().build());
componentBuildingDefinitions.add(baseDefinition.withIdentifier(RESPONSE).withTypeDefinition(fromType(ResponseMessageProcessorAdapter.class)).withObjectFactoryType(ResponseMessageProcessorsFactoryBean.class).withSetterParameterDefinition(MESSAGE_PROCESSORS, fromChildCollectionConfiguration(Processor.class).build()).build());
componentBuildingDefinitions.add(baseDefinition.withIdentifier(FLOW).withTypeDefinition(fromType(Flow.class)).withObjectFactoryType(DefaultFlowFactoryBean.class).withSetterParameterDefinition(NAME, fromSimpleParameter(NAME).build()).withSetterParameterDefinition("muleContext", fromReferenceObject(MuleContext.class).build()).withSetterParameterDefinition("initialState", fromSimpleParameter("initialState").withDefaultValue(INITIAL_STATE_STARTED).build()).withSetterParameterDefinition("messageSource", fromChildConfiguration(MessageSource.class).build()).withSetterParameterDefinition(MESSAGE_PROCESSORS, fromChildCollectionConfiguration(Processor.class).build()).withSetterParameterDefinition(EXCEPTION_LISTENER_ATTRIBUTE, fromChildConfiguration(FlowExceptionHandler.class).build()).withSetterParameterDefinition("maxConcurrency", fromSimpleParameter("maxConcurrency").build()).build());
Builder processorRefBuilder = baseDefinition.withTypeDefinition(fromType(AnnotatedProcessor.class)).withObjectFactoryType(FlowRefFactoryBean.class).withSetterParameterDefinition("muleContext", fromReferenceObject(MuleContext.class).build());
componentBuildingDefinitions.add(processorRefBuilder.withIdentifier(FLOW_REF).withSetterParameterDefinition("name", fromSimpleParameter("name").build()).withSetterParameterDefinition("target", fromSimpleParameter("target").build()).withSetterParameterDefinition("targetValue", fromSimpleParameter("targetValue").withDefaultValue("#[payload]").build()).build());
componentBuildingDefinitions.add(processorRefBuilder.withIdentifier(PROCESSOR).withSetterParameterDefinition("name", fromSimpleParameter("ref").build()).build());
componentBuildingDefinitions.add(baseDefinition.withIdentifier(COLLECT_LIST).withTypeDefinition(fromType(CollectListForkJoinStrategyFactory.class)).build());
componentBuildingDefinitions.add(baseDefinition.withIdentifier(SCATTER_GATHER).withTypeDefinition(fromType(ScatterGatherRouter.class)).withSetterParameterDefinition("timeout", fromSimpleParameter("timeout").build()).withSetterParameterDefinition("maxConcurrency", fromSimpleParameter("maxConcurrency").build()).withSetterParameterDefinition("target", fromSimpleParameter("target").build()).withSetterParameterDefinition("targetValue", fromSimpleParameter("targetValue").withDefaultValue("#[payload]").build()).withSetterParameterDefinition(ROUTES, fromChildCollectionConfiguration(MessageProcessorChain.class).build()).withSetterParameterDefinition(FORK_JOIN_STRATEGY, fromChildConfiguration(ForkJoinStrategyFactory.class).build()).asScope().build());
componentBuildingDefinitions.add(baseDefinition.withIdentifier(SPLIT_AGGREGATE).withTypeDefinition(fromType(SplitAggregateScope.class)).withSetterParameterDefinition("collectionExpression", fromChildConfiguration(String.class).withIdentifier("collection").build()).withSetterParameterDefinition("timeout", fromSimpleParameter("timeout").build()).withSetterParameterDefinition("maxConcurrency", fromSimpleParameter("maxConcurrency").build()).withSetterParameterDefinition("target", fromSimpleParameter("target").build()).withSetterParameterDefinition("targetValue", fromSimpleParameter("targetValue").withDefaultValue("#[payload]").build()).withSetterParameterDefinition(MESSAGE_PROCESSORS, fromChildCollectionConfiguration(Processor.class).build()).asScope().build());
componentBuildingDefinitions.add(baseDefinition.withIdentifier("collection").withTypeDefinition(fromType(String.class)).build());
componentBuildingDefinitions.add(baseDefinition.withIdentifier(ENRICHER).withObjectFactoryType(MessageEnricherObjectFactory.class).withTypeDefinition(fromType(MessageEnricher.class)).withSetterParameterDefinition("messageProcessor", fromChildConfiguration(Processor.class).build()).withSetterParameterDefinition("enrichExpressionPairs", fromChildCollectionConfiguration(MessageEnricher.EnrichExpressionPair.class).build()).withSetterParameterDefinition("source", fromSimpleParameter("source").build()).withSetterParameterDefinition("target", fromSimpleParameter("target").build()).build());
componentBuildingDefinitions.add(baseDefinition.withIdentifier("enrich").withTypeDefinition(fromType(MessageEnricher.EnrichExpressionPair.class)).withConstructorParameterDefinition(fromSimpleParameter("source").build()).withConstructorParameterDefinition(fromSimpleParameter("target").build()).build());
componentBuildingDefinitions.add(baseDefinition.withIdentifier(ASYNC).withTypeDefinition(fromType(AsyncDelegateMessageProcessor.class)).withObjectFactoryType(AsyncMessageProcessorsFactoryBean.class).withSetterParameterDefinition(MESSAGE_PROCESSORS, fromChildCollectionConfiguration(Processor.class).build()).withSetterParameterDefinition(NAME, fromSimpleParameter(NAME).build()).withSetterParameterDefinition("maxConcurrency", fromSimpleParameter("maxConcurrency").build()).build());
// TODO MULE-12726 Remove TryProcessorFactoryBean
componentBuildingDefinitions.add(baseDefinition.withIdentifier(TRY).withTypeDefinition(fromType(TryScope.class)).withObjectFactoryType(TryProcessorFactoryBean.class).withSetterParameterDefinition("exceptionListener", fromChildConfiguration(FlowExceptionHandler.class).build()).withSetterParameterDefinition(MESSAGE_PROCESSORS, fromChildCollectionConfiguration(Processor.class).build()).withSetterParameterDefinition(TX_ACTION, fromSimpleParameter(TX_ACTION).withDefaultValue(ACTION_INDIFFERENT_STRING).build()).withSetterParameterDefinition(TX_TYPE, fromSimpleParameter(TX_TYPE, getTransactionTypeConverter()).withDefaultValue(LOCAL.name()).build()).build());
componentBuildingDefinitions.add(baseDefinition.withIdentifier(UNTIL_SUCCESSFUL).withTypeDefinition(fromType(UntilSuccessful.class)).withSetterParameterDefinition("maxRetries", fromSimpleParameter("maxRetries").withDefaultValue(5).build()).withSetterParameterDefinition("millisBetweenRetries", fromSimpleParameter("millisBetweenRetries").withDefaultValue(60000).build()).withSetterParameterDefinition(MESSAGE_PROCESSORS, fromChildCollectionConfiguration(Processor.class).build()).build());
componentBuildingDefinitions.add(baseDefinition.withIdentifier(FOREACH).withTypeDefinition(fromType(Foreach.class)).withSetterParameterDefinition("collectionExpression", fromSimpleParameter("collection").build()).withSetterParameterDefinition("batchSize", fromSimpleParameter("batchSize").build()).withSetterParameterDefinition("rootMessageVariableName", fromSimpleParameter("rootMessageVariableName").build()).withSetterParameterDefinition("counterVariableName", fromSimpleParameter("counterVariableName").build()).withSetterParameterDefinition(MESSAGE_PROCESSORS, fromChildCollectionConfiguration(Processor.class).build()).build());
componentBuildingDefinitions.add(baseDefinition.withIdentifier(FIRST_SUCCESSFUL).withTypeDefinition(fromType(FirstSuccessful.class)).withSetterParameterDefinition(MESSAGE_PROCESSORS, fromChildCollectionConfiguration(MessageProcessorChain.class).build()).build());
componentBuildingDefinitions.add(baseDefinition.withIdentifier(ROUND_ROBIN).withTypeDefinition(fromType(RoundRobin.class)).withSetterParameterDefinition(MESSAGE_PROCESSORS, fromChildCollectionConfiguration(MessageProcessorChain.class).build()).build());
componentBuildingDefinitions.add(baseDefinition.withIdentifier(CHOICE).withTypeDefinition(fromType(ChoiceRouter.class)).withObjectFactoryType(ChoiceRouterObjectFactory.class).withSetterParameterDefinition("routes", fromChildCollectionConfiguration(MessageProcessorExpressionPair.class).build()).withSetterParameterDefinition("defaultRoute", fromChildConfiguration(MessageProcessorExpressionPair.class).build()).build());
componentBuildingDefinitions.add(baseDefinition.withIdentifier(WHEN).withTypeDefinition(fromType(MessageProcessorExpressionPair.class)).withObjectFactoryType(MessageProcessorFilterPairFactoryBean.class).withSetterParameterDefinition(MESSAGE_PROCESSORS, fromChildCollectionConfiguration(Processor.class).build()).withSetterParameterDefinition("expression", fromSimpleParameter("expression").withDefaultValue("true").build()).build());
componentBuildingDefinitions.add(baseDefinition.withIdentifier(OTHERWISE).withTypeDefinition(fromType(MessageProcessorExpressionPair.class)).withObjectFactoryType(MessageProcessorFilterPairFactoryBean.class).withSetterParameterDefinition(MESSAGE_PROCESSORS, fromChildCollectionConfiguration(Processor.class).build()).withSetterParameterDefinition("expression", fromFixedValue("true").build()).build());
componentBuildingDefinitions.add(baseDefinition.withIdentifier("message-chunk-splitter").withTypeDefinition(fromType(MessageChunkSplitter.class)).withSetterParameterDefinition("messageSize", fromSimpleParameter("messageSize").build()).build());
ComponentBuildingDefinition.Builder baseAggregatorDefinition = baseDefinition.withSetterParameterDefinition("timeout", fromSimpleParameter("timeout").build()).withSetterParameterDefinition("failOnTimeout", fromSimpleParameter("failOnTimeout").build()).withSetterParameterDefinition("processedGroupsObjectStore", fromSimpleReferenceParameter("processed-groups-object-store").build()).withSetterParameterDefinition("eventGroupsObjectStore", fromSimpleReferenceParameter("event-groups-object-store").build()).withSetterParameterDefinition("persistentStores", fromSimpleParameter("persistentStores").build()).withSetterParameterDefinition("storePrefix", fromSimpleParameter("storePrefix").build());
componentBuildingDefinitions.add(baseAggregatorDefinition.withIdentifier("message-chunk-aggregator").withTypeDefinition(fromType(MessageChunkAggregator.class)).build());
componentBuildingDefinitions.add(baseAggregatorDefinition.withIdentifier("collection-aggregator").withTypeDefinition(fromType(SimpleCollectionAggregator.class)).build());
componentBuildingDefinitions.add(baseAggregatorDefinition.withIdentifier("resequencer").withTypeDefinition(fromType(Resequencer.class)).build());
componentBuildingDefinitions.add(baseDefinition.withIdentifier("splitter").withTypeDefinition(fromType(Splitter.class)).withSetterParameterDefinition("expression", fromSimpleParameter("expression").build()).withSetterParameterDefinition("filterOnErrorType", fromSimpleParameter("filterOnErrorType").build()).build());
componentBuildingDefinitions.add(baseDefinition.withIdentifier(REQUEST_REPLY).withTypeDefinition(fromType(SimpleAsyncRequestReplyRequester.class)).withSetterParameterDefinition("messageProcessor", fromChildConfiguration(Processor.class).build()).withSetterParameterDefinition("messageSource", fromChildConfiguration(MessageSource.class).build()).withSetterParameterDefinition("timeout", fromSimpleParameter("timeout").build()).withSetterParameterDefinition("storePrefix", fromSimpleParameter("storePrefix").build()).build());
componentBuildingDefinitions.add(baseDefinition.withIdentifier(SCHEDULER).withTypeDefinition(fromType(DefaultSchedulerMessageSource.class)).withObjectFactoryType(SchedulingMessageSourceFactoryBean.class).withSetterParameterDefinition("disallowConcurrentExecution", fromSimpleParameter("disallowConcurrentExecution").withDefaultValue(true).build()).withSetterParameterDefinition("scheduler", fromChildConfiguration(PeriodicScheduler.class).withWrapperIdentifier(SCHEDULING_STRATEGY_ELEMENT_IDENTIFIER).build()).build());
componentBuildingDefinitions.add(baseDefinition.withIdentifier(FIXED_FREQUENCY_STRATEGY_ELEMENT_IDENTIFIER).withTypeDefinition(fromType(FixedFrequencyScheduler.class)).withSetterParameterDefinition("frequency", fromSimpleParameter("frequency").build()).withSetterParameterDefinition("startDelay", fromSimpleParameter("startDelay").build()).withSetterParameterDefinition("timeUnit", fromSimpleParameter("timeUnit").build()).build());
componentBuildingDefinitions.add(baseDefinition.withIdentifier(CRON_STRATEGY_ELEMENT_IDENTIFIER).withTypeDefinition(fromType(CronScheduler.class)).withSetterParameterDefinition("expression", fromSimpleParameter("expression").build()).withSetterParameterDefinition("timeZone", fromSimpleParameter("timeZone").build()).build());
componentBuildingDefinitions.add(baseDefinition.withIdentifier("configuration").withTypeDefinition(fromType(MuleConfiguration.class)).withObjectFactoryType(MuleConfigurationConfigurator.class).withSetterParameterDefinition("defaultErrorHandlerName", fromSimpleParameter("defaultErrorHandler-ref").build()).withSetterParameterDefinition("defaultResponseTimeout", fromSimpleParameter("defaultResponseTimeout").build()).withSetterParameterDefinition("maxQueueTransactionFilesSize", fromSimpleParameter("maxQueueTransactionFilesSize").build()).withSetterParameterDefinition("defaultTransactionTimeout", fromSimpleParameter("defaultTransactionTimeout").build()).withSetterParameterDefinition("shutdownTimeout", fromSimpleParameter("shutdownTimeout").build()).withSetterParameterDefinition("defaultTransactionTimeout", fromSimpleParameter("defaultTransactionTimeout").build()).withSetterParameterDefinition("useExtendedTransformations", fromSimpleParameter("useExtendedTransformations").build()).withSetterParameterDefinition("flowEndingWithOneWayEndpointReturnsNull", fromSimpleParameter("flowEndingWithOneWayEndpointReturnsNull").build()).withSetterParameterDefinition("enricherPropagatesSessionVariableChanges", fromSimpleParameter("enricherPropagatesSessionVariableChanges").build()).withSetterParameterDefinition("defaultObjectSerializer", fromSimpleReferenceParameter("defaultObjectSerializer-ref").build()).withSetterParameterDefinition("extensions", fromChildCollectionConfiguration(ConfigurationExtension.class).build()).withSetterParameterDefinition("dynamicConfigExpiration", fromChildConfiguration(DynamicConfigExpiration.class).build()).withSetterParameterDefinition("extensions", fromChildCollectionConfiguration(Object.class).build()).alwaysEnabled(true).withRegistrationName(OBJECT_MULE_CONFIGURATION).build());
componentBuildingDefinitions.add(baseDefinition.withIdentifier("dynamic-config-expiration").withTypeDefinition(fromType(DynamicConfigExpiration.class)).withObjectFactoryType(DynamicConfigExpirationObjectFactory.class).withConstructorParameterDefinition(fromSimpleParameter("frequency").withDefaultValue(DYNAMIC_CONFIG_EXPIRATION_FREQUENCY.getTime()).build()).withConstructorParameterDefinition(fromSimpleParameter("timeUnit", value -> TimeUnit.valueOf((String) value)).withDefaultValue(DYNAMIC_CONFIG_EXPIRATION_FREQUENCY.getUnit()).build()).withSetterParameterDefinition("expirationPolicy", fromChildConfiguration(ExpirationPolicy.class).build()).build());
componentBuildingDefinitions.add(baseDefinition.withIdentifier("expiration-policy").withTypeDefinition(fromType(ExpirationPolicy.class)).withObjectFactoryType(ExpirationPolicyObjectFactory.class).withSetterParameterDefinition("maxIdleTime", fromSimpleParameter("maxIdleTime").withDefaultValue(DYNAMIC_CONFIG_EXPIRATION_FREQUENCY.getTime()).build()).withSetterParameterDefinition("timeUnit", fromSimpleParameter("timeUnit", value -> TimeUnit.valueOf((String) value)).withDefaultValue(DYNAMIC_CONFIG_EXPIRATION_FREQUENCY.getUnit()).build()).build());
componentBuildingDefinitions.add(baseDefinition.withIdentifier("notifications").withTypeDefinition(fromType(ServerNotificationManagerConfigurator.class)).withSetterParameterDefinition("notificationDynamic", fromSimpleParameter("dynamic").build()).withSetterParameterDefinition("enabledNotifications", fromChildCollectionConfiguration(NotificationConfig.EnabledNotificationConfig.class).build()).withSetterParameterDefinition("disabledNotifications", fromChildCollectionConfiguration(NotificationConfig.DisabledNotificationConfig.class).build()).withSetterParameterDefinition("notificationListeners", fromChildCollectionConfiguration(ListenerSubscriptionPair.class).build()).build());
ComponentBuildingDefinition.Builder baseNotificationDefinition = baseDefinition.withSetterParameterDefinition("interfaceName", fromSimpleParameter("interface").build()).withSetterParameterDefinition("eventName", fromSimpleParameter("event").build()).withSetterParameterDefinition("interfaceClass", fromSimpleParameter("interface-class").build()).withSetterParameterDefinition("eventClass", fromSimpleParameter("event-class").build());
componentBuildingDefinitions.add(baseNotificationDefinition.withTypeDefinition(fromType(NotificationConfig.EnabledNotificationConfig.class)).withIdentifier("notification").build());
componentBuildingDefinitions.add(baseNotificationDefinition.withTypeDefinition(fromType(NotificationConfig.DisabledNotificationConfig.class)).withIdentifier("disable-notification").build());
componentBuildingDefinitions.add(baseDefinition.withIdentifier("notification-listener").withTypeDefinition(fromType(ListenerSubscriptionPair.class)).withConstructorParameterDefinition(fromSimpleReferenceParameter("ref").build()).withConstructorParameterDefinition(fromSimpleParameter("subscription", getNotificationSubscriptionConverter()).withDefaultValue(ANY_SELECTOR_STRING).build()).build());
componentBuildingDefinitions.add(baseDefinition.withIdentifier("username-password-filter").withTypeDefinition(fromType(UsernamePasswordAuthenticationFilter.class)).withSetterParameterDefinition("username", fromSimpleParameter("username").build()).withSetterParameterDefinition("password", fromSimpleParameter("password").build()).withIgnoredConfigurationParameter(NAME).build());
componentBuildingDefinitions.add(baseDefinition.withIdentifier("custom-security-filter").withTypeDefinition(fromType(Processor.class)).withObjectFactoryType(CustomSecurityFilterObjectFactory.class).withConstructorParameterDefinition(fromSimpleReferenceParameter("ref").build()).withIgnoredConfigurationParameter(NAME).build());
componentBuildingDefinitions.add(baseDefinition.withIdentifier("encryption-security-filter").withTypeDefinition(fromType(MuleEncryptionEndpointSecurityFilter.class)).withConstructorParameterDefinition(fromSimpleReferenceParameter("strategy-ref").build()).withIgnoredConfigurationParameter(NAME).build());
componentBuildingDefinitions.add(baseDefinition.withIdentifier("security-manager").withTypeDefinition(fromType(SecurityManager.class)).withObjectFactoryType(MuleSecurityManagerConfigurator.class).withSetterParameterDefinition("muleContext", fromReferenceObject(MuleContext.class).build()).withSetterParameterDefinition("name", fromSimpleParameter("name").build()).withSetterParameterDefinition("providers", fromChildCollectionConfiguration(SecurityProvider.class).build()).withSetterParameterDefinition("encryptionStrategies", fromChildCollectionConfiguration(EncryptionStrategy.class).build()).build());
componentBuildingDefinitions.add(baseDefinition.withIdentifier("custom-security-provider").withTypeDefinition(fromType(CustomSecurityProviderDelegate.class)).withConstructorParameterDefinition(fromSimpleReferenceParameter("provider-ref").build()).withConstructorParameterDefinition(fromSimpleParameter("name").build()).build());
componentBuildingDefinitions.add(baseDefinition.withIdentifier("custom-encryption-strategy").withTypeDefinition(fromType(CustomEncryptionStrategyDelegate.class)).withConstructorParameterDefinition(fromSimpleReferenceParameter("strategy-ref").build()).withConstructorParameterDefinition(fromSimpleParameter("name").build()).build());
componentBuildingDefinitions.add(baseDefinition.withIdentifier("secret-key-encryption-strategy").withTypeDefinition(fromType(SecretKeyEncryptionStrategy.class)).withSetterParameterDefinition("name", fromSimpleParameter("name").build()).withSetterParameterDefinition("key", fromSimpleParameter("key").build()).withSetterParameterDefinition("keyFactory", fromSimpleReferenceParameter("keyFactory-ref").build()).build());
componentBuildingDefinitions.add(baseDefinition.withIdentifier("password-encryption-strategy").withTypeDefinition(fromType(PasswordBasedEncryptionStrategy.class)).withSetterParameterDefinition("name", fromSimpleParameter("name").build()).withSetterParameterDefinition("iterationCount", fromSimpleParameter("iterationCount").build()).withSetterParameterDefinition("password", fromSimpleParameter("password").build()).withSetterParameterDefinition("salt", fromSimpleParameter("salt").build()).build());
componentBuildingDefinitions.add(baseDefinition.withIdentifier(REDELIVERY_POLICY_ELEMENT_IDENTIFIER).withTypeDefinition(fromType(IdempotentRedeliveryPolicy.class)).withSetterParameterDefinition("maxRedeliveryCount", fromSimpleParameter("maxRedeliveryCount").build()).withSetterParameterDefinition("useSecureHash", fromSimpleParameter("useSecureHash").build()).withSetterParameterDefinition("messageDigestAlgorithm", fromSimpleParameter("messageDigestAlgorithm").build()).withSetterParameterDefinition("idExpression", fromSimpleParameter("idExpression").build()).withSetterParameterDefinition("objectStore", fromSimpleReferenceParameter("objectStore").build()).withSetterParameterDefinition("privateObjectStore", fromChildConfiguration(ValueResolver.class).build()).build());
componentBuildingDefinitions.add(baseDefinition.withIdentifier("pooling-profile").withTypeDefinition(fromType(PoolingProfile.class)).withSetterParameterDefinition("maxActive", fromSimpleParameter("maxActive").build()).withSetterParameterDefinition("maxIdle", fromSimpleParameter("maxIdle").build()).withSetterParameterDefinition("exhaustedAction", fromSimpleParameter("exhaustedAction", PoolingProfile.POOL_EXHAUSTED_ACTIONS::get).build()).withSetterParameterDefinition("maxWait", fromSimpleParameter("maxWait").build()).withSetterParameterDefinition("evictionCheckIntervalMillis", fromSimpleParameter("evictionCheckIntervalMillis").build()).withSetterParameterDefinition("minEvictionMillis", fromSimpleParameter("minEvictionMillis").build()).withSetterParameterDefinition("disabled", fromSimpleParameter("disabled").build()).withSetterParameterDefinition("initialisationPolicy", fromSimpleParameter("initialisationPolicy", PoolingProfile.POOL_INITIALISATION_POLICIES::get).build()).build());
componentBuildingDefinitions.add(baseDefinition.withIdentifier("expression-component").withTypeDefinition(fromType(ExpressionLanguageComponent.class)).withSetterParameterDefinition("expression", fromTextContent().build()).withSetterParameterDefinition("expressionFile", fromSimpleParameter("file").build()).build());
componentBuildingDefinitions.add(baseDefinition.withIdentifier("invoke").withTypeDefinition(fromType(InvokerMessageProcessor.class)).withSetterParameterDefinition("name", fromSimpleParameter("name").build()).withSetterParameterDefinition("methodName", fromSimpleParameter("method").build()).withSetterParameterDefinition("argumentExpressionsString", fromSimpleParameter("methodArguments").build()).withSetterParameterDefinition("object", fromSimpleReferenceParameter("object-ref").build()).build());
componentBuildingDefinitions.add(baseDefinition.withIdentifier("expression-language").withTypeDefinition(fromType(MVELExpressionLanguage.class)).withObjectFactoryType(MVELExpressionLanguageObjectFactory.class).withSetterParameterDefinition("autoResolveVariables", fromSimpleParameter("autoResolveVariables").build()).withSetterParameterDefinition("globalFunctions", fromChildConfiguration(MVELGlobalFunctionsConfig.class).build()).withSetterParameterDefinition("imports", fromChildCollectionConfiguration(ImportEntry.class).build()).withSetterParameterDefinition("aliases", fromChildCollectionConfiguration(AliasEntry.class).build()).build());
componentBuildingDefinitions.add(baseDefinition.withIdentifier("import").withTypeDefinition(fromType(ImportEntry.class)).withSetterParameterDefinition("key", fromSimpleParameter("name").build()).withSetterParameterDefinition("value", fromSimpleParameter("class", stringToClassConverter()).build()).build());
componentBuildingDefinitions.add(baseDefinition.withIdentifier("alias").withTypeDefinition(fromType(AliasEntry.class)).withSetterParameterDefinition("key", fromSimpleParameter("name").build()).withSetterParameterDefinition("value", fromSimpleParameter("expression").build()).build());
componentBuildingDefinitions.add(baseDefinition.withIdentifier("global-functions").withTypeDefinition(fromType(MVELGlobalFunctionsConfig.class)).withSetterParameterDefinition("file", fromSimpleParameter("file").build()).withSetterParameterDefinition("inlineScript", fromTextContent().build()).build());
componentBuildingDefinitions.addAll(getTransformersBuildingDefinitions());
componentBuildingDefinitions.add(baseDefinition.withIdentifier(POOLING_PROFILE_ELEMENT_IDENTIFIER).withTypeDefinition(fromType(PoolingProfile.class)).withConstructorParameterDefinition(fromSimpleParameter("maxActive").withDefaultValue(DEFAULT_MAX_POOL_ACTIVE).build()).withConstructorParameterDefinition(fromSimpleParameter("maxIdle").withDefaultValue(DEFAULT_MAX_POOL_IDLE).build()).withConstructorParameterDefinition(fromSimpleParameter("maxWait", value -> Long.valueOf((String) value)).withDefaultValue(valueOf(DEFAULT_MAX_POOL_WAIT)).build()).withConstructorParameterDefinition(fromSimpleParameter("exhaustedAction", POOL_EXHAUSTED_ACTIONS::get).withDefaultValue(valueOf(DEFAULT_POOL_EXHAUSTED_ACTION)).build()).withConstructorParameterDefinition(fromSimpleParameter("initialisationPolicy", POOL_INITIALISATION_POLICIES::get).withDefaultValue(valueOf(DEFAULT_POOL_INITIALISATION_POLICY)).build()).withSetterParameterDefinition("disabled", fromSimpleParameter("disabled").build()).build());
componentBuildingDefinitions.add(baseDefinition.withIdentifier(RAISE_ERROR).withTypeDefinition(fromType(RaiseErrorProcessor.class)).withSetterParameterDefinition("type", fromSimpleParameter("type").build()).withSetterParameterDefinition("description", fromSimpleParameter("description").build()).build());
componentBuildingDefinitions.addAll(getStreamingDefinitions());
componentBuildingDefinitions.addAll(getIdempotentValidatorsDefinitions());
componentBuildingDefinitions.addAll(getReconnectionDefinitions());
componentBuildingDefinitions.addAll(getTransactionDefinitions());
return componentBuildingDefinitions;
}
Aggregations