3434import org .springframework .web .server .ServerWebExchange ;
3535
3636/**
37- * {@code ApiDeprecationHandler } based on
37+ * {@code ApiVersionDeprecationHandler } based on
3838 * <a href="https://datatracker.ietf.org/doc/html/rfc9745">RFC 9745</a> and
3939 * <a href="https://datatracker.ietf.org/doc/html/rfc8594">RFC 8594</a> that
4040 * provides the option to set the "Deprecation" and "Sunset" response headers,
4646 * @author Rossen Stoyanchev
4747 * @since 7.0
4848 */
49- public class StandardApiDeprecationHandler implements ApiDeprecationHandler {
49+ public class StandardApiVersionDeprecationHandler implements ApiVersionDeprecationHandler {
5050
5151 private final ApiVersionParser <?> versionParser ;
5252
@@ -58,9 +58,9 @@ public class StandardApiDeprecationHandler implements ApiDeprecationHandler {
5858 * <p>By default, {@link SemanticApiVersionParser} is used to parse configured
5959 * API versions, so those can be compared to request versions parsed at runtime.
6060 * If you have a custom parser, then please use the
61- * {@link #StandardApiDeprecationHandler (ApiVersionParser)} constructor.
61+ * {@link #StandardApiVersionDeprecationHandler (ApiVersionParser)} constructor.
6262 */
63- public StandardApiDeprecationHandler () {
63+ public StandardApiVersionDeprecationHandler () {
6464 this (new SemanticApiVersionParser ());
6565 }
6666
@@ -69,7 +69,7 @@ public StandardApiDeprecationHandler() {
6969 * This needs to be the same as the parser type used at runtime to parse
7070 * request versions.
7171 */
72- public StandardApiDeprecationHandler (ApiVersionParser <?> parser ) {
72+ public StandardApiVersionDeprecationHandler (ApiVersionParser <?> parser ) {
7373 this .versionParser = parser ;
7474 }
7575
@@ -108,7 +108,7 @@ public void handleVersion(Comparable<?> requestVersion, ServerWebExchange exchan
108108
109109 @ Override
110110 public String toString () {
111- return "StandardApiDeprecationHandler " + this .infos .values ();
111+ return "StandardApiVersionDeprecationHandler " + this .infos .values ();
112112 }
113113
114114
@@ -121,7 +121,7 @@ public final class VersionSpec {
121121
122122 private VersionSpec (Comparable <?> version ) {
123123 this .version = version ;
124- StandardApiDeprecationHandler .this .infos .put (version , new VersionInfo (version ));
124+ StandardApiVersionDeprecationHandler .this .infos .put (version , new VersionInfo (version ));
125125 }
126126
127127 /**
@@ -197,7 +197,7 @@ public VersionSpec setSunsetLink(URI uri, MediaType mediaType) {
197197 }
198198
199199 private VersionSpec map (Function <VersionInfo , VersionInfo > function ) {
200- StandardApiDeprecationHandler .this .infos .compute (this .version , (version , versionInfo ) -> {
200+ StandardApiVersionDeprecationHandler .this .infos .compute (this .version , (version , versionInfo ) -> {
201201 Assert .state (versionInfo != null , "No VersionInfo" );
202202 return function .apply (versionInfo );
203203 });
0 commit comments