Clean up some JavaDocs; remove deprecated API

This commit is contained in:
Artem Bilan
2022-04-08 16:05:43 -04:00
parent 10ea577549
commit 799802c0d1
40 changed files with 182 additions and 1553 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2021 the original author or authors.
* 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.
@@ -114,22 +114,6 @@ public abstract class AbstractWebServiceOutboundGateway extends AbstractReplyPro
}
}
/**
* Specify whether the URI should be encoded after any <code>uriVariables</code>
* are expanded and before sending the request. The default value is <code>true</code>.
* @param encodeUri true if the URI should be encoded.
* @since 4.1
* @deprecated since 5.3 in favor of {@link #setEncodingMode}
* @see org.springframework.web.util.UriComponentsBuilder
*/
@Deprecated
public void setEncodeUri(boolean encodeUri) {
setEncodingMode(
encodeUri
? DefaultUriBuilderFactory.EncodingMode.TEMPLATE_AND_VALUES
: DefaultUriBuilderFactory.EncodingMode.NONE);
}
/**
* Set the encoding mode to use.
* By default, this is set to {@link DefaultUriBuilderFactory.EncodingMode#TEMPLATE_AND_VALUES}.
@@ -181,16 +165,6 @@ public abstract class AbstractWebServiceOutboundGateway extends AbstractReplyPro
this.webServiceTemplate.setFaultMessageResolver(faultMessageResolver);
}
/**
* Specify the {@link WebServiceMessageSender} to use.
* @param messageSender the sender.
* @deprecated in favor of {@link #setMessageSenders(WebServiceMessageSender...)}
*/
@Deprecated
public void setMessageSender(WebServiceMessageSender messageSender) {
setMessageSenders(messageSender);
}
public void setMessageSenders(WebServiceMessageSender... messageSenders) {
Assert.state(!this.webServiceTemplateExplicitlySet,
() -> "'messageSenders' must be specified on the provided: " + this.webServiceTemplate);
@@ -205,7 +179,7 @@ public abstract class AbstractWebServiceOutboundGateway extends AbstractReplyPro
@Override
protected void doInit() {
this.evaluationContext = ExpressionUtils.createStandardEvaluationContext(this.getBeanFactory());
this.evaluationContext = ExpressionUtils.createStandardEvaluationContext(getBeanFactory());
Assert.state(this.destinationProvider == null || CollectionUtils.isEmpty(this.uriVariableExpressions),
"uri variables are not supported when a DestinationProvider is supplied.");
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2020 the original author or authors.
* 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.
@@ -86,7 +86,6 @@ public class WebServiceOutboundGatewayParser extends AbstractOutboundGatewayPars
IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, "reply-timeout", "sendTimeout");
IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, "requires-reply");
IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, "ignore-empty-responses");
IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, "encode-uri");
IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, "encoding-mode");
postProcessGateway(builder, element, parserContext);
@@ -122,9 +121,6 @@ public class WebServiceOutboundGatewayParser extends AbstractOutboundGatewayPars
parserContext.getReaderContext().error(
"Only one of message-sender or message-senders should be specified.", element);
}
if (StringUtils.hasText(messageSenderRef)) {
builder.addPropertyReference("messageSender", messageSenderRef);
}
if (StringUtils.hasText(messageSenderListRef)) {
builder.addPropertyReference("messageSenders", messageSenderListRef);
}

View File

@@ -124,19 +124,6 @@
]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="encode-uri" default="true">
<xsd:annotation>
<xsd:documentation>
[DEPRECATED] When set to "false", the URI won't be encoded before the request is sent. This may be useful
in some scenarios as it allows user control over the encoding, if needed. Default is "true".
This attribute is ignored, if 'destination-provider' is specified.
Deprecated since 5.3 in favor of 'encoding-mode'.
</xsd:documentation>
</xsd:annotation>
<xsd:simpleType>
<xsd:union memberTypes="xsd:boolean xsd:string"/>
</xsd:simpleType>
</xsd:attribute>
<xsd:attribute name="encoding-mode" default="TEMPLATE_AND_VALUES">
<xsd:annotation>
<xsd:documentation>
@@ -240,18 +227,6 @@
</xsd:appinfo>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="message-sender" type="xsd:string">
<xsd:annotation>
<xsd:documentation>
Reference to the bean definition of a WebServiceMessageSender.
</xsd:documentation>
<xsd:appinfo>
<tool:annotation kind="ref">
<tool:expected-type type="org.springframework.ws.transport.WebServiceMessageSender"/>
</tool:annotation>
</xsd:appinfo>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="message-senders" type="xsd:string">
<xsd:annotation>
<xsd:documentation>

View File

@@ -16,7 +16,7 @@
<si:chain input-channel="wsOutboundGatewayInsideChain" output-channel="replyChannel">
<ws:outbound-gateway uri="http://test.example.org"
message-sender="mockMessageSender"/>
message-senders="mockMessageSender"/>
</si:chain>
<bean id="mockMessageSender" class="org.springframework.integration.ws.SimpleWebServiceOutboundGatewayTests"

View File

@@ -21,7 +21,7 @@
<ws:outbound-gateway request-channel="inputJms"
uri="jms:{destination}?deliveryMode={deliveryMode}&amp;priority={priority}"
interceptor="interceptor"
message-sender="jmsMessageSender">
message-senders="jmsMessageSender">
<ws:uri-variable name="destination" expression="headers.jmsQueue"/>
<ws:uri-variable name="deliveryMode" expression="headers.deliveryMode"/>
<ws:uri-variable name="priority" expression="headers.jms_priority"/>
@@ -44,7 +44,7 @@
uri="mailto:{to}?subject={subject}"
encoding-mode="VALUES_ONLY"
interceptor="emailInterceptor"
message-sender="emailMessageSender">
message-senders="emailMessageSender">
<ws:uri-variable name="to" expression="headers.to"/>
<ws:uri-variable name="subject" expression="headers.subject"/>
</ws:outbound-gateway>
@@ -61,7 +61,7 @@
<ws:outbound-gateway request-channel="inputXmpp"
uri="xmpp:{user}@jabber.org"
interceptor="interceptor"
message-sender="xmppMessageSender">
message-senders="xmppMessageSender">
<ws:uri-variable name="user" expression="headers.to"/>
</ws:outbound-gateway>

View File

@@ -74,7 +74,7 @@
<ws:outbound-gateway id="gatewayWithCustomMessageSender"
request-channel="inputChannel"
uri="https://example.org"
message-sender="messageSender"/>
message-senders="messageSender"/>
<ws:outbound-gateway id="gatewayWithCustomMessageSenderList"
request-channel="inputChannel"