From ba417de68037eb69c9f63f30a7de985bdfe77f76 Mon Sep 17 00:00:00 2001 From: Artem Bilan Date: Mon, 22 May 2023 11:19:13 -0400 Subject: [PATCH] Remove deprecations from previous versions (#8628) --- .../context/IntegrationObjectSupport.java | 12 - .../dsl/BaseIntegrationFlowDefinition.java | 286 ----------------- .../dsl/IntegrationComponentSpec.java | 10 - .../integration/dsl/IntegrationFlows.java | 289 ------------------ .../integration/dsl/PollerFactory.java | 62 +--- .../integration/dsl/Pollers.java | 70 +---- .../integration/dsl/RouterSpec.java | 16 - .../transformer/AvroTestClass1.java | 4 +- .../transformer/AvroTestClass2.java | 4 +- .../transformer/proto/TestClass1.java | 3 +- .../transformer/proto/TestClass2.java | 3 +- .../ip/dsl/AbstractConnectionFactorySpec.java | 13 +- .../dsl/TcpClientConnectionFactorySpec.java | 28 +- .../ip/dsl/TcpOutboundGatewaySpec.java | 26 -- .../dsl/TcpServerConnectionFactorySpec.java | 26 +- .../jdbc/config/spring-integration-jdbc.xsd | 25 +- .../xml/KafkaInboundChannelAdapterParser.java | 14 +- .../kafka/config/spring-integration-kafka.xsd | 54 ---- ...stractMqttMessageDrivenChannelAdapter.java | 12 - .../security/channel/ChannelAccessPolicy.java | 40 --- .../security/channel/ChannelInvocation.java | 87 ------ .../channel/ChannelSecurityInterceptor.java | 89 ------ .../ChannelSecurityMetadataSource.java | 110 ------- .../channel/DefaultChannelAccessPolicy.java | 127 -------- .../security/channel/SecuredChannel.java | 52 ---- ...lSecurityInterceptorBeanPostProcessor.java | 119 -------- .../IntegrationSecurityNamespaceHandler.java | 36 --- .../config/SecuredChannelsParser.java | 90 ------ ...tyIntegrationConfigurationInitializer.java | 151 --------- .../security/config/package-info.java | 4 - .../main/resources/META-INF/spring.factories | 2 - .../main/resources/META-INF/spring.handlers | 1 - .../main/resources/META-INF/spring.schemas | 24 -- .../main/resources/META-INF/spring.tooling | 4 - .../config/spring-integration-security.gif | Bin 561 -> 0 bytes .../config/spring-integration-security.xsd | 56 ---- src/reference/asciidoc/groovy-dsl.adoc | 2 +- 37 files changed, 22 insertions(+), 1929 deletions(-) delete mode 100644 spring-integration-core/src/main/java/org/springframework/integration/dsl/IntegrationFlows.java delete mode 100644 spring-integration-security/src/main/java/org/springframework/integration/security/channel/ChannelAccessPolicy.java delete mode 100644 spring-integration-security/src/main/java/org/springframework/integration/security/channel/ChannelInvocation.java delete mode 100644 spring-integration-security/src/main/java/org/springframework/integration/security/channel/ChannelSecurityInterceptor.java delete mode 100644 spring-integration-security/src/main/java/org/springframework/integration/security/channel/ChannelSecurityMetadataSource.java delete mode 100644 spring-integration-security/src/main/java/org/springframework/integration/security/channel/DefaultChannelAccessPolicy.java delete mode 100644 spring-integration-security/src/main/java/org/springframework/integration/security/channel/SecuredChannel.java delete mode 100644 spring-integration-security/src/main/java/org/springframework/integration/security/config/ChannelSecurityInterceptorBeanPostProcessor.java delete mode 100644 spring-integration-security/src/main/java/org/springframework/integration/security/config/IntegrationSecurityNamespaceHandler.java delete mode 100644 spring-integration-security/src/main/java/org/springframework/integration/security/config/SecuredChannelsParser.java delete mode 100644 spring-integration-security/src/main/java/org/springframework/integration/security/config/SecurityIntegrationConfigurationInitializer.java delete mode 100644 spring-integration-security/src/main/java/org/springframework/integration/security/config/package-info.java delete mode 100644 spring-integration-security/src/main/resources/META-INF/spring.factories delete mode 100644 spring-integration-security/src/main/resources/META-INF/spring.handlers delete mode 100644 spring-integration-security/src/main/resources/META-INF/spring.schemas delete mode 100644 spring-integration-security/src/main/resources/META-INF/spring.tooling delete mode 100644 spring-integration-security/src/main/resources/org/springframework/integration/security/config/spring-integration-security.gif delete mode 100644 spring-integration-security/src/main/resources/org/springframework/integration/security/config/spring-integration-security.xsd diff --git a/spring-integration-core/src/main/java/org/springframework/integration/context/IntegrationObjectSupport.java b/spring-integration-core/src/main/java/org/springframework/integration/context/IntegrationObjectSupport.java index 10ec021d7e5..f587156513e 100644 --- a/spring-integration-core/src/main/java/org/springframework/integration/context/IntegrationObjectSupport.java +++ b/spring-integration-core/src/main/java/org/springframework/integration/context/IntegrationObjectSupport.java @@ -306,18 +306,6 @@ public void setMessageBuilderFactory(MessageBuilderFactory messageBuilderFactory this.messageBuilderFactory = messageBuilderFactory; } - /** - * @param key Integration property. - * @param tClass the class to convert a value of Integration property. - * @param The expected type of the property. - * @return the value of the Integration property converted to the provide type. - * @deprecated in favor of {@link #getIntegrationProperties()} - */ - @Deprecated(since = "6.0") - protected T getIntegrationProperty(String key, Class tClass) { - return this.defaultConversionService.convert(this.integrationProperties.toProperties().getProperty(key), tClass); - } - @Override public String toString() { return (this.beanName != null) ? getBeanDescription() : super.toString(); diff --git a/spring-integration-core/src/main/java/org/springframework/integration/dsl/BaseIntegrationFlowDefinition.java b/spring-integration-core/src/main/java/org/springframework/integration/dsl/BaseIntegrationFlowDefinition.java index abd762cc622..14a85c3caa4 100644 --- a/spring-integration-core/src/main/java/org/springframework/integration/dsl/BaseIntegrationFlowDefinition.java +++ b/spring-integration-core/src/main/java/org/springframework/integration/dsl/BaseIntegrationFlowDefinition.java @@ -2401,292 +2401,6 @@ public B log(LoggingHandler.Level level, @Nullable String category, @Nullable Ex return wireTap(loggerChannel); } - /** - * Populate a {@link WireTap} for the {@link #currentMessageChannel} - * with the {@link LoggingHandler} subscriber for the {@code INFO} - * logging level and {@code org.springframework.integration.handler.LoggingHandler} - * as a default logging category. - *

The full request {@link Message} will be logged. - *

A {@link #bridge()} is added after this operator to make the flow reply-producing - * if the {@code replyChannel} header is present. - *

This operator can be used only in the end of flow. - * @return an {@link IntegrationFlow} instance based on this builder. - * @deprecated since 6.0 in favor of {@link #log} in the end of flow. - * @see #log() - * @see #bridge() - */ - @Deprecated - public IntegrationFlow logAndReply() { - return logAndReply(LoggingHandler.Level.INFO); - } - - /** - * Populate a {@link WireTap} for the {@link #currentMessageChannel} - * with the {@link LoggingHandler} subscriber for provided {@link LoggingHandler.Level} - * logging level and {@code org.springframework.integration.handler.LoggingHandler} - * as a default logging category. - *

The full request {@link Message} will be logged. - *

A {@link #bridge()} is added after this operator to make the flow reply-producing - * if the {@code replyChannel} header is present. - *

This operator can be used only in the end of flow. - * @param level the {@link LoggingHandler.Level}. - * @return an {@link IntegrationFlow} instance based on this builder. - * @deprecated since 6.0 in favor of {@link #log} in the end of flow. - * @see #log() - * @see #bridge() - */ - @Deprecated - public IntegrationFlow logAndReply(LoggingHandler.Level level) { - return logAndReply(level, (String) null); - } - - /** - * Populate a {@link WireTap} for the {@link #currentMessageChannel} - * with the {@link LoggingHandler} subscriber for the provided logging category - * and {@code INFO} logging level. - *

The full request {@link Message} will be logged. - *

A {@link #bridge()} is added after this operator to make the flow reply-producing - * if the {@code replyChannel} header is present. - *

This operator can be used only in the end of flow. - * @param category the logging category to use. - * @return an {@link IntegrationFlow} instance based on this builder. - * @deprecated since 6.0 in favor of {@link #log} in the end of flow. - * @see #log() - * @see #bridge() - */ - @Deprecated - public IntegrationFlow logAndReply(String category) { - return logAndReply(LoggingHandler.Level.INFO, category); - } - - /** - * Populate a {@link WireTap} for the {@link #currentMessageChannel} - * with the {@link LoggingHandler} subscriber for the provided - * {@link LoggingHandler.Level} logging level and logging category. - *

The full request {@link Message} will be logged. - *

A {@link #bridge()} is added after this operator to make the flow reply-producing - * if the {@code replyChannel} header is present. - *

This operator can be used only in the end of flow. - * @param level the {@link LoggingHandler.Level}. - * @param category the logging category to use. - * @return an {@link IntegrationFlow} instance based on this builder. - * @deprecated since 6.0 in favor of {@link #log} in the end of flow. - * @see #log() - * @see #bridge() - */ - @Deprecated - public IntegrationFlow logAndReply(LoggingHandler.Level level, @Nullable String category) { - return logAndReply(level, category, (Expression) null); - } - - /** - * Populate a {@link WireTap} for the {@link #currentMessageChannel} - * with the {@link LoggingHandler} subscriber for the provided - * {@link LoggingHandler.Level} logging level, logging category - * and SpEL expression for the log message. - *

A {@link #bridge()} is added after this operator to make the flow reply-producing - * if the {@code replyChannel} header is present. - *

This operator can be used only in the end of flow. - * @param level the {@link LoggingHandler.Level}. - * @param category the logging category. - * @param logExpression the SpEL expression to evaluate logger message at runtime - * against the request {@link Message}. - * @return an {@link IntegrationFlow} instance based on this builder. - * @deprecated since 6.0 in favor of {@link #log} in the end of flow. - * @see #log() - * @see #bridge() - */ - @Deprecated - public IntegrationFlow logAndReply(LoggingHandler.Level level, String category, String logExpression) { - Assert.hasText(logExpression, "'logExpression' must not be empty"); - return logAndReply(level, category, PARSER.parseExpression(logExpression)); - } - - /** - * Populate a {@link WireTap} for the {@link #currentMessageChannel} - * with the {@link LoggingHandler} subscriber for the {@code INFO} logging level, - * the {@code org.springframework.integration.handler.LoggingHandler} - * as a default logging category and {@link Function} for the log message. - *

A {@link #bridge()} is added after this operator to make the flow reply-producing - * if the {@code replyChannel} header is present. - *

This operator can be used only in the end of flow. - * @param function the function to evaluate logger message at runtime - * @param

the expected payload type. - * against the request {@link Message}. - * @return an {@link IntegrationFlow} instance based on this builder. - * @deprecated since 6.0 in favor of {@link #log} in the end of flow. - * @see #log() - * @see #bridge() - */ - @Deprecated - public

IntegrationFlow logAndReply(Function, Object> function) { - Assert.notNull(function, FUNCTION_MUST_NOT_BE_NULL); - return logAndReply(new FunctionExpression<>(function)); - } - - /** - * Populate a {@link WireTap} for the {@link #currentMessageChannel} - * with the {@link LoggingHandler} subscriber for the {@code INFO} logging level, - * the {@code org.springframework.integration.handler.LoggingHandler} - * as a default logging category and SpEL expression to evaluate - * logger message at runtime against the request {@link Message}. - *

A {@link #bridge()} is added after this operator to make the flow reply-producing - * if the {@code replyChannel} header is present. - *

This operator can be used only in the end of flow. - * @param logExpression the {@link Expression} to evaluate logger message at runtime - * against the request {@link Message}. - * @return an {@link IntegrationFlow} instance based on this builder. - * @deprecated since 6.0 in favor of {@link #log} in the end of flow. - * @see #log() - * @see #bridge() - */ - @Deprecated - public IntegrationFlow logAndReply(Expression logExpression) { - return logAndReply(LoggingHandler.Level.INFO, logExpression); - } - - /** - * Populate a {@link WireTap} for the {@link #currentMessageChannel} - * with the {@link LoggingHandler} subscriber for the provided - * {@link LoggingHandler.Level} logging level, - * the {@code org.springframework.integration.handler.LoggingHandler} - * as a default logging category and SpEL expression to evaluate - * logger message at runtime against the request {@link Message}. - *

A {@link #bridge()} is added after this operator to make the flow reply-producing - * if the {@code replyChannel} header is present. - *

This operator can be used only in the end of flow. - * @param level the {@link LoggingHandler.Level}. - * @param logExpression the {@link Expression} to evaluate logger message at runtime - * against the request {@link Message}. - * @return an {@link IntegrationFlow} instance based on this builder. - * @deprecated since 6.0 in favor of {@link #log} in the end of flow. - * @see #log() - * @see #bridge() - */ - @Deprecated - public IntegrationFlow logAndReply(LoggingHandler.Level level, Expression logExpression) { - return logAndReply(level, null, logExpression); - } - - /** - * Populate a {@link WireTap} for the {@link #currentMessageChannel} - * with the {@link LoggingHandler} subscriber for the {@code INFO} - * {@link LoggingHandler.Level} logging level, - * the provided logging category and SpEL expression to evaluate - * logger message at runtime against the request {@link Message}. - *

A {@link #bridge()} is added after this operator to make the flow reply-producing - * if the {@code replyChannel} header is present. - *

This operator can be used only in the end of flow. - * @param category the logging category. - * @param logExpression the {@link Expression} to evaluate logger message at runtime - * against the request {@link Message}. - * @return an {@link IntegrationFlow} instance based on this builder. - * @deprecated since 6.0 in favor of {@link #log} in the end of flow. - * @see #log() - * @see #bridge() - */ - @Deprecated - public IntegrationFlow logAndReply(String category, Expression logExpression) { - return logAndReply(LoggingHandler.Level.INFO, category, logExpression); - } - - /** - * Populate a {@link WireTap} for the {@link #currentMessageChannel} - * with the {@link LoggingHandler} subscriber for the provided - * {@link LoggingHandler.Level} logging level, - * the {@code org.springframework.integration.handler.LoggingHandler} - * as a default logging category and {@link Function} for the log message. - *

A {@link #bridge()} is added after this operator to make the flow reply-producing - * if the {@code replyChannel} header is present. - *

This operator can be used only in the end of flow. - * @param level the {@link LoggingHandler.Level}. - * @param function the function to evaluate logger message at runtime - * @param

the expected payload type. - * against the request {@link Message}. - * @return an {@link IntegrationFlow} instance based on this builder. - * @deprecated since 6.0 in favor of {@link #log} in the end of flow. - * @see #log() - * @see #bridge() - */ - @Deprecated - public

IntegrationFlow logAndReply(LoggingHandler.Level level, Function, Object> function) { - return logAndReply(level, null, function); - } - - /** - * Populate a {@link WireTap} for the {@link #currentMessageChannel} - * with the {@link LoggingHandler} subscriber for the provided - * {@link LoggingHandler.Level} logging level, - * the provided logging category and {@link Function} for the log message. - *

A {@link #bridge()} is added after this operator to make the flow reply-producing - * if the {@code replyChannel} header is present. - *

This operator can be used only in the end of flow. - * @param category the logging category. - * @param function the function to evaluate logger message at runtime - * @param

the expected payload type. - * against the request {@link Message}. - * @return an {@link IntegrationFlow} instance based on this builder. - * @deprecated since 6.0 in favor of {@link #log} in the end of flow. - * @see #log() - * @see #bridge() - */ - @Deprecated - public

IntegrationFlow logAndReply(String category, Function, Object> function) { - return logAndReply(LoggingHandler.Level.INFO, category, function); - } - - /** - * Populate a {@link WireTap} for the {@link #currentMessageChannel} - * with the {@link LoggingHandler} subscriber for the provided - * {@link LoggingHandler.Level} logging level, logging category - * and {@link Function} for the log message. - *

A {@link #bridge()} is added after this operator to make the flow reply-producing - * if the {@code replyChannel} header is present. - *

This operator can be used only in the end of flow. - * @param level the {@link LoggingHandler.Level}. - * @param category the logging category. - * @param function the function to evaluate logger message at runtime - * @param

the expected payload type. - * against the request {@link Message}. - * @return an {@link IntegrationFlow} instance based on this builder. - * @deprecated since 6.0 in favor of {@link #log} in the end of flow. - * @see #log() - * @see #bridge() - */ - @Deprecated - public

IntegrationFlow logAndReply(LoggingHandler.Level level, @Nullable String category, - Function, Object> function) { - - Assert.notNull(function, FUNCTION_MUST_NOT_BE_NULL); - return logAndReply(level, category, new FunctionExpression<>(function)); - } - - /** - * Populate a {@link WireTap} for the {@link #currentMessageChannel} - * with the {@link LoggingHandler} subscriber for the provided - * {@link LoggingHandler.Level} logging level, logging category - * and SpEL expression for the log message. - *

A {@link #bridge()} is added after this operator to make the flow reply-producing - * if the {@code replyChannel} header is present. - *

This operator can be used only in the end of flow. - * @param level the {@link LoggingHandler.Level}. - * @param category the logging category. - * @param logExpression the {@link Expression} to evaluate logger message at runtime - * against the request {@link Message}. - * @return an {@link IntegrationFlow} instance based on this builder. - * @deprecated since 6.0 in favor of {@link #log} in the end of flow. - * @see #log() - * @see #bridge() - */ - @Deprecated - public IntegrationFlow logAndReply(LoggingHandler.Level level, @Nullable String category, - @Nullable Expression logExpression) { - - return log(level, category, logExpression) - .bridge() - .get(); - } - /** * Populate a {@link ScatterGatherHandler} to the current integration flow position * based on the provided {@link MessageChannel} for scattering function diff --git a/spring-integration-core/src/main/java/org/springframework/integration/dsl/IntegrationComponentSpec.java b/spring-integration-core/src/main/java/org/springframework/integration/dsl/IntegrationComponentSpec.java index a7cb9fd638c..f5243d1ed8f 100644 --- a/spring-integration-core/src/main/java/org/springframework/integration/dsl/IntegrationComponentSpec.java +++ b/spring-integration-core/src/main/java/org/springframework/integration/dsl/IntegrationComponentSpec.java @@ -69,16 +69,6 @@ public final String getId() { return this.id; } - /** - * @return the configured component. - * @deprecated since 6.1 with no-op for end-user: - * the {@link #getObject()} is called by the framework at the appropriate phase. - */ - @Deprecated(since = "6.1", forRemoval = true) - public T get() { - return getObject(); - } - @Override public Class getObjectType() { return getObject().getClass(); diff --git a/spring-integration-core/src/main/java/org/springframework/integration/dsl/IntegrationFlows.java b/spring-integration-core/src/main/java/org/springframework/integration/dsl/IntegrationFlows.java deleted file mode 100644 index b4f07d1e9b1..00000000000 --- a/spring-integration-core/src/main/java/org/springframework/integration/dsl/IntegrationFlows.java +++ /dev/null @@ -1,289 +0,0 @@ -/* - * Copyright 2016-2022 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.integration.dsl; - -import java.util.function.Consumer; -import java.util.function.Supplier; - -import org.reactivestreams.Publisher; - -import org.springframework.integration.channel.DirectChannel; -import org.springframework.integration.channel.FluxMessageChannel; -import org.springframework.integration.core.MessageSource; -import org.springframework.integration.endpoint.MessageProducerSupport; -import org.springframework.integration.gateway.MessagingGatewaySupport; -import org.springframework.lang.Nullable; -import org.springframework.messaging.Message; -import org.springframework.messaging.MessageChannel; - -/** - * The central factory for fluent {@link IntegrationFlowBuilder} API. - * - * @author Artem Bilan - * @author Gary Russell - * @author Oleg Zhurakousky - * - * @since 5.0 - * - * @see org.springframework.integration.dsl.context.IntegrationFlowBeanPostProcessor - * - * @deprecated since version 6.0 in favor of fluent API methods straight from {@link IntegrationFlow} interface. - */ -@Deprecated(since = "6.0", forRemoval = true) -public final class IntegrationFlows { - - /** - * Populate the {@link MessageChannel} name to the new {@link IntegrationFlowBuilder} chain. - * The {@link org.springframework.integration.dsl.IntegrationFlow} {@code inputChannel}. - * @param messageChannelName the name of existing {@link MessageChannel} bean. - * The new {@link DirectChannel} bean will be created on context startup - * if there is no bean with this name. - * @return new {@link IntegrationFlowBuilder}. - */ - public static IntegrationFlowBuilder from(String messageChannelName) { - return IntegrationFlow.from(messageChannelName); - } - - /** - * Populate the {@link MessageChannel} name to the new {@link IntegrationFlowBuilder} chain. - * Typically for the {@link org.springframework.integration.channel.FixedSubscriberChannel} together - * with {@code fixedSubscriber = true}. - * The {@link org.springframework.integration.dsl.IntegrationFlow} {@code inputChannel}. - * @param messageChannelName the name for {@link DirectChannel} or - * {@link org.springframework.integration.channel.FixedSubscriberChannel} - * to be created on context startup, not reference. - * The {@link MessageChannel} depends on the {@code fixedSubscriber} boolean argument. - * @param fixedSubscriber the boolean flag to determine if result {@link MessageChannel} should - * be {@link DirectChannel}, if {@code false} or - * {@link org.springframework.integration.channel.FixedSubscriberChannel}, if {@code true}. - * @return new {@link IntegrationFlowBuilder}. - * @see DirectChannel - * @see org.springframework.integration.channel.FixedSubscriberChannel - */ - public static IntegrationFlowBuilder from(String messageChannelName, boolean fixedSubscriber) { - return IntegrationFlow.from(messageChannelName, fixedSubscriber); - } - - /** - * Populate the {@link MessageChannel} object to the - * {@link IntegrationFlowBuilder} chain using the fluent API from {@link MessageChannelSpec}. - * The {@link org.springframework.integration.dsl.IntegrationFlow} {@code inputChannel}. - * @param messageChannelSpec the MessageChannelSpec to populate {@link MessageChannel} instance. - * @return new {@link IntegrationFlowBuilder}. - * @see org.springframework.integration.dsl.MessageChannels - */ - public static IntegrationFlowBuilder from(MessageChannelSpec messageChannelSpec) { - return IntegrationFlow.from(messageChannelSpec); - } - - /** - * Populate the provided {@link MessageChannel} object to the {@link IntegrationFlowBuilder} chain. - * The {@link org.springframework.integration.dsl.IntegrationFlow} {@code inputChannel}. - * @param messageChannel the {@link MessageChannel} to populate. - * @return new {@link IntegrationFlowBuilder}. - */ - public static IntegrationFlowBuilder from(MessageChannel messageChannel) { - return IntegrationFlow.from(messageChannel); - } - - /** - * Populate the {@link MessageSource} object to the {@link IntegrationFlowBuilder} chain - * using the fluent API from the provided {@link MessageSourceSpec}. - * The {@link org.springframework.integration.dsl.IntegrationFlow} {@code startMessageSource}. - * @param messageSourceSpec the {@link MessageSourceSpec} to use. - * @return new {@link IntegrationFlowBuilder}. - * @see MessageSourceSpec and its implementations. - */ - public static IntegrationFlowBuilder from(MessageSourceSpec> messageSourceSpec) { - return IntegrationFlow.from(messageSourceSpec); - } - - /** - * Populate the {@link MessageSource} object to the {@link IntegrationFlowBuilder} chain - * using the fluent API from the provided {@link MessageSourceSpec}. - * The {@link org.springframework.integration.dsl.IntegrationFlow} {@code startMessageSource}. - * @param messageSourceSpec the {@link MessageSourceSpec} to use. - * @param endpointConfigurer the {@link Consumer} to provide more options for the - * {@link org.springframework.integration.config.SourcePollingChannelAdapterFactoryBean}. - * @return new {@link IntegrationFlowBuilder}. - * @see MessageSourceSpec - * @see SourcePollingChannelAdapterSpec - */ - public static IntegrationFlowBuilder from(MessageSourceSpec> messageSourceSpec, - Consumer endpointConfigurer) { - return IntegrationFlow.from(messageSourceSpec, endpointConfigurer); - } - - /** - * Provides {@link Supplier} as source of messages to the integration flow which will - * be triggered by the application context's default poller (which must be declared). - * @param messageSource the {@link Supplier} to populate. - * @param the supplier type. - * @return new {@link IntegrationFlowBuilder}. - * @see Supplier - */ - public static IntegrationFlowBuilder fromSupplier(Supplier messageSource) { - return IntegrationFlow.fromSupplier(messageSource); - } - - /** - * Provides {@link Supplier} as source of messages to the integration flow. - * which will be triggered by a provided - * {@link org.springframework.integration.endpoint.SourcePollingChannelAdapter}. - * @param messageSource the {@link Supplier} to populate. - * @param endpointConfigurer the {@link Consumer} to provide more options for the - * {@link org.springframework.integration.config.SourcePollingChannelAdapterFactoryBean}. - * @param the supplier type. - * @return new {@link IntegrationFlowBuilder}. - * @see Supplier - */ - public static IntegrationFlowBuilder fromSupplier(Supplier messageSource, - Consumer endpointConfigurer) { - return IntegrationFlow.fromSupplier(messageSource, endpointConfigurer); - } - - /** - * Populate the provided {@link MessageSource} object to the {@link IntegrationFlowBuilder} chain. - * The {@link org.springframework.integration.dsl.IntegrationFlow} {@code startMessageSource}. - * @param messageSource the {@link MessageSource} to populate. - * @return new {@link IntegrationFlowBuilder}. - * @see MessageSource - */ - public static IntegrationFlowBuilder from(MessageSource messageSource) { - return IntegrationFlow.from(messageSource); - } - - /** - * Populate the provided {@link MessageSource} object to the {@link IntegrationFlowBuilder} chain. - * The {@link org.springframework.integration.dsl.IntegrationFlow} {@code startMessageSource}. - * In addition use {@link SourcePollingChannelAdapterSpec} to provide options for the underlying - * {@link org.springframework.integration.endpoint.SourcePollingChannelAdapter} endpoint. - * @param messageSource the {@link MessageSource} to populate. - * @param endpointConfigurer the {@link Consumer} to provide more options for the - * {@link org.springframework.integration.config.SourcePollingChannelAdapterFactoryBean}. - * @return new {@link IntegrationFlowBuilder}. - * @see MessageSource - * @see SourcePollingChannelAdapterSpec - */ - public static IntegrationFlowBuilder from(MessageSource messageSource, - @Nullable Consumer endpointConfigurer) { - return IntegrationFlow.from(messageSource, endpointConfigurer); - } - - /** - * Populate the {@link MessageProducerSupport} object to the {@link IntegrationFlowBuilder} chain - * using the fluent API from the {@link MessageProducerSpec}. - * The {@link org.springframework.integration.dsl.IntegrationFlow} {@code startMessageProducer}. - * @param messageProducerSpec the {@link MessageProducerSpec} to use. - * @return new {@link IntegrationFlowBuilder}. - * @see MessageProducerSpec - */ - public static IntegrationFlowBuilder from(MessageProducerSpec messageProducerSpec) { - return IntegrationFlow.from(messageProducerSpec); - } - - /** - * Populate the provided {@link MessageProducerSupport} object to the {@link IntegrationFlowBuilder} chain. - * The {@link org.springframework.integration.dsl.IntegrationFlow} {@code startMessageProducer}. - * @param messageProducer the {@link MessageProducerSupport} to populate. - * @return new {@link IntegrationFlowBuilder}. - */ - public static IntegrationFlowBuilder from(MessageProducerSupport messageProducer) { - return IntegrationFlow.from(messageProducer); - } - - /** - * Populate the {@link MessagingGatewaySupport} object to the {@link IntegrationFlowBuilder} chain - * using the fluent API from the {@link MessagingGatewaySpec}. - * The {@link org.springframework.integration.dsl.IntegrationFlow} {@code startMessagingGateway}. - * @param inboundGatewaySpec the {@link MessagingGatewaySpec} to use. - * @return new {@link IntegrationFlowBuilder}. - */ - public static IntegrationFlowBuilder from(MessagingGatewaySpec inboundGatewaySpec) { - return IntegrationFlow.from(inboundGatewaySpec); - } - - /** - * Populate the provided {@link MessagingGatewaySupport} object to the {@link IntegrationFlowBuilder} chain. - * The {@link org.springframework.integration.dsl.IntegrationFlow} {@code startMessageProducer}. - * @param inboundGateway the {@link MessagingGatewaySupport} to populate. - * @return new {@link IntegrationFlowBuilder}. - */ - public static IntegrationFlowBuilder from(MessagingGatewaySupport inboundGateway) { - return IntegrationFlow.from(inboundGateway); - } - - /** - * Populate the {@link MessageChannel} to the new {@link IntegrationFlowBuilder} - * chain, which becomes as a {@code requestChannel} for the Messaging Gateway(s) built - * on the provided service interface. - *

A gateway proxy bean for provided service interface is registered under a name - * from the - * {@link org.springframework.integration.annotation.MessagingGateway#name()} if present - * or from the {@link IntegrationFlow} bean name plus {@code .gateway} suffix. - * @param serviceInterface the service interface class with an optional - * {@link org.springframework.integration.annotation.MessagingGateway} annotation. - * @return new {@link IntegrationFlowBuilder}. - */ - public static IntegrationFlowBuilder from(Class serviceInterface) { - return IntegrationFlow.from(serviceInterface); - } - - /** - * Populate the {@link MessageChannel} to the new {@link IntegrationFlowBuilder} - * chain, which becomes as a {@code requestChannel} for the Messaging Gateway(s) built - * on the provided service interface. - *

A gateway proxy bean for provided service interface is based on the options - * configured via provided {@link Consumer}. - * @param serviceInterface the service interface class with an optional - * {@link org.springframework.integration.annotation.MessagingGateway} annotation. - * @param endpointConfigurer the {@link Consumer} to configure proxy bean for gateway. - * @return new {@link IntegrationFlowBuilder}. - * @since 5.2 - */ - public static IntegrationFlowBuilder from(Class serviceInterface, - @Nullable Consumer endpointConfigurer) { - return IntegrationFlow.from(serviceInterface, endpointConfigurer); - } - - - /** - * Populate a {@link FluxMessageChannel} to the {@link IntegrationFlowBuilder} chain - * and subscribe it to the provided {@link Publisher}. - * @param publisher the {@link Publisher} to subscribe to. - * @return new {@link IntegrationFlowBuilder}. - */ - @SuppressWarnings("overloads") - public static IntegrationFlowBuilder from(Publisher> publisher) { - return IntegrationFlow.from(publisher); - } - - /** - * Start the flow with a composition from the {@link IntegrationFlow}. - * @param other the {@link IntegrationFlow} from which to compose. - * @return new {@link IntegrationFlowBuilder}. - * @since 5.5.4 - */ - @SuppressWarnings("overloads") - public static IntegrationFlowBuilder from(IntegrationFlow other) { - return IntegrationFlow.from(other); - } - - private IntegrationFlows() { - } - -} diff --git a/spring-integration-core/src/main/java/org/springframework/integration/dsl/PollerFactory.java b/spring-integration-core/src/main/java/org/springframework/integration/dsl/PollerFactory.java index 0151ce4571e..d7cd41211ff 100644 --- a/spring-integration-core/src/main/java/org/springframework/integration/dsl/PollerFactory.java +++ b/spring-integration-core/src/main/java/org/springframework/integration/dsl/PollerFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2022 the original author or authors. + * Copyright 2016-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,9 +17,7 @@ package org.springframework.integration.dsl; import java.time.Duration; -import java.time.temporal.ChronoUnit; import java.util.TimeZone; -import java.util.concurrent.TimeUnit; import org.springframework.scheduling.Trigger; @@ -79,19 +77,6 @@ public PollerSpec fixedRate(long period) { return Pollers.fixedRate(period); } - /** - * Create a {@link PollerSpec} based on the provided fixed rate period and {@link TimeUnit}. - * @param period the fixed rate period to use. - * @param timeUnit the {@link TimeUnit} to use. - * @return the {@link PollerSpec} - * @deprecated since 6.1 in favor of {@link #fixedRate(Duration)} - * @see Pollers#fixedRate(Duration) - */ - @Deprecated(forRemoval = true) - public PollerSpec fixedRate(long period, TimeUnit timeUnit) { - return Pollers.fixedRate(Duration.of(period, timeUnit.toChronoUnit())); - } - /** * Create a {@link PollerSpec} based on the provided fixed rate period. * @param period the fixed rate period to use. @@ -126,51 +111,6 @@ public static PollerSpec fixedRate(Duration period, Duration initialDelay) { return Pollers.fixedRate(period, initialDelay); } - /** - * Create a {@link PollerSpec} based on the provided fixed rate period and {@link TimeUnit} - * with an initial delay. - * @param period the fixed rate period to use. - * @param timeUnit the {@link TimeUnit} to use. - * @param initialDelay the initial delay to use. - * @return the {@link PollerSpec} - * @deprecated since 6.1 in favor of {@link #fixedRate(Duration, Duration)} - * @see Pollers#fixedRate(Duration, Duration) - */ - @Deprecated(forRemoval = true) - public PollerSpec fixedRate(long period, TimeUnit timeUnit, long initialDelay) { - ChronoUnit chronoUnit = timeUnit.toChronoUnit(); - return Pollers.fixedRate(Duration.of(period, chronoUnit), Duration.of(initialDelay, chronoUnit)); - } - - /** - * Create a {@link PollerSpec} based on the provided fixed delay period and {@link TimeUnit} - * with an initial delay. - * @param period the fixed delay period to use. - * @param timeUnit the {@link TimeUnit} to use. - * @param initialDelay the initial delay to use. - * @return the {@link PollerSpec} - * @deprecated since 6.1 in favor of {@link #fixedDelay(Duration, Duration)} - * @see Pollers#fixedDelay(Duration, Duration) - */ - @Deprecated(forRemoval = true) - public PollerSpec fixedDelay(long period, TimeUnit timeUnit, long initialDelay) { - ChronoUnit chronoUnit = timeUnit.toChronoUnit(); - return Pollers.fixedDelay(Duration.of(period, chronoUnit), Duration.of(initialDelay, chronoUnit)); - } - - /** - * Create a {@link PollerSpec} based on the provided fixed delay period and {@link TimeUnit}. - * @param period the fixed delay period to use. - * @param timeUnit the {@link TimeUnit} to use. - * @return the {@link PollerSpec} - * @deprecated since 6.1 in favor of {@link #fixedDelay(Duration)} - * @see Pollers#fixedDelay(Duration) - */ - @Deprecated(forRemoval = true) - public PollerSpec fixedDelay(long period, TimeUnit timeUnit) { - return Pollers.fixedDelay(Duration.of(period, timeUnit.toChronoUnit())); - } - /** * Create a {@link PollerSpec} based on the provided fixed delay period and initial delay. * @param period the fixed delay period (in milliseconds) to use. diff --git a/spring-integration-core/src/main/java/org/springframework/integration/dsl/Pollers.java b/spring-integration-core/src/main/java/org/springframework/integration/dsl/Pollers.java index ac4befe78b9..7133e3aca9c 100644 --- a/spring-integration-core/src/main/java/org/springframework/integration/dsl/Pollers.java +++ b/spring-integration-core/src/main/java/org/springframework/integration/dsl/Pollers.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2022 the original author or authors. + * Copyright 2016-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,9 +17,7 @@ package org.springframework.integration.dsl; import java.time.Duration; -import java.time.temporal.ChronoUnit; import java.util.TimeZone; -import java.util.concurrent.TimeUnit; import org.springframework.lang.Nullable; import org.springframework.scheduling.Trigger; @@ -62,21 +60,6 @@ public static PollerSpec fixedRate(Duration period) { return periodicTrigger(period, true, null); } - /** - * Create a {@link PollerSpec} based on the provided fixed rate period. - * The "fixed rate" means that periodic interval should be measured between the - * scheduled start times rather than between actual completion times. - * @param period the fixed rate period to use. - * @param timeUnit the {@link TimeUnit} to use. - * @return the {@link PollerSpec} - * @deprecated since 6.0 in favor of {@link #fixedRate(Duration)} - * @see PeriodicTrigger - */ - @Deprecated(forRemoval = true) - public static PollerSpec fixedRate(long period, TimeUnit timeUnit) { - return fixedRate(Duration.of(period, timeUnit.toChronoUnit())); - } - /** * Create a {@link PollerSpec} based on the provided fixed rate period * and initial delay. @@ -105,24 +88,6 @@ public static PollerSpec fixedRate(long period, long initialDelay) { return fixedRate(Duration.ofMillis(period), Duration.ofMillis(initialDelay)); } - /** - * Create a {@link PollerSpec} based on the provided fixed rate period - * and initial delay. - * The "fixed rate" means that periodic interval should be measured between the - * scheduled start times rather than between actual completion times. - * @param period the fixed rate period to use. - * @param timeUnit the {@link TimeUnit} to use. - * @param initialDelay the initial delay to use. - * @return the {@link PollerSpec} - * @deprecated since 6.0 in favor of {@link #fixedRate(Duration, Duration)} - * @see PeriodicTrigger - */ - @Deprecated(forRemoval = true) - public static PollerSpec fixedRate(long period, TimeUnit timeUnit, long initialDelay) { - ChronoUnit chronoUnit = timeUnit.toChronoUnit(); - return fixedRate(Duration.of(period, chronoUnit), Duration.of(initialDelay, chronoUnit)); - } - /** * Create a {@link PollerSpec} based on the provided fixed delay period. * The "fixed delay" means that periodic interval should be measured between the @@ -160,21 +125,6 @@ public static PollerSpec fixedDelay(Duration period, Duration initialDelay) { return periodicTrigger(period, false, initialDelay); } - /** - * Create a {@link PollerSpec} based on the provided fixed delay period. - * The "fixed delay" means that periodic interval should be measured between the - * scheduled tasks actual completion times. - * @param period the fixed delay period to use. - * @param timeUnit the {@link TimeUnit} to use. - * @return the {@link PollerSpec} - * @deprecated since 6.0 in favor of {@link #fixedDelay(Duration)} - * @see PeriodicTrigger - */ - @Deprecated(forRemoval = true) - public static PollerSpec fixedDelay(long period, TimeUnit timeUnit) { - return fixedDelay(Duration.of(period, timeUnit.toChronoUnit())); - } - /** * Create a {@link PollerSpec} based on the provided fixed delay period and initial delay. * The "fixed delay" means that periodic interval should be measured between the @@ -188,24 +138,6 @@ public static PollerSpec fixedDelay(long period, long initialDelay) { return fixedDelay(Duration.ofMillis(period), Duration.ofMillis(initialDelay)); } - /** - * Create a {@link PollerSpec} based on the provided fixed delay period - * and initial delay. - * The "fixed delay" means that periodic interval should be measured between the - * scheduled tasks actual completion times. - * @param period the fixed delay period to use. - * @param timeUnit the {@link TimeUnit} to use. - * @param initialDelay the initial delay to use. - * @return the {@link PollerSpec} - * @deprecated since 6.0 in favor of {@link #fixedDelay(Duration, Duration)} - * @see PeriodicTrigger - */ - @Deprecated(forRemoval = true) - public static PollerSpec fixedDelay(long period, TimeUnit timeUnit, long initialDelay) { - ChronoUnit chronoUnit = timeUnit.toChronoUnit(); - return fixedDelay(Duration.of(period, chronoUnit), Duration.of(initialDelay, chronoUnit)); - } - private static PollerSpec periodicTrigger(Duration period, boolean fixedRate, @Nullable Duration initialDelay) { PeriodicTrigger periodicTrigger = new PeriodicTrigger(period); periodicTrigger.setFixedRate(fixedRate); diff --git a/spring-integration-core/src/main/java/org/springframework/integration/dsl/RouterSpec.java b/spring-integration-core/src/main/java/org/springframework/integration/dsl/RouterSpec.java index 5d0a93e0165..8225ff4485c 100644 --- a/spring-integration-core/src/main/java/org/springframework/integration/dsl/RouterSpec.java +++ b/spring-integration-core/src/main/java/org/springframework/integration/dsl/RouterSpec.java @@ -109,22 +109,6 @@ public RouterSpec suffix(String suffix) { return _this(); } - /** - * By default, if a resolved channel key does not exist in the channel map, the key - * itself is used as the channel name, which we will attempt to resolve to a channel. - * Invoke this method to disable this feature. This could be useful to prevent - * malicious actors from generating a message that could cause the message to be - * routed to an unexpected channel, such as one upstream of the router, which would - * cause a stack overflow. - * @return the router spec. - * @since 5.2 - * @deprecated since 6.0 in favor of {@link #channelKeyFallback(boolean)} - */ - @Deprecated(since = "6.0", forRemoval = true) - public RouterSpec noChannelKeyFallback() { - return channelKeyFallback(false); - } - /** * When true (default), if a resolved channel key does not exist in the channel map, * the key itself is used as the channel name, which we will attempt to resolve to a diff --git a/spring-integration-core/src/test/java/org/springframework/integration/transformer/AvroTestClass1.java b/spring-integration-core/src/test/java/org/springframework/integration/transformer/AvroTestClass1.java index c573f9c30f8..4962a7b958e 100644 --- a/spring-integration-core/src/test/java/org/springframework/integration/transformer/AvroTestClass1.java +++ b/spring-integration-core/src/test/java/org/springframework/integration/transformer/AvroTestClass1.java @@ -55,9 +55,9 @@ public static AvroTestClass1 fromByteBuffer( return DECODER.decode(b); } - @Deprecated public java.lang.String bar; + public java.lang.String bar; - @Deprecated public java.lang.String qux; + public java.lang.String qux; /** * Default constructor. Note that this does not initialize fields diff --git a/spring-integration-core/src/test/java/org/springframework/integration/transformer/AvroTestClass2.java b/spring-integration-core/src/test/java/org/springframework/integration/transformer/AvroTestClass2.java index b546c3cc591..50d955ac79f 100644 --- a/spring-integration-core/src/test/java/org/springframework/integration/transformer/AvroTestClass2.java +++ b/spring-integration-core/src/test/java/org/springframework/integration/transformer/AvroTestClass2.java @@ -55,9 +55,9 @@ public static AvroTestClass2 fromByteBuffer( return DECODER.decode(b); } - @Deprecated public java.lang.String bar; + public java.lang.String bar; - @Deprecated public java.lang.String qux; + public java.lang.String qux; /** * Default constructor. Note that this does not initialize fields diff --git a/spring-integration-core/src/test/java/org/springframework/integration/transformer/proto/TestClass1.java b/spring-integration-core/src/test/java/org/springframework/integration/transformer/proto/TestClass1.java index 2e8e1306e8b..576fdda2624 100644 --- a/spring-integration-core/src/test/java/org/springframework/integration/transformer/proto/TestClass1.java +++ b/spring-integration-core/src/test/java/org/springframework/integration/transformer/proto/TestClass1.java @@ -642,7 +642,7 @@ public static org.springframework.integration.transformer.proto.TestClass1 getDe return DEFAULT_INSTANCE; } - @java.lang.Deprecated public static final com.google.protobuf.Parser + public static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public TestClass1 parsePartialFrom( @@ -668,4 +668,3 @@ public org.springframework.integration.transformer.proto.TestClass1 getDefaultIn } } - diff --git a/spring-integration-core/src/test/java/org/springframework/integration/transformer/proto/TestClass2.java b/spring-integration-core/src/test/java/org/springframework/integration/transformer/proto/TestClass2.java index 7cd71369c2f..2f363d92715 100644 --- a/spring-integration-core/src/test/java/org/springframework/integration/transformer/proto/TestClass2.java +++ b/spring-integration-core/src/test/java/org/springframework/integration/transformer/proto/TestClass2.java @@ -642,7 +642,7 @@ public static org.springframework.integration.transformer.proto.TestClass2 getDe return DEFAULT_INSTANCE; } - @java.lang.Deprecated public static final com.google.protobuf.Parser + public static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public TestClass2 parsePartialFrom( @@ -668,4 +668,3 @@ public org.springframework.integration.transformer.proto.TestClass2 getDefaultIn } } - diff --git a/spring-integration-ip/src/main/java/org/springframework/integration/ip/dsl/AbstractConnectionFactorySpec.java b/spring-integration-ip/src/main/java/org/springframework/integration/ip/dsl/AbstractConnectionFactorySpec.java index aa83d7993e6..fbd25708051 100644 --- a/spring-integration-ip/src/main/java/org/springframework/integration/ip/dsl/AbstractConnectionFactorySpec.java +++ b/spring-integration-ip/src/main/java/org/springframework/integration/ip/dsl/AbstractConnectionFactorySpec.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2022 the original author or authors. + * Copyright 2016-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -212,17 +212,6 @@ public S readDelay(long readDelay) { return _this(); } - /** - * @param tcpSocketSupport the {@link TcpSocketSupport}. - * @return the spec. - * @deprecated in favor of {@link #socketSupport(TcpSocketSupport)}. - * @see AbstractConnectionFactory#setTcpSocketSupport(TcpSocketSupport) - */ - @Deprecated - public S tcpSocketSupport(TcpSocketSupport tcpSocketSupport) { - return socketSupport(tcpSocketSupport); - } - /** * @param tcpSocketSupport the {@link TcpSocketSupport}. * @return the spec. diff --git a/spring-integration-ip/src/main/java/org/springframework/integration/ip/dsl/TcpClientConnectionFactorySpec.java b/spring-integration-ip/src/main/java/org/springframework/integration/ip/dsl/TcpClientConnectionFactorySpec.java index e10cda7c94f..04cf8cb815c 100644 --- a/spring-integration-ip/src/main/java/org/springframework/integration/ip/dsl/TcpClientConnectionFactorySpec.java +++ b/spring-integration-ip/src/main/java/org/springframework/integration/ip/dsl/TcpClientConnectionFactorySpec.java @@ -18,8 +18,6 @@ import org.springframework.integration.ip.tcp.connection.AbstractClientConnectionFactory; import org.springframework.integration.ip.tcp.connection.AbstractServerConnectionFactory; -import org.springframework.integration.ip.tcp.connection.TcpNetClientConnectionFactory; -import org.springframework.integration.ip.tcp.connection.TcpNioClientConnectionFactory; /** * An {@link AbstractConnectionFactorySpec} for {@link AbstractClientConnectionFactory}s. @@ -34,7 +32,7 @@ * */ public abstract class TcpClientConnectionFactorySpec - , C extends AbstractClientConnectionFactory> + , C extends AbstractClientConnectionFactory> extends AbstractConnectionFactorySpec { /** @@ -46,30 +44,6 @@ protected TcpClientConnectionFactorySpec(C cf) { super(cf); } - /** - * Create an instance. - * @param host the host. - * @param port the port. - * @deprecated since 6.0.3; use a subclass. - */ - @Deprecated - protected TcpClientConnectionFactorySpec(String host, int port) { - this(host, port, false); - } - - /** - * Create an instance. - * @param host the host. - * @param port the port. - * @param nio true for NIO. - * @deprecated since 6.0.3; use a subclass. - */ - @SuppressWarnings("unchecked") - @Deprecated - protected TcpClientConnectionFactorySpec(String host, int port, boolean nio) { - super(nio ? (C) new TcpNioClientConnectionFactory(host, port) : (C) new TcpNetClientConnectionFactory(host, port)); - } - /** * Set the connection timeout in seconds. Defaults to 60. * @param connectTimeout the timeout. diff --git a/spring-integration-ip/src/main/java/org/springframework/integration/ip/dsl/TcpOutboundGatewaySpec.java b/spring-integration-ip/src/main/java/org/springframework/integration/ip/dsl/TcpOutboundGatewaySpec.java index 5737bacb503..b69481d5c6d 100644 --- a/spring-integration-ip/src/main/java/org/springframework/integration/ip/dsl/TcpOutboundGatewaySpec.java +++ b/spring-integration-ip/src/main/java/org/springframework/integration/ip/dsl/TcpOutboundGatewaySpec.java @@ -115,19 +115,6 @@ public TcpOutboundGatewaySpec async(boolean async) { return this; } - /** - * Set the unsolicited message channel name. - * @param channelName the name. - * @return the spec. - * @since 5.4 - * @deprecated in favor of {@link #unsolicitedMessageChannelName(String)} - * due to the typo in method name. - */ - @Deprecated(since = "6.1", forRemoval = true) - public TcpOutboundGatewaySpec unsolictedMessageChannelName(String channelName) { - return unsolicitedMessageChannelName(channelName); - } - /** * Set the unsolicited message channel name. * @param channelName the name. @@ -139,19 +126,6 @@ public TcpOutboundGatewaySpec unsolicitedMessageChannelName(String channelName) return this; } - /** - * Set the unsolicited message channel. - * @param channel the channel. - * @return the spec. - * @since 5.4 - * @deprecated in favor of {@link #unsolicitedMessageChannel(MessageChannel)} - * due to the typo in method name. - */ - @Deprecated(since = "6.1", forRemoval = true) - public TcpOutboundGatewaySpec unsolictedMessageChannelName(MessageChannel channel) { - return unsolicitedMessageChannel(channel); - } - /** * Set the unsolicited message channel. * @param channel the channel. diff --git a/spring-integration-ip/src/main/java/org/springframework/integration/ip/dsl/TcpServerConnectionFactorySpec.java b/spring-integration-ip/src/main/java/org/springframework/integration/ip/dsl/TcpServerConnectionFactorySpec.java index 6fa0458b11a..f58a66da4c8 100644 --- a/spring-integration-ip/src/main/java/org/springframework/integration/ip/dsl/TcpServerConnectionFactorySpec.java +++ b/spring-integration-ip/src/main/java/org/springframework/integration/ip/dsl/TcpServerConnectionFactorySpec.java @@ -17,8 +17,6 @@ package org.springframework.integration.ip.dsl; import org.springframework.integration.ip.tcp.connection.AbstractServerConnectionFactory; -import org.springframework.integration.ip.tcp.connection.TcpNetServerConnectionFactory; -import org.springframework.integration.ip.tcp.connection.TcpNioServerConnectionFactory; /** * An {@link AbstractConnectionFactorySpec} for {@link AbstractServerConnectionFactory}s. @@ -33,7 +31,7 @@ * */ public abstract class TcpServerConnectionFactorySpec - , C extends AbstractServerConnectionFactory> + , C extends AbstractServerConnectionFactory> extends AbstractConnectionFactorySpec { /** @@ -45,28 +43,6 @@ protected TcpServerConnectionFactorySpec(C cf) { super(cf); } - /** - * Create an instance. - * @param port the port. - * @deprecated since 6.0.3; use a subclass. - */ - @Deprecated - protected TcpServerConnectionFactorySpec(int port) { - this(port, false); - } - - /** - * Create an instance. - * @param port the port. - * @param nio true for NIO. - * @deprecated since 6.0.3; use a subclass. - */ - @Deprecated - @SuppressWarnings("unchecked") - protected TcpServerConnectionFactorySpec(int port, boolean nio) { - super(nio ? (C) new TcpNioServerConnectionFactory(port) : (C) new TcpNetServerConnectionFactory(port)); - } - /** * @param localAddress the local address. * @return the spec. diff --git a/spring-integration-jdbc/src/main/resources/org/springframework/integration/jdbc/config/spring-integration-jdbc.xsd b/spring-integration-jdbc/src/main/resources/org/springframework/integration/jdbc/config/spring-integration-jdbc.xsd index 8253df938c1..9faabad47e0 100644 --- a/spring-integration-jdbc/src/main/resources/org/springframework/integration/jdbc/config/spring-integration-jdbc.xsd +++ b/spring-integration-jdbc/src/main/resources/org/springframework/integration/jdbc/config/spring-integration-jdbc.xsd @@ -173,20 +173,11 @@ - - - - [DEPRECATED] Limits the number of rows extracted per query (otherwise all rows - are extracted into the outgoing message). - Deprecated since 5.1 in favor of 'max-rows'. - - - Limits the number of rows extracted per query. - Otherwise all rows are extracted into the outgoing message. + Otherwise, all rows are extracted into the outgoing message. @@ -321,7 +312,7 @@ supplied here, or (if keys-generated="true") can be the primary keys generated from an auto-increment, or else just a count of the number of rows affected by the update. The response - is in general a case insensitive Map (or list of maps if multi-valued), unless + is in general a case-insensitive Map (or list of maps if multivalued), unless a select query and a row-mapper is provided. If the update count is returned then the map key is "UPDATE". @@ -381,7 +372,7 @@ When using a select query, you can set a custom limit regarding the number of rows - extracted. Otherwise by default only the first + extracted. Otherwise, by default only the first row will be extracted into the outgoing message. If set to '0' all rows are extracted. @@ -898,8 +889,7 @@ expect-single-result is true, then a MessagingException is thrown. - Otherwise the complete result map is returned as the - payload. + Otherwise, the complete result map is returned as the payload. Important Note: Several databases such as H2 are not fully supported for Stored Procedure and/oir Function calls. @@ -1054,7 +1044,7 @@ @@ -1107,8 +1097,7 @@ expect-single-result is true, then a MessagingException is thrown. - Otherwise the complete result map is returned as the - payload. + Otherwise, the complete result map is returned as the payload. Important Note: Several databases such as H2 are not fully supported for Stored Procedure and/oir Function calls. @@ -1140,7 +1129,7 @@ - Channel to which polled messages will be send. If the stored + Channel to which polled messages will be sent. If the stored procedure or function does not return any data, the payload of the Message will be Null. diff --git a/spring-integration-kafka/src/main/java/org/springframework/integration/kafka/config/xml/KafkaInboundChannelAdapterParser.java b/spring-integration-kafka/src/main/java/org/springframework/integration/kafka/config/xml/KafkaInboundChannelAdapterParser.java index 8f94a5a072b..96b2f2d443c 100644 --- a/spring-integration-kafka/src/main/java/org/springframework/integration/kafka/config/xml/KafkaInboundChannelAdapterParser.java +++ b/spring-integration-kafka/src/main/java/org/springframework/integration/kafka/config/xml/KafkaInboundChannelAdapterParser.java @@ -1,5 +1,5 @@ /* - * Copyright 2019 the original author or authors. + * Copyright 2019-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -46,10 +46,7 @@ protected boolean shouldGenerateIdAsFallback() { protected BeanMetadataElement parseSource(Element element, ParserContext parserContext) { BeanDefinitionBuilder builder = BeanDefinitionBuilder.genericBeanDefinition(KafkaMessageSource.class); builder.addConstructorArgReference(element.getAttribute("consumer-factory")); - boolean hasConsumerProperties = StringUtils.hasText(element.getAttribute("consumer-properties")); - if (hasConsumerProperties) { - builder.addConstructorArgReference(element.getAttribute("consumer-properties")); - } + builder.addConstructorArgReference(element.getAttribute("consumer-properties")); String attribute = element.getAttribute("ack-factory"); if (StringUtils.hasText(attribute)) { builder.addConstructorArgReference(attribute); @@ -58,12 +55,7 @@ protected BeanMetadataElement parseSource(Element element, ParserContext parserC if (StringUtils.hasText(attribute)) { builder.addConstructorArgValue(attribute); } - if (!hasConsumerProperties) { - builder.addConstructorArgValue(element.getAttribute("topics")); - IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, "client-id"); - IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, "group-id"); - IntegrationNamespaceUtils.setReferenceIfAttributeDefined(builder, element, "rebalance-listener"); - } + IntegrationNamespaceUtils.setReferenceIfAttributeDefined(builder, element, "message-converter"); IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, "payload-type"); IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, "raw-header", "rawMessageHeader"); diff --git a/spring-integration-kafka/src/main/resources/org/springframework/integration/kafka/config/spring-integration-kafka.xsd b/spring-integration-kafka/src/main/resources/org/springframework/integration/kafka/config/spring-integration-kafka.xsd index ea92c621cbc..0a1548b3ca8 100644 --- a/spring-integration-kafka/src/main/resources/org/springframework/integration/kafka/config/spring-integration-kafka.xsd +++ b/spring-integration-kafka/src/main/resources/org/springframework/integration/kafka/config/spring-integration-kafka.xsd @@ -237,45 +237,6 @@ - - - - [DEPRECATED] - Comma-delimited list of topic names. - Deprecated in favor of 'consumer-properties'. - - - - - - - [DEPRECATED] - The 'group.id' KafkaConsumer property; overrides the value in the consumer factory. - Deprecated in favor of 'consumer-properties'. - - - - - - - [DEPRECATED] - The 'client.id' KafkaConsumer property; overrides the value in the consumer factory. - Deprecated in favor of 'consumer-properties'. - - - - - - - [DEPRECATED] - The time to block in poll() in milliseconds; default 5000ms. - Deprecated in favor of 'consumer-properties'. - - - - - - @@ -298,21 +259,6 @@ - - - - [DEPRECATED] - A reference to a 'ConsumerRebalanceListener'. - Deprecated in favor of 'consumer-properties'. - - - - - - - - diff --git a/spring-integration-mqtt/src/main/java/org/springframework/integration/mqtt/inbound/AbstractMqttMessageDrivenChannelAdapter.java b/spring-integration-mqtt/src/main/java/org/springframework/integration/mqtt/inbound/AbstractMqttMessageDrivenChannelAdapter.java index 48e8a8c01b5..6712b00687d 100644 --- a/spring-integration-mqtt/src/main/java/org/springframework/integration/mqtt/inbound/AbstractMqttMessageDrivenChannelAdapter.java +++ b/spring-integration-mqtt/src/main/java/org/springframework/integration/mqtt/inbound/AbstractMqttMessageDrivenChannelAdapter.java @@ -58,18 +58,6 @@ public abstract class AbstractMqttMessageDrivenChannelAdapter extends MessageProducerSupport implements ApplicationEventPublisherAware, ClientManager.ConnectCallback { - /** - * The default completion timeout in milliseconds. - */ - @Deprecated(since = "6.0.3", forRemoval = true) - public static final long DEFAULT_COMPLETION_TIMEOUT = ClientManager.DEFAULT_COMPLETION_TIMEOUT; - - /** - * The default disconnect completion timeout in milliseconds. - */ - @Deprecated(since = "6.0.3", forRemoval = true) - public static final long DISCONNECT_COMPLETION_TIMEOUT = ClientManager.DISCONNECT_COMPLETION_TIMEOUT; - protected final Lock topicLock = new ReentrantLock(); // NOSONAR private final String url; diff --git a/spring-integration-security/src/main/java/org/springframework/integration/security/channel/ChannelAccessPolicy.java b/spring-integration-security/src/main/java/org/springframework/integration/security/channel/ChannelAccessPolicy.java deleted file mode 100644 index e37c487b052..00000000000 --- a/spring-integration-security/src/main/java/org/springframework/integration/security/channel/ChannelAccessPolicy.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2002-2022 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.integration.security.channel; - -import java.util.Collection; - -import org.springframework.security.access.ConfigAttribute; - -/** - * Interface to encapsulate {@link ConfigAttribute}s for secured channel - * send and receive operations. - * - * @author Oleg Zhurakousky - * @since 2.0 - * - * @deprecated since 6.0 in favor of literally - * {@code new AuthorizationChannelInterceptor(AuthorityAuthorizationManager.hasAnyRole())} - */ -@Deprecated(since = "6.0") -public interface ChannelAccessPolicy { - - Collection getConfigAttributesForSend(); - - Collection getConfigAttributesForReceive(); - -} diff --git a/spring-integration-security/src/main/java/org/springframework/integration/security/channel/ChannelInvocation.java b/spring-integration-security/src/main/java/org/springframework/integration/security/channel/ChannelInvocation.java deleted file mode 100644 index 1d77b8cc681..00000000000 --- a/spring-integration-security/src/main/java/org/springframework/integration/security/channel/ChannelInvocation.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright 2002-2022 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.integration.security.channel; - -import org.aopalliance.intercept.MethodInvocation; - -import org.springframework.messaging.Message; -import org.springframework.messaging.MessageChannel; -import org.springframework.util.Assert; - -/** - * Secured object for {@link ChannelSecurityInterceptor}. Maintains a reference - * to the original {@link MethodInvocation} instance and provides convenient - * access to the secured {@link MessageChannel}. If the intercepted invocation - * is a send operation, the {@link Message} is also available. - * - * @author Mark Fisher - * - * @deprecated since 6.0 in favor of literally - * {@code new AuthorizationChannelInterceptor(AuthorityAuthorizationManager.hasAnyRole())} - */ -@Deprecated(since = "6.0") -public class ChannelInvocation { - - private final MessageChannel channel; - - private final Message message; - - private final MethodInvocation methodInvocation; - - - /** - * @param methodInvocation the intercepted MethodInvocation instance - */ - public ChannelInvocation(MethodInvocation methodInvocation) { - Assert.notNull(methodInvocation, "MethodInvocation must not be null"); - Assert.isAssignable(MessageChannel.class, methodInvocation.getThis().getClass(), - "MethodInvocation must be on a MessageChannel"); - this.channel = (MessageChannel) methodInvocation.getThis(); - if (methodInvocation.getMethod().getName().equals("send")) { - if (methodInvocation.getArguments().length < 1 || !(methodInvocation.getArguments()[0] instanceof Message)) { - throw new IllegalStateException("expected a Message as the first parameter of the channel's send method"); - } - this.message = (Message) methodInvocation.getArguments()[0]; - } - else { - this.message = null; - } - this.methodInvocation = methodInvocation; - } - - - public MessageChannel getChannel() { - return this.channel; - } - - public Message getMessage() { - return this.message; - } - - public MethodInvocation getMethodInvocation() { - return this.methodInvocation; - } - - public boolean isSend() { - return "send".equals(this.methodInvocation.getMethod().getName()); - } - - public boolean isReceive() { - return "receive".equals(this.methodInvocation.getMethod().getName()); - } - -} diff --git a/spring-integration-security/src/main/java/org/springframework/integration/security/channel/ChannelSecurityInterceptor.java b/spring-integration-security/src/main/java/org/springframework/integration/security/channel/ChannelSecurityInterceptor.java deleted file mode 100644 index 1a94fe5ce4d..00000000000 --- a/spring-integration-security/src/main/java/org/springframework/integration/security/channel/ChannelSecurityInterceptor.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright 2002-2022 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.integration.security.channel; - -import java.lang.reflect.Method; - -import org.aopalliance.intercept.MethodInterceptor; -import org.aopalliance.intercept.MethodInvocation; - -import org.springframework.security.access.SecurityMetadataSource; -import org.springframework.security.access.intercept.AbstractSecurityInterceptor; -import org.springframework.security.access.intercept.InterceptorStatusToken; -import org.springframework.util.Assert; - -/** - * An AOP interceptor that enforces authorization for MessageChannel send and/or receive calls. - * - * @author Mark Fisher - * @author Oleg Zhurakousky - * - * @see SecuredChannel - * - * @deprecated since 6.0 in favor of literally - * {@code new AuthorizationChannelInterceptor(AuthorityAuthorizationManager.hasAnyRole())}. - * However, the {@link org.springframework.security.messaging.access.intercept.AuthorizationChannelInterceptor} - * can be configured with any {@link org.springframework.security.authorization.AuthorizationManager} implementation. - */ -@Deprecated(since = "6.0") -public final class ChannelSecurityInterceptor extends AbstractSecurityInterceptor implements MethodInterceptor { - - private final ChannelSecurityMetadataSource securityMetadataSource; - - public ChannelSecurityInterceptor() { - this(new ChannelSecurityMetadataSource()); - } - - public ChannelSecurityInterceptor(ChannelSecurityMetadataSource securityMetadataSource) { - Assert.notNull(securityMetadataSource, "securityMetadataSource must not be null"); - this.securityMetadataSource = securityMetadataSource; - } - - - @Override - public Class getSecureObjectClass() { - return ChannelInvocation.class; - } - - - @Override - public Object invoke(MethodInvocation invocation) throws Throwable { // NOSONAR - Method method = invocation.getMethod(); - if (method.getName().equals("send") || method.getName().equals("receive")) { - return this.invokeWithAuthorizationCheck(invocation); - } - return invocation.proceed(); - } - - private Object invokeWithAuthorizationCheck(MethodInvocation methodInvocation) throws Throwable { // NOSONAR - Object returnValue = null; - InterceptorStatusToken token = super.beforeInvocation(new ChannelInvocation(methodInvocation)); - try { - returnValue = methodInvocation.proceed(); - } - finally { - returnValue = super.afterInvocation(token, returnValue); - } - return returnValue; - } - - @Override - public SecurityMetadataSource obtainSecurityMetadataSource() { - return this.securityMetadataSource; - } - -} diff --git a/spring-integration-security/src/main/java/org/springframework/integration/security/channel/ChannelSecurityMetadataSource.java b/spring-integration-security/src/main/java/org/springframework/integration/security/channel/ChannelSecurityMetadataSource.java deleted file mode 100644 index caaf9640a8a..00000000000 --- a/spring-integration-security/src/main/java/org/springframework/integration/security/channel/ChannelSecurityMetadataSource.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright 2002-2022 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.integration.security.channel; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.regex.Pattern; - -import org.springframework.integration.support.context.NamedComponent; -import org.springframework.messaging.MessageChannel; -import org.springframework.security.access.ConfigAttribute; -import org.springframework.security.access.SecurityMetadataSource; -import org.springframework.util.Assert; - -/** - * The {@link SecurityMetadataSource} implementation for secured {@link MessageChannel}s. - * - * @author Mark Fisher - * @author Oleg Zhurakousky - * - * @deprecated since 6.0 in favor of literally - * {@code new AuthorizationChannelInterceptor(AuthorityAuthorizationManager.hasAnyRole())} - */ -@Deprecated(since = "6.0") -public class ChannelSecurityMetadataSource implements SecurityMetadataSource { - - private final Map patternMappings; - - - public ChannelSecurityMetadataSource() { - this(null); - } - - public ChannelSecurityMetadataSource(Map patternMappings) { - this.patternMappings = (patternMappings != null) ? patternMappings - : new LinkedHashMap(); - } - - - public void addPatternMapping(Pattern pattern, ChannelAccessPolicy accessPolicy) { - this.patternMappings.put(pattern, accessPolicy); - } - - public Set getPatterns() { - return this.patternMappings.keySet(); - } - - public Collection getAttributes(Object object) throws IllegalArgumentException { - Assert.isAssignable(ChannelInvocation.class, object.getClass()); - ChannelInvocation invocation = (ChannelInvocation) object; - MessageChannel channel = invocation.getChannel(); - Assert.isAssignable(NamedComponent.class, channel.getClass()); - String channelName = ((NamedComponent) channel).getComponentName(); - List attributes = new ArrayList(); - for (Map.Entry mapping : this.patternMappings.entrySet()) { - Pattern pattern = mapping.getKey(); - ChannelAccessPolicy accessPolicy = mapping.getValue(); - if (pattern.matcher(channelName).matches()) { - if (invocation.isSend()) { - Collection definition = accessPolicy.getConfigAttributesForSend(); - if (definition != null) { - attributes.addAll(definition); - } - } - else if (invocation.isReceive()) { - Collection definition = accessPolicy.getConfigAttributesForReceive(); - if (definition != null) { - attributes.addAll(definition); - } - } - } - } - return attributes; - } - - public Collection getAllConfigAttributes() { - Set allAttributes = new HashSet(); - for (ChannelAccessPolicy policy : this.patternMappings.values()) { - Collection receiveAttributes = policy.getConfigAttributesForReceive(); - allAttributes.addAll(receiveAttributes); - Collection sendAttributes = policy.getConfigAttributesForSend(); - allAttributes.addAll(sendAttributes); - } - return allAttributes; - } - - public boolean supports(Class clazz) { - return ChannelInvocation.class.isAssignableFrom(clazz); - } - -} diff --git a/spring-integration-security/src/main/java/org/springframework/integration/security/channel/DefaultChannelAccessPolicy.java b/spring-integration-security/src/main/java/org/springframework/integration/security/channel/DefaultChannelAccessPolicy.java deleted file mode 100644 index 81b9082a287..00000000000 --- a/spring-integration-security/src/main/java/org/springframework/integration/security/channel/DefaultChannelAccessPolicy.java +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Copyright 2002-2022 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.integration.security.channel; - -import java.util.Collection; -import java.util.Collections; -import java.util.HashSet; - -import org.springframework.security.access.ConfigAttribute; -import org.springframework.security.access.SecurityConfig; -import org.springframework.util.Assert; -import org.springframework.util.ObjectUtils; -import org.springframework.util.StringUtils; - -/** - * Creates the {@link ConfigAttribute}s for secured channel - * send and receive operations based on simple String values. - * - * @author Mark Fisher - * @author Oleg Zhurakousky - * @author Artem Bilan - * - * @deprecated since 6.0 in favor of literally - * {@code new AuthorizationChannelInterceptor(AuthorityAuthorizationManager.hasAnyRole())} - */ -@Deprecated(since = "6.0") -public class DefaultChannelAccessPolicy implements ChannelAccessPolicy { - - private final Collection configAttributeDefinitionForSend; - - private final Collection configAttributeDefinitionForReceive; - - - /** - * Create an access policy instance. The provided 'sendAccess' and 'receiveAccess' - * values may be a single String or a comma-delimited list of values. All whitespace - * will be trimmed. A null value indicates that the policy does not - * apply for either send or receive access type. At most one of the values may be null. - * @param sendAccess The send access value(s). - * @param receiveAccess The receive access value(s). - */ - public DefaultChannelAccessPolicy(String sendAccess, String receiveAccess) { - boolean sendAccessDefined = StringUtils.hasText(sendAccess); - boolean receiveAccessDefined = StringUtils.hasText(receiveAccess); - Assert.isTrue(sendAccessDefined || receiveAccessDefined, - "At least one of 'sendAccess' and 'receiveAccess' must not be null and have at least one entry."); - if (sendAccessDefined) { - String[] sendAccessValues = StringUtils.commaDelimitedListToStringArray(sendAccess); - this.configAttributeDefinitionForSend = new HashSet(); - for (String sendAccessValue : sendAccessValues) { - this.configAttributeDefinitionForSend.add(new SecurityConfig(StringUtils.trimAllWhitespace(sendAccessValue))); - } - } - else { - this.configAttributeDefinitionForSend = Collections.emptySet(); - } - if (receiveAccessDefined) { - String[] receiveAccessValues = StringUtils.commaDelimitedListToStringArray(receiveAccess); - this.configAttributeDefinitionForReceive = new HashSet(); - for (String receiveAccessValue : receiveAccessValues) { - this.configAttributeDefinitionForReceive.add(new SecurityConfig(StringUtils.trimAllWhitespace(receiveAccessValue))); - } - } - else { - this.configAttributeDefinitionForReceive = Collections.emptySet(); - } - } - - /** - * Create an access policy instance. A null value indicates that the policy does not - * apply for either send or receive access type. At most one of the values may be null. - * Typically is used for the values from the {@link SecuredChannel} - * @param sendAccess The send access values. - * @param receiveAccess The receive access values. - * @since 4.2 - */ - public DefaultChannelAccessPolicy(String[] sendAccess, String[] receiveAccess) { - boolean sendAccessDefined = !ObjectUtils.isEmpty(sendAccess); - boolean receiveAccessDefined = !ObjectUtils.isEmpty(receiveAccess); - Assert.isTrue(sendAccessDefined || receiveAccessDefined, - "At least one of 'sendAccess' and 'receiveAccess' must not be null."); - if (sendAccessDefined) { - this.configAttributeDefinitionForSend = new HashSet(); - for (String sendAccessValue : sendAccess) { - this.configAttributeDefinitionForSend.add(new SecurityConfig(sendAccessValue)); - } - } - else { - this.configAttributeDefinitionForSend = Collections.emptySet(); - } - if (receiveAccessDefined) { - this.configAttributeDefinitionForReceive = new HashSet(); - for (String receiveAccessValue : receiveAccess) { - this.configAttributeDefinitionForReceive.add(new SecurityConfig(receiveAccessValue)); - } - } - else { - this.configAttributeDefinitionForReceive = Collections.emptySet(); - } - } - - - @Override - public Collection getConfigAttributesForSend() { - return this.configAttributeDefinitionForSend; - } - - @Override - public Collection getConfigAttributesForReceive() { - return this.configAttributeDefinitionForReceive; - } - -} diff --git a/spring-integration-security/src/main/java/org/springframework/integration/security/channel/SecuredChannel.java b/spring-integration-security/src/main/java/org/springframework/integration/security/channel/SecuredChannel.java deleted file mode 100644 index a505becab2e..00000000000 --- a/spring-integration-security/src/main/java/org/springframework/integration/security/channel/SecuredChannel.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2015-2022 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.integration.security.channel; - -import java.lang.annotation.Documented; -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * An annotation to be applied for the {@link org.springframework.messaging.MessageChannel} bean definition - * from JavaConfig - on {@code @Bean} method level. - *

- * Applies the {@link ChannelSecurityInterceptor}(s) using provided {@link #interceptor()} bean name(s). - *

- * The {@link #sendAccess()} and {@link #receiveAccess()} policies are populated to the - * {@link ChannelSecurityInterceptor}(s) from the {@code ChannelSecurityInterceptorBeanPostProcessor}. - * - * @author Artem Bilan - * @since 4.2 - * - * @deprecated since 6.0 in favor of literally - * {@code new AuthorizationChannelInterceptor(AuthorityAuthorizationManager.hasAnyRole())} - */ -@Deprecated(since = "6.0") -@Target(ElementType.METHOD) -@Retention(RetentionPolicy.RUNTIME) -@Documented -public @interface SecuredChannel { - - String[] interceptor(); - - String[] sendAccess() default {}; - - String[] receiveAccess() default {}; - -} diff --git a/spring-integration-security/src/main/java/org/springframework/integration/security/config/ChannelSecurityInterceptorBeanPostProcessor.java b/spring-integration-security/src/main/java/org/springframework/integration/security/config/ChannelSecurityInterceptorBeanPostProcessor.java deleted file mode 100644 index 0319041feb4..00000000000 --- a/spring-integration-security/src/main/java/org/springframework/integration/security/config/ChannelSecurityInterceptorBeanPostProcessor.java +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Copyright 2002-2022 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.integration.security.config; - -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.regex.Pattern; - -import org.springframework.aop.Advisor; -import org.springframework.aop.TargetSource; -import org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator; -import org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor; -import org.springframework.beans.BeansException; -import org.springframework.beans.factory.BeanFactory; -import org.springframework.integration.security.channel.ChannelAccessPolicy; -import org.springframework.integration.security.channel.ChannelSecurityInterceptor; -import org.springframework.integration.security.channel.ChannelSecurityMetadataSource; -import org.springframework.lang.Nullable; -import org.springframework.messaging.MessageChannel; - -/** - * A {@link org.springframework.beans.factory.config.BeanPostProcessor} that proxies - * {@link MessageChannel}s to apply a {@link ChannelSecurityInterceptor}. - * - * @author Mark Fisher - * @author Oleg Zhurakousky - * @author Artem Bilan - * @author Gary Russell - - * @deprecated since 6.0 in favor of literally - * {@code new AuthorizationChannelInterceptor(AuthorityAuthorizationManager.hasAnyRole())} - */ -@Deprecated(since = "6.0") -@SuppressWarnings("serial") -public class ChannelSecurityInterceptorBeanPostProcessor extends AbstractAutoProxyCreator { - - private final Map> securityInterceptorMappings; - - private final Map> accessPolicyMapping; - - public ChannelSecurityInterceptorBeanPostProcessor(Map> securityInterceptorMappings) { - this(securityInterceptorMappings, null); - } - - public ChannelSecurityInterceptorBeanPostProcessor(Map> securityInterceptorMappings, - Map> accessPolicyMapping) { - - this.securityInterceptorMappings = securityInterceptorMappings; //NOSONAR (inconsistent sync) - this.accessPolicyMapping = accessPolicyMapping; //NOSONAR (inconsistent sync) - } - - @Override - public Object postProcessBeforeInitialization(Object bean, String beanName) { - if (this.accessPolicyMapping != null - && bean instanceof ChannelSecurityInterceptor - && this.accessPolicyMapping.containsKey(beanName)) { - Map accessPolicies = this.accessPolicyMapping.get(beanName); - ChannelSecurityMetadataSource securityMetadataSource = - (ChannelSecurityMetadataSource) ((ChannelSecurityInterceptor) bean).obtainSecurityMetadataSource(); - for (Map.Entry entry : accessPolicies.entrySet()) { - securityMetadataSource.addPatternMapping(entry.getKey(), entry.getValue()); - } - } - return bean; - } - - @Override - @Nullable - protected Object[] getAdvicesAndAdvisorsForBean(Class beanClass, String beanName, - @Nullable TargetSource customTargetSource) throws BeansException { - - if (MessageChannel.class.isAssignableFrom(beanClass)) { - List interceptors = new ArrayList<>(); - for (Map.Entry> entry : this.securityInterceptorMappings.entrySet()) { - if (isMatch(beanName, entry.getValue())) { - DefaultBeanFactoryPointcutAdvisor channelSecurityInterceptor = - new DefaultBeanFactoryPointcutAdvisor(); - channelSecurityInterceptor.setAdviceBeanName(entry.getKey()); - BeanFactory beanFactory = getBeanFactory(); - if (beanFactory != null) { - channelSecurityInterceptor.setBeanFactory(beanFactory); - } - interceptors.add(channelSecurityInterceptor); - } - } - if (!interceptors.isEmpty()) { - return interceptors.toArray(); - } - } - - return DO_NOT_PROXY; - } - - private boolean isMatch(String beanName, Set patterns) { - for (Pattern pattern : patterns) { - if (pattern.matcher(beanName).matches()) { - return true; - } - } - return false; - } - -} diff --git a/spring-integration-security/src/main/java/org/springframework/integration/security/config/IntegrationSecurityNamespaceHandler.java b/spring-integration-security/src/main/java/org/springframework/integration/security/config/IntegrationSecurityNamespaceHandler.java deleted file mode 100644 index 7e392387e2a..00000000000 --- a/spring-integration-security/src/main/java/org/springframework/integration/security/config/IntegrationSecurityNamespaceHandler.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright 2002-2022 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.integration.security.config; - -import org.springframework.integration.config.xml.AbstractIntegrationNamespaceHandler; - -/** - * Namespace handler for the security namespace. - * - * @author Jonas Partner - * - * @deprecated since 6.0 in favor of literally - * {@code new AuthorizationChannelInterceptor(AuthorityAuthorizationManager.hasAnyRole())} - */ -@Deprecated(since = "6.0", forRemoval = true) -public class IntegrationSecurityNamespaceHandler extends AbstractIntegrationNamespaceHandler { - - public void init() { - registerBeanDefinitionParser("secured-channels", new SecuredChannelsParser()); - } - -} diff --git a/spring-integration-security/src/main/java/org/springframework/integration/security/config/SecuredChannelsParser.java b/spring-integration-security/src/main/java/org/springframework/integration/security/config/SecuredChannelsParser.java deleted file mode 100644 index de73e6d50c3..00000000000 --- a/spring-integration-security/src/main/java/org/springframework/integration/security/config/SecuredChannelsParser.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright 2002-2022 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.integration.security.config; - -import java.util.List; - -import org.w3c.dom.Element; - -import org.springframework.beans.factory.config.BeanDefinition; -import org.springframework.beans.factory.support.BeanDefinitionBuilder; -import org.springframework.beans.factory.support.ManagedMap; -import org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser; -import org.springframework.beans.factory.xml.ParserContext; -import org.springframework.integration.config.xml.IntegrationNamespaceUtils; -import org.springframework.integration.security.channel.ChannelSecurityInterceptor; -import org.springframework.integration.security.channel.ChannelSecurityMetadataSource; -import org.springframework.integration.security.channel.DefaultChannelAccessPolicy; -import org.springframework.util.StringUtils; -import org.springframework.util.xml.DomUtils; - -/** - * Creates a {@link org.springframework.integration.security.channel.ChannelSecurityInterceptor} - * to control send and receive access, and creates a bean post-processor to apply the - * interceptor to {@link org.springframework.messaging.MessageChannel}s - * whose names match the specified patterns. - * - * @author Jonas Partner - * @author Mark Fisher - * @author Artem Bilan - * - * @deprecated since 6.0 in favor of literally - * {@code new AuthorizationChannelInterceptor(AuthorityAuthorizationManager.hasAnyRole())} - */ -@Deprecated(since = "6.0") -public class SecuredChannelsParser extends AbstractSingleBeanDefinitionParser { - - @Override - protected Class getBeanClass(Element element) { - return ChannelSecurityInterceptor.class; - } - - @Override - protected boolean shouldGenerateId() { - return true; - } - - @Override - protected void doParse(Element element, ParserContext parserContext, BeanDefinitionBuilder builder) { - builder.addConstructorArgValue(this.parseSecurityMetadataSource(element, parserContext)); - IntegrationNamespaceUtils.setReferenceIfAttributeDefined(builder, element, "authentication-manager"); - IntegrationNamespaceUtils.setReferenceIfAttributeDefined(builder, element, "access-decision-manager"); - } - - private BeanDefinition parseSecurityMetadataSource(Element element, ParserContext parserContext) { - BeanDefinitionBuilder builder = BeanDefinitionBuilder.genericBeanDefinition(ChannelSecurityMetadataSource.class); - List accessPolicyElements = DomUtils.getChildElementsByTagName(element, "access-policy"); - ManagedMap patternMappings = new ManagedMap(); - for (Element accessPolicyElement : accessPolicyElements) { - String sendAccess = accessPolicyElement.getAttribute("send-access"); - String receiveAccess = accessPolicyElement.getAttribute("receive-access"); - if (!StringUtils.hasText(sendAccess) && !StringUtils.hasText(receiveAccess)) { - parserContext.getReaderContext().error( - "At least one of 'send-access' or 'receive-access' must be provided.", accessPolicyElement); - } - BeanDefinitionBuilder accessPolicyBuilder = BeanDefinitionBuilder.genericBeanDefinition(DefaultChannelAccessPolicy.class); - accessPolicyBuilder.addConstructorArgValue(sendAccess); - accessPolicyBuilder.addConstructorArgValue(receiveAccess); - accessPolicyBuilder.getBeanDefinition().setRole(BeanDefinition.ROLE_SUPPORT); - patternMappings.put(accessPolicyElement.getAttribute("pattern"), accessPolicyBuilder.getBeanDefinition()); - } - builder.addConstructorArgValue(patternMappings); - - return builder.getBeanDefinition(); - } - -} diff --git a/spring-integration-security/src/main/java/org/springframework/integration/security/config/SecurityIntegrationConfigurationInitializer.java b/spring-integration-security/src/main/java/org/springframework/integration/security/config/SecurityIntegrationConfigurationInitializer.java deleted file mode 100644 index a39f57c24e0..00000000000 --- a/spring-integration-security/src/main/java/org/springframework/integration/security/config/SecurityIntegrationConfigurationInitializer.java +++ /dev/null @@ -1,151 +0,0 @@ -/* - * Copyright 2014-2022 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.integration.security.config; - -import java.util.HashMap; -import java.util.Map; -import java.util.Set; -import java.util.regex.Pattern; - -import org.springframework.beans.BeansException; -import org.springframework.beans.factory.annotation.AnnotatedBeanDefinition; -import org.springframework.beans.factory.config.BeanDefinition; -import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; -import org.springframework.beans.factory.config.ConstructorArgumentValues; -import org.springframework.beans.factory.support.BeanDefinitionBuilder; -import org.springframework.beans.factory.support.BeanDefinitionRegistry; -import org.springframework.beans.factory.support.ManagedMap; -import org.springframework.beans.factory.support.ManagedSet; -import org.springframework.core.type.MethodMetadata; -import org.springframework.integration.config.IntegrationConfigurationInitializer; -import org.springframework.integration.security.channel.ChannelAccessPolicy; -import org.springframework.integration.security.channel.ChannelSecurityInterceptor; -import org.springframework.integration.security.channel.DefaultChannelAccessPolicy; -import org.springframework.integration.security.channel.SecuredChannel; - -/** - * The Integration Security infrastructure {@code beanFactory} initializer. - * - * @author Artem Bilan - * - * @since 4.0 - * - * @deprecated since 6.0 in favor of literally - * {@code new AuthorizationChannelInterceptor(AuthorityAuthorizationManager.hasAnyRole())} - */ -@Deprecated(since = "6.0", forRemoval = true) -public class SecurityIntegrationConfigurationInitializer implements IntegrationConfigurationInitializer { - - private static final String CHANNEL_SECURITY_INTERCEPTOR_BPP_BEAN_NAME = - ChannelSecurityInterceptorBeanPostProcessor.class.getName(); - - @Override - public void initialize(ConfigurableListableBeanFactory beanFactory) throws BeansException { - BeanDefinitionRegistry registry = (BeanDefinitionRegistry) beanFactory; - - Map> securityInterceptors = new ManagedMap<>(); - Map> policies = new HashMap<>(); - - for (String beanName : registry.getBeanDefinitionNames()) { - BeanDefinition beanDefinition = registry.getBeanDefinition(beanName); - if (ChannelSecurityInterceptor.class.getName().equals(beanDefinition.getBeanClassName())) { - collectPatternsFromInterceptor(securityInterceptors, beanName, beanDefinition); - } - else if (beanDefinition instanceof AnnotatedBeanDefinition) { - Object beanSource = beanDefinition.getSource(); - if (beanSource instanceof MethodMetadata) { - collectInterceptorsAndPoliciesBySecuredChannel(securityInterceptors, policies, beanName, - (MethodMetadata) beanSource); - } - } - } - - if (!securityInterceptors.isEmpty()) { - BeanDefinitionBuilder builder = - BeanDefinitionBuilder.rootBeanDefinition(ChannelSecurityInterceptorBeanPostProcessor.class) - .addConstructorArgValue(securityInterceptors); - if (!policies.isEmpty()) { - builder.addConstructorArgValue(policies); - } - registry.registerBeanDefinition(CHANNEL_SECURITY_INTERCEPTOR_BPP_BEAN_NAME, builder.getBeanDefinition()); - } - } - - @SuppressWarnings("unchecked") - private void collectPatternsFromInterceptor(Map> securityInterceptors, String beanName, - BeanDefinition beanDefinition) { - - ConstructorArgumentValues.ValueHolder metadataSourceValueHolder = - beanDefinition - .getConstructorArgumentValues() - .getIndexedArgumentValue(0, BeanDefinition.class); - if (metadataSourceValueHolder != null) { - BeanDefinition metadataSource = (BeanDefinition) metadataSourceValueHolder.getValue(); - if (metadataSource != null) { - ConstructorArgumentValues.ValueHolder patternMappingsValueHolder = - metadataSource - .getConstructorArgumentValues() - .getIndexedArgumentValue(0, Map.class); - if (patternMappingsValueHolder != null) { - Map patternsToAdd = (Map) patternMappingsValueHolder.getValue(); - Set patterns = new ManagedSet<>(); - if (!securityInterceptors.containsKey(beanName)) { - securityInterceptors.put(beanName, patterns); - } - else { - patterns = securityInterceptors.get(beanName); - } - if (patternsToAdd != null) { - patterns.addAll(patternsToAdd.keySet()); - } - } - } - } - } - - private void collectInterceptorsAndPoliciesBySecuredChannel(Map> securityInterceptors, - Map> policies, String beanName, MethodMetadata beanMethod) { - - Map securedAttributes = beanMethod.getAnnotationAttributes(SecuredChannel.class.getName()); - if (securedAttributes != null) { - String[] interceptors = (String[]) securedAttributes.get("interceptor"); - String[] sendAccess = (String[]) securedAttributes.get("sendAccess"); - String[] receiveAccess = (String[]) securedAttributes.get("receiveAccess"); - ChannelAccessPolicy accessPolicy = new DefaultChannelAccessPolicy(sendAccess, receiveAccess); - for (String interceptor : interceptors) { - Set patterns = new ManagedSet<>(); - if (!securityInterceptors.containsKey(interceptor)) { - securityInterceptors.put(interceptor, patterns); - } - else { - patterns = securityInterceptors.get(interceptor); - } - patterns.add(beanName); - - Map mapping = new HashMap<>(); - if (!policies.containsKey(interceptor)) { - policies.put(interceptor, mapping); - } - else { - mapping = policies.get(interceptor); - } - mapping.put(Pattern.compile(beanName), accessPolicy); - } - } - } - -} diff --git a/spring-integration-security/src/main/java/org/springframework/integration/security/config/package-info.java b/spring-integration-security/src/main/java/org/springframework/integration/security/config/package-info.java deleted file mode 100644 index 2ffbe751b26..00000000000 --- a/spring-integration-security/src/main/java/org/springframework/integration/security/config/package-info.java +++ /dev/null @@ -1,4 +0,0 @@ -/** - * Provides classes for configuration - parsers, namespace handlers, bean post processors. - */ -package org.springframework.integration.security.config; diff --git a/spring-integration-security/src/main/resources/META-INF/spring.factories b/spring-integration-security/src/main/resources/META-INF/spring.factories deleted file mode 100644 index 1e50c2c7cc9..00000000000 --- a/spring-integration-security/src/main/resources/META-INF/spring.factories +++ /dev/null @@ -1,2 +0,0 @@ -org.springframework.integration.config.IntegrationConfigurationInitializer=\ -org.springframework.integration.security.config.SecurityIntegrationConfigurationInitializer diff --git a/spring-integration-security/src/main/resources/META-INF/spring.handlers b/spring-integration-security/src/main/resources/META-INF/spring.handlers deleted file mode 100644 index 9ee913c5034..00000000000 --- a/spring-integration-security/src/main/resources/META-INF/spring.handlers +++ /dev/null @@ -1 +0,0 @@ -http\://www.springframework.org/schema/integration/security=org.springframework.integration.security.config.IntegrationSecurityNamespaceHandler \ No newline at end of file diff --git a/spring-integration-security/src/main/resources/META-INF/spring.schemas b/spring-integration-security/src/main/resources/META-INF/spring.schemas deleted file mode 100644 index e0b89e61341..00000000000 --- a/spring-integration-security/src/main/resources/META-INF/spring.schemas +++ /dev/null @@ -1,24 +0,0 @@ -http\://www.springframework.org/schema/integration/security/spring-integration-security-2.0.xsd=org/springframework/integration/security/config/spring-integration-security.xsd -http\://www.springframework.org/schema/integration/security/spring-integration-security-2.1.xsd=org/springframework/integration/security/config/spring-integration-security.xsd -http\://www.springframework.org/schema/integration/security/spring-integration-security-2.2.xsd=org/springframework/integration/security/config/spring-integration-security.xsd -http\://www.springframework.org/schema/integration/security/spring-integration-security-3.0.xsd=org/springframework/integration/security/config/spring-integration-security.xsd -http\://www.springframework.org/schema/integration/security/spring-integration-security-4.0.xsd=org/springframework/integration/security/config/spring-integration-security.xsd -http\://www.springframework.org/schema/integration/security/spring-integration-security-4.1.xsd=org/springframework/integration/security/config/spring-integration-security.xsd -http\://www.springframework.org/schema/integration/security/spring-integration-security-4.2.xsd=org/springframework/integration/security/config/spring-integration-security.xsd -http\://www.springframework.org/schema/integration/security/spring-integration-security-4.3.xsd=org/springframework/integration/security/config/spring-integration-security.xsd -http\://www.springframework.org/schema/integration/security/spring-integration-security-5.0.xsd=org/springframework/integration/security/config/spring-integration-security.xsd -http\://www.springframework.org/schema/integration/security/spring-integration-security-5.1.xsd=org/springframework/integration/security/config/spring-integration-security.xsd -http\://www.springframework.org/schema/integration/security/spring-integration-security-5.2.xsd=org/springframework/integration/security/config/spring-integration-security.xsd -http\://www.springframework.org/schema/integration/security/spring-integration-security.xsd=org/springframework/integration/security/config/spring-integration-security.xsd -https\://www.springframework.org/schema/integration/security/spring-integration-security-2.0.xsd=org/springframework/integration/security/config/spring-integration-security.xsd -https\://www.springframework.org/schema/integration/security/spring-integration-security-2.1.xsd=org/springframework/integration/security/config/spring-integration-security.xsd -https\://www.springframework.org/schema/integration/security/spring-integration-security-2.2.xsd=org/springframework/integration/security/config/spring-integration-security.xsd -https\://www.springframework.org/schema/integration/security/spring-integration-security-3.0.xsd=org/springframework/integration/security/config/spring-integration-security.xsd -https\://www.springframework.org/schema/integration/security/spring-integration-security-4.0.xsd=org/springframework/integration/security/config/spring-integration-security.xsd -https\://www.springframework.org/schema/integration/security/spring-integration-security-4.1.xsd=org/springframework/integration/security/config/spring-integration-security.xsd -https\://www.springframework.org/schema/integration/security/spring-integration-security-4.2.xsd=org/springframework/integration/security/config/spring-integration-security.xsd -https\://www.springframework.org/schema/integration/security/spring-integration-security-4.3.xsd=org/springframework/integration/security/config/spring-integration-security.xsd -https\://www.springframework.org/schema/integration/security/spring-integration-security-5.0.xsd=org/springframework/integration/security/config/spring-integration-security.xsd -https\://www.springframework.org/schema/integration/security/spring-integration-security-5.1.xsd=org/springframework/integration/security/config/spring-integration-security.xsd -https\://www.springframework.org/schema/integration/security/spring-integration-security-5.2.xsd=org/springframework/integration/security/config/spring-integration-security.xsd -https\://www.springframework.org/schema/integration/security/spring-integration-security.xsd=org/springframework/integration/security/config/spring-integration-security.xsd diff --git a/spring-integration-security/src/main/resources/META-INF/spring.tooling b/spring-integration-security/src/main/resources/META-INF/spring.tooling deleted file mode 100644 index 53c14e0ff01..00000000000 --- a/spring-integration-security/src/main/resources/META-INF/spring.tooling +++ /dev/null @@ -1,4 +0,0 @@ -# Tooling related information for the integration security namespace -http\://www.springframework.org/schema/integration/security@name=integration security Namespace -http\://www.springframework.org/schema/integration/security@prefix=int-security -http\://www.springframework.org/schema/integration/security@icon=org/springframework/integration/security/config/spring-integration-security.gif diff --git a/spring-integration-security/src/main/resources/org/springframework/integration/security/config/spring-integration-security.gif b/spring-integration-security/src/main/resources/org/springframework/integration/security/config/spring-integration-security.gif deleted file mode 100644 index 3b3b0b04feb10a72e2075edffe5d9e05b99d9a27..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 561 zcmZ?wbhEHb6krfwc*Xz%|NsB*n7VH6iaomzUp%y<^XRV5le@d0TwD0(?Y1*}yMNuN z{&lP2*R94INBS=A?|FG`!G}{B`xb`1JeGI!NZ*5Vi(cQ`KQmusUX}KzeeUlLCB3;g zWm1~p#x|X|$E(*(iS3Hx?@tz7-sZi$GhkIu@Pp086S6IPGc8&Zj2dGNd(zA+L$yyW zD9H6xE%a3{^woT_IPu=1)D%aB0#CKRB#Y}a5^l~(nOW$Q<*G3;!DdRb-PK94d%Kd? zHO3!r37OkkaZS5Ta%IX?QolRDT0;-Ps zohkz6UOJ}Ex*ci;(weq5)=u{ATApTd#=fpD7VScQb`DZ*-i&(~+q5m+JtP@96cjkx z^-TPI7!~#?bTAn)${s&1+s?$wD9-tSSG0-TgaVIDlbEOoA3qm6qoOdk Ytf1nPGYf?U9x$5;$jixcu`pNz0C=IQ4FCWD diff --git a/spring-integration-security/src/main/resources/org/springframework/integration/security/config/spring-integration-security.xsd b/spring-integration-security/src/main/resources/org/springframework/integration/security/config/spring-integration-security.xsd deleted file mode 100644 index 42298f5cf5e..00000000000 --- a/spring-integration-security/src/main/resources/org/springframework/integration/security/config/spring-integration-security.xsd +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - Defines a 'org.springframework.integration.security.channel.ChannelSecurityInterceptor' security - requirements for one or more Message Channels. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Defines the security access policy for send and/or receive invocations based on a Message Channel name - pattern. - - - - - - - - diff --git a/src/reference/asciidoc/groovy-dsl.adoc b/src/reference/asciidoc/groovy-dsl.adoc index 9c2aa9bf22f..26ce8d73163 100644 --- a/src/reference/asciidoc/groovy-dsl.adoc +++ b/src/reference/asciidoc/groovy-dsl.adoc @@ -62,7 +62,7 @@ flowFromSupplier() { ==== But unfortunately not all `from()` methods are compatible with Groovy structures. -To solve this, Spring Integration provides a Groovy DSL factory around the `IntegrationFlows` factory. +To solve this, Spring Integration provides a Groovy DSL factory around the `IntegrationFlow` factory. It is implemented as a set of overloaded `integrationFlow()` functions. With a consumer for a `GroovyIntegrationFlowDefinition` to declare the remainder of the flow as an `IntegrationFlow` closure to reuse the mentioned above experience and also avoid the need for a `get()` call in the end. For example: