Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor modification on documentation chapter #4408

Merged
merged 4 commits into from
Mar 26, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/src/main/docbook/async.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!--

Copyright (c) 2012, 2018 Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2012, 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 @@ -224,7 +224,7 @@ public class AsyncResource {
multiple callbacks using varags.
</para>
<para>
As some async requests may take long time to process the client may decide to terminate it's connection to the
As some async requests may take long time to process the client may decide to terminate its connection to the
server before the response has been resumed or before it has been fully written to the client. To deal with these
use cases a &lit.jaxrs.container.ConnectionCallback; can be used. This callback will be executed only if the
connection was prematurely terminated or lost while the response is being written to the back client. Note that
Expand Down
6 changes: 3 additions & 3 deletions docs/src/main/docbook/bean-validation.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!--

Copyright (c) 2013, 2018 Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2013, 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 @@ -84,8 +84,8 @@

<para>
As stated in <xref linkend="deployment.autodiscoverable"/>, Jersey Bean Validation is one of the modules where you
don't need to explicitly register it's &lit.jaxrs.core.Feature;s (&jersey.ext.ValidationFeature;) on the
server as it's features are automatically discovered and registered when you add the
don't need to explicitly register its &lit.jaxrs.core.Feature;s (&jersey.ext.ValidationFeature;) on the
server as its features are automatically discovered and registered when you add the
&lit.jersey-bean-validation; module to your classpath.
There are three Jersey specific properties that could disable automatic discovery and registration of Jersey Bean
Validation integration module:
Expand Down
10 changes: 5 additions & 5 deletions docs/src/main/docbook/client.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!--

Copyright (c) 2010, 2018 Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2010, 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 @@ -233,7 +233,7 @@ target.request(MediaType.APPLICATION_JSON_TYPE)
</title>

<para>
JAX-RS Client API is a designed to allow fluent programming model. This means, a construction of a
JAX-RS Client API is designed to allow fluent programming model. This means, a construction of a
&lit.jaxrs.client.Client; instance, from which a &lit.jaxrs.client.WebTarget; is created, from which a
request &jaxrs.client.Invocation; is built and invoked can be chained in a single "flow" of invocations.
The individual steps of the flow will be shown in the following sections.
Expand Down Expand Up @@ -345,7 +345,7 @@ Configuration newConfiguration = client.getConfiguration();</programlisting>
webTarget.register(FilterForExampleCom.class);</programlisting>

The configuration principles used in JAX-RS client API apply to &lit.jaxrs.client.WebTarget; as well. Each
&lit.jaxrs.client.WebTarget; instance inherits a configuration from it's parent (either a client or another
&lit.jaxrs.client.WebTarget; instance inherits a configuration from its parent (either a client or another
web target) and can be further custom-configured without affecting the configuration of the parent component.
In this case, the <literal>FilterForExampleCom</literal> will be registered only in the
<literal>webTarget</literal> and not in <literal>client</literal>. So, the <literal>client</literal>
Expand Down Expand Up @@ -739,7 +739,7 @@ webTarget.request().post(Entity.entity(f, MediaType.TEXT_PLAIN_TYPE));
clientConfig.connectorProvider(new GrizzlyConnectorProvider());
Client client = ClientBuilder.newClient(clientConfig);</programlisting>

&lit.jaxrs.client.Client; accepts as as a constructor argument a &lit.jaxrs.core.Configurable; instance. Jersey
&lit.jaxrs.client.Client; accepts as a constructor argument a &lit.jaxrs.core.Configurable; instance. Jersey
implementation of the &lit.jaxrs.core.Configurable; provider for the client is &lit.jersey.client.ClientConfig;.
By using the Jersey &lit.jersey.client.ClientConfig; you can configure the custom
&lit.jersey.client.ConnectorProvider;
Expand Down Expand Up @@ -965,7 +965,7 @@ Client client = ClientBuilder.newBuilder().sslContext(sslContext).build();</prog
<emphasis>UNIVERSAL:</emphasis> Combination of basic and digest authentication. The feature works in non-preemptive
mode which means that it sends requests without authentication information. If <literal>401</literal> status
code is returned, the request is repeated and an appropriate authentication is used based on the
authentication requested in the response (defined in <literal>WWW-Authenticate</literal> HTTP header. The feature
authentication requested in the response (defined in <literal>WWW-Authenticate</literal> HTTP header). The feature
remembers which authentication requests were successful for given URI and next time tries to preemptively
authenticate against this URI with latest successful authentication method.
</para>
Expand Down
6 changes: 3 additions & 3 deletions docs/src/main/docbook/declarative-linking.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--

Copyright (c) 2010, 2018 Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2010, 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 @@ -98,7 +98,7 @@ public class Widgets {
}</programlisting>

<para>
After a call to<literal>WidgetsResource#get</literal>, the Jersey runtime will inject the value
After a call to <literal>WidgetsResource#get</literal>, the Jersey runtime will inject the value
<literal>"/context/widgets"</literal>
<footnote>
<para>
Expand Down Expand Up @@ -143,7 +143,7 @@ List&lt;Link&gt; links</programlisting>
<para>
The <literal>@ProvideLink</literal> annotation can be repeated to add links to different entities using different
options. Entities are defined via the <literal>value</literal> property. If the entities are similar in structure they
can also declared as an array. <literal>@ProvideLink</literal> also works with class hierarchies, e.g., contributions
can also be declared as an array. <literal>@ProvideLink</literal> also works with class hierarchies, e.g., contributions
defined for a superclass will also be injected into the derived classes (interfaces are not supported).

<programlisting language="java">@ProvideLink(value = Order.class,rel = "self",
Expand Down
6 changes: 3 additions & 3 deletions docs/src/main/docbook/deployment.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!--

Copyright (c) 2013, 2019 Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2013, 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 @@ -73,7 +73,7 @@
<para>
Compared to &lit.jaxrs.core.Application;, the &lit.jersey.server.ResourceConfig; provides advanced capabilities
to simplify registration of JAX-RS components, such as scanning for root resource and provider classes in a provided
classpath or a in a set of package names etc. All JAX-RS component classes that are either manually registered or
classpath or a set of package names etc. All JAX-RS component classes that are either manually registered or
found during scanning are automatically added to the set of classes that are returned by
<literal>getClasses</literal>. For example, the following application class that extends from
&lit.jersey.server.ResourceConfig; scans during deployment for JAX-RS components in packages
Expand Down Expand Up @@ -1101,7 +1101,7 @@ public class StatelessEjbResource implements LocalEjb {
<para>
As explained in <link linkend="servlet-app-glassfish">2.3.1</link> , you don't need to add any specific
dependencies on GlassFish, Jersey is already packaged within GlassFish. You only need to add the
<literal>provided</literal>-scoped dependencies to you project to be able to compile it. At runtime,
<literal>provided</literal>-scoped dependencies to your project to be able to compile it. At runtime,
GlassFish will make sure that your application has access to the Jersey libraries.
</para>

Expand Down
14 changes: 7 additions & 7 deletions docs/src/main/docbook/entity-filtering.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!--

Copyright (c) 2013, 2018 Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2013, 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 @@ -217,7 +217,7 @@ final Client client = ClientClientBuilder.newClient(config);

<para>
In the next section the entity-filtering features will be illustrated on a project-tracking application that
contains three classes in it's domain model and few resources (only <literal>Project</literal> resource will be
contains three classes in its domain model and few resources (only <literal>Project</literal> resource will be
shown in this chapter). The full source code for the example application can be found in Jersey
&jersey.github.ef.example.link;.
</para>
Expand Down Expand Up @@ -493,9 +493,9 @@ public @interface ProjectDetailedView {
to all the child nodes. Fields and child nodes that do not match at least a single active scope are filtered out.
When the scope matching is performed, annotations applied to the domain model classes and fields
are used to compute the scope for each particular component of the model. If there are no annotations on the class
or it's fields, the default scope is assumed. During the filtering, first, the annotations on root model class
and it's fields are considered. For all composite fields that have not been filtered out, the annotations on the
referenced child class and it's fields are considered next, and so on.
or its fields, the default scope is assumed. During the filtering, first, the annotations on root model class
and its fields are considered. For all composite fields that have not been filtered out, the annotations on the
referenced child class and its fields are considered next, and so on.
</para>

<section>
Expand Down Expand Up @@ -625,7 +625,7 @@ public class ProjectsResource {
<para>
As mentioned above you can define applied entity-filtering scopes using a property set either in the client
run-time &lit.jaxrs.core.Configuration; (see <xref linkend="ef.example.client.registration"/>) or by
passing the entity-filtering annotations during a creation of an individual request to be sent to server.
passing the entity-filtering annotations during a creation of an individual request to be sent to the server.

<example>
<title>Client - Request entity-filtering annotations</title>
Expand Down Expand Up @@ -764,7 +764,7 @@ public class Address {
<itemizedlist>
<listitem>
<para>&jersey.message.filtering.EntityProcessor;</para>
<para>Implementations of this SPI are invoked to process entity class and it's members. Custom
<para>Implementations of this SPI are invoked to process entity class and its members. Custom
implementations can extend from &jersey.message.filtering.AbstractEntityProcessor;.</para>
</listitem>
<listitem>
Expand Down
8 changes: 4 additions & 4 deletions docs/src/main/docbook/filters.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!--

Copyright (c) 2012, 2018 Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2012, 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 @@ -513,7 +513,7 @@ public class GZIPWriterInterceptor implements WriterInterceptor {
it is annotated with &lit.jaxrs.NameBinding;. The <literal>@Compress</literal> is applied on the
resource method <literal>getVeryLongString()</literal> and on the interceptor
<literal>GZIPWriterInterceptor</literal>. The interceptor will be executed only if any resource method
with such a annotation will be executed. In our example case the interceptor will be executed only for
with such an annotation will be executed. In our example case the interceptor will be executed only for
the <literal>getVeryLongString()</literal> method. The interceptor will not be executed for method
<literal>getHello()</literal>. In this example the reason is probably clear. We would like to compress
only long data and we do not need to compress the short response of "Hello World!".
Expand All @@ -536,7 +536,7 @@ public class GZIPWriterInterceptor implements WriterInterceptor {
just an edge case which will not be used so often.
</para>
<para>
Note that <emphasis>global filters are executed always</emphasis>, so even for resource methods
Note that <emphasis>global filters are always executed</emphasis>, even for resource methods
which have any name binding annotations.
</para>
</section>
Expand Down Expand Up @@ -638,7 +638,7 @@ public class CompressionDynamicBinding implements DynamicFeature {
<para>
It's a good practice to assign a priority to filters and interceptors. Use &jaxrs.Priorities; class which
defines standardized priorities in JAX-RS for different usages, rather than inventing your
own priorities. So, when you for example write an authentication filter you would assign a priority 1000 which
own priorities. For example, when you write an authentication filter you would assign a priority 1000 which
is the value of &lit.jaxrs.Priorities;<literal>.AUTHENTICATION</literal>. The following example
shows the filter from the beginning
of this chapter with a priority assigned.
Expand Down
4 changes: 2 additions & 2 deletions docs/src/main/docbook/getting-started.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!--

Copyright (c) 2010, 2019 Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2010, 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 @@ -176,7 +176,7 @@ public class MyResourceTest {

In this unit test, a Grizzly container is first started and server application is deployed in the
test <literal>setUp()</literal> method by a static call to <literal>Main.startServer()</literal>.
Next, a JAX-RS client components are created in the same test set-up method. First a new JAX-RS client
Next, JAX-RS client components are created in the same test set-up method. First a new JAX-RS client
instance <literal>c</literal> is built and then a JAX-RS web target component pointing to the context root of our
application deployed at <literal>http://localhost:8080/myapp/</literal> (a value of
<literal>Main.BASE_URI</literal> constant) is stored into a <literal>target</literal> field of the unit test class.
Expand Down
4 changes: 2 additions & 2 deletions docs/src/main/docbook/jaxrs-resources.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!--

Copyright (c) 2010, 2019 Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2010, 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 @@ -612,7 +612,7 @@ public class PrintersResource {
<para>If the path of the request URL is "printers" then the resource methods not annotated with &jaxrs.Path;
will be selected. If the request path of the request URL is "printers/list" then first the root resource class
will be matched and then the sub-resource methods that match "list" will be selected, which in this case
is the sub-resource method<literal>getListOfPrinters</literal>. So, in this example hierarchical matching
is the sub-resource method <literal>getListOfPrinters</literal>. So, in this example hierarchical matching
on the path of the request URL is performed.
</para>

Expand Down
8 changes: 4 additions & 4 deletions docs/src/main/docbook/mbw.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!--

Copyright (c) 2012, 2018 Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2012, 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 @@ -416,7 +416,7 @@ public MyBean readFrom(Class<MyBean> type,
<literal>@Consumes("application/xml")</literal>,
therefore for purpose of de-serialization of entity for the <literal>postMyBean()</literal> method,
only requests with entities represented as <literal>"application/xml"</literal>
media type will match the method. However, this method might be executed for for entity types that are sub classes
media type will match the method. However, this method might be executed for entity types that are sub classes
or super classes of the declared generic type on the &lit.jaxrs.ext.MessageBodyReader; will be also considered.
It is a responsibility of the <literal>isReadable</literal> method to decide whether it is able
to de-serialize the entity and type comparison is one of the basic decision steps.
Expand Down Expand Up @@ -592,7 +592,7 @@ MyBean{anyString='Hello World!', anyNumber=42}]]></screen>
Determine the media type of the response.
</para>
<para>
In our case. for resource method <literal>getMyBean</literal>
In our case, for resource method <literal>getMyBean</literal>
annotated with <literal>@Produces("application/xml")</literal>, the media type will be
<literal>"application/xml"</literal>.
</para>
Expand Down Expand Up @@ -649,7 +649,7 @@ MyBean{anyString='Hello World!', anyNumber=42}]]></screen>
<stepalternatives>
<step>
<para>
Otherwise, the server runtime MUST generate a generate an
Otherwise, the server runtime MUST generate an
<literal>InternalServerErrorException</literal>, a subclass of
<literal>WebApplicationException</literal> with its status set to 500, and no entity and the client
runtime MUST generate a <literal>ProcessingException</literal>.
Expand Down
Loading