Skip to content

Commit

Permalink
[jakartaee#815] Indicate that JAXB is optional
Browse files Browse the repository at this point in the history
Signed-off-by: Andy McCright <[email protected]>
  • Loading branch information
andymc12 committed Mar 10, 2020
1 parent db36433 commit 7cc756c
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 13 deletions.
11 changes: 9 additions & 2 deletions jaxrs-api/src/main/java/jakarta/ws/rs/core/Link.java
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
*/
Expand Down Expand Up @@ -538,6 +542,9 @@ public int hashCode() {
* }
* </pre>
*
* 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
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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/
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -12,3 +12,4 @@
=== Changes Since 2.2-SNAPSHOT

* Referencing Jakarta EE instead of Java EE
* JAXB API is now optional
12 changes: 11 additions & 1 deletion jaxrs-spec/src/main/asciidoc/chapters/environment/_javaee.adoc
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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)
<<bib21>>, 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

Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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 <<jaxb>>.

[[context_media_type]]
==== Declaring Media Type Capabilities

Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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<String,String>`::
Form content (`application/x-www-form-urlencoded`).
`StreamingOutput`::
Expand All @@ -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 <<jsonp>> and <<jsonb>>.
also include those for JSON or XML. For more information about these providers
see <<jsonp>>, <<jsonb>> and <<jaxb>>.

When reading zero-length message entities all pre-packaged
`MessageBodyReader` implementations, except the JAXB one and those for
Expand Down

0 comments on commit 7cc756c

Please sign in to comment.