From 7cc756c904700531e725c9baea8b0164620df4e5 Mon Sep 17 00:00:00 2001 From: Andy McCright Date: Tue, 10 Mar 2020 15:32:33 -0500 Subject: [PATCH] [#815] Indicate that JAXB is optional Signed-off-by: Andy McCright --- jaxrs-api/src/main/java/jakarta/ws/rs/core/Link.java | 11 +++++++++-- .../asciidoc/chapters/appendix/_bibliography.adoc | 7 +++++-- .../appendix/_changes-since-2.2-snapshot.adoc | 3 ++- .../main/asciidoc/chapters/environment/_javaee.adoc | 12 +++++++++++- .../chapters/providers/_contextprovider.adoc | 5 ++++- .../chapters/providers/_entity_providers.adoc | 9 +++------ 6 files changed, 34 insertions(+), 13 deletions(-) diff --git a/jaxrs-api/src/main/java/jakarta/ws/rs/core/Link.java b/jaxrs-api/src/main/java/jakarta/ws/rs/core/Link.java index bf8a32522..d58123f3a 100644 --- a/jaxrs-api/src/main/java/jakarta/ws/rs/core/Link.java +++ b/jaxrs-api/src/main/java/jakarta/ws/rs/core/Link.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -404,8 +404,12 @@ public interface Builder { } /** - * Value type for {@link jakarta.ws.rs.core.Link} that can be marshalled and unmarshalled by JAXB. + * Value type for {@link jakarta.ws.rs.core.Link} that can be marshalled and + * unmarshalled by JAXB. * + * Note that usage of this class requires the Jakarta XML Binding API and an implementation. The Jakarta RESTful Web + * Services implementation is not required to provide these dependencies. + * * @see jakarta.ws.rs.core.Link.JaxbAdapter * @since 2.0 */ @@ -538,6 +542,9 @@ public int hashCode() { * } * * + * Note that usage of this class requires the Jakarta XML Binding API and an implementation. The Jakarta RESTful Web + * Services implementation is not required to provide these dependencies. + * * @see jakarta.ws.rs.core.Link.JaxbLink * @since 2.0 */ diff --git a/jaxrs-spec/src/main/asciidoc/chapters/appendix/_bibliography.adoc b/jaxrs-spec/src/main/asciidoc/chapters/appendix/_bibliography.adoc index 3a6025b21..d6926fabf 100644 --- a/jaxrs-spec/src/main/asciidoc/chapters/appendix/_bibliography.adoc +++ b/jaxrs-spec/src/main/asciidoc/chapters/appendix/_bibliography.adoc @@ -1,6 +1,6 @@ //// ******************************************************************* -* Copyright (c) 2019 Eclipse Foundation +* Copyright (c) 2019, 2020 Eclipse Foundation * * This specification document is made available under the terms * of the Eclipse Foundation Specification License v1.0, which is @@ -67,4 +67,7 @@ https://jakarta.ee/specifications/jsonb/1.0 - [[[bib20,20]]] Jakarta Activation, Version 1.2 - https://jakarta.ee/specifications/activation/1.2/. + https://jakarta.ee/specifications/activation/1.2/ + +- [[[bib21,21]]] Jakarta XML Binding, Version 3.0 + https://jakarta.ee/specifications/xml-binding/3.0/ diff --git a/jaxrs-spec/src/main/asciidoc/chapters/appendix/_changes-since-2.2-snapshot.adoc b/jaxrs-spec/src/main/asciidoc/chapters/appendix/_changes-since-2.2-snapshot.adoc index f0895064a..871582ecc 100644 --- a/jaxrs-spec/src/main/asciidoc/chapters/appendix/_changes-since-2.2-snapshot.adoc +++ b/jaxrs-spec/src/main/asciidoc/chapters/appendix/_changes-since-2.2-snapshot.adoc @@ -1,6 +1,6 @@ //// ******************************************************************* -* Copyright (c) 2019 Eclipse Foundation +* Copyright (c) 2019, 2020 Eclipse Foundation * * This specification document is made available under the terms * of the Eclipse Foundation Specification License v1.0, which is @@ -12,3 +12,4 @@ === Changes Since 2.2-SNAPSHOT * Referencing Jakarta EE instead of Java EE +* JAXB API is now optional diff --git a/jaxrs-spec/src/main/asciidoc/chapters/environment/_javaee.adoc b/jaxrs-spec/src/main/asciidoc/chapters/environment/_javaee.adoc index e00a919fe..fa7256025 100644 --- a/jaxrs-spec/src/main/asciidoc/chapters/environment/_javaee.adoc +++ b/jaxrs-spec/src/main/asciidoc/chapters/environment/_javaee.adoc @@ -1,6 +1,6 @@ //// ******************************************************************* -* Copyright (c) 2019 Eclipse Foundation +* Copyright (c) 2019, 2020 Eclipse Foundation * * This specification document is made available under the terms * of the Eclipse Foundation Specification License v1.0, which is @@ -190,6 +190,16 @@ Note that if JSON-B and JSON-P are both supported in the same environment, entity providers for JSON-B take precedence over those for JSON-P for all types except `JsonValue` and its sub-types. +[[jaxb]] +==== Jakarta XML Binding + +In a product that supports the Jakarta XML Binding API (JAXB) +<>, implementations MUST support entity providers for the type, +`jakarta.xml.bind.JAXBElement`, and application-supplied JAXB classes +in combination with the following XML-based media types: +`text/xml` and `application/xml` and media types of the +form `application/*+xml`. + [[additional_reqs]] ==== Additional Requirements diff --git a/jaxrs-spec/src/main/asciidoc/chapters/providers/_contextprovider.adoc b/jaxrs-spec/src/main/asciidoc/chapters/providers/_contextprovider.adoc index 11d16243c..623e1d55f 100644 --- a/jaxrs-spec/src/main/asciidoc/chapters/providers/_contextprovider.adoc +++ b/jaxrs-spec/src/main/asciidoc/chapters/providers/_contextprovider.adoc @@ -1,6 +1,6 @@ //// ******************************************************************* -* Copyright (c) 2019 Eclipse Foundation +* Copyright (c) 2019, 2020 Eclipse Foundation * * This specification document is made available under the terms * of the Eclipse Foundation Specification License v1.0, which is @@ -24,6 +24,9 @@ JAXB context provider may wish to only provide the context for certain JAXB classes. Context providers MAY also manage multiple contexts of the same type keyed to different Java types. +Note that a context provider for JAXB is only applicable in products that +support <>. + [[context_media_type]] ==== Declaring Media Type Capabilities diff --git a/jaxrs-spec/src/main/asciidoc/chapters/providers/_entity_providers.adoc b/jaxrs-spec/src/main/asciidoc/chapters/providers/_entity_providers.adoc index 72897b141..f81dfe4d3 100644 --- a/jaxrs-spec/src/main/asciidoc/chapters/providers/_entity_providers.adoc +++ b/jaxrs-spec/src/main/asciidoc/chapters/providers/_entity_providers.adoc @@ -1,6 +1,6 @@ //// ******************************************************************* -* Copyright (c) 2019 Eclipse Foundation +* Copyright (c) 2019, 2020 Eclipse Foundation * * This specification document is made available under the terms * of the Eclipse Foundation Specification License v1.0, which is @@ -143,9 +143,6 @@ type combinations: `jakarta.xml.transform.Source`:: XML types (`text/xml`, `application/xml` and media types of the form `application/*+xml`). -`jakarta.xml.bind.JAXBElement` and application-supplied JAXB classes:: - XML types (`text/xml` and `application/xml` and media types of the - form `application/*+xml`). `MultivaluedMap`:: Form content (`application/x-www-form-urlencoded`). `StreamingOutput`:: @@ -155,8 +152,8 @@ type combinations: boxing/unboxing conversion. Depending on the environment, the list of standard entity providers MUST -also include those for JSON. For more information about these providers -see <> and <>. +also include those for JSON or XML. For more information about these providers +see <>, <> and <>. When reading zero-length message entities all pre-packaged `MessageBodyReader` implementations, except the JAXB one and those for