Fix #631 - Typo in documentation

This commit is contained in:
James Agnew 2017-05-01 15:31:11 -04:00
parent 2a89ff88f7
commit 15952c22dc
1 changed files with 119 additions and 119 deletions

View File

@ -1,119 +1,119 @@
<?xml version="1.0" encoding="UTF-8"?>
<document xmlns="http://maven.apache.org/XDOC/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">
<properties>
<title>ETags</title>
<author email="jamesagnew@users.sourceforge.net">James Agnew</author>
</properties>
<body>
<!-- The body of the document contains a number of sections -->
<section name="ETags and Version Aware Operations">
<p>
HAPI provides support for
<a href="http://en.wikipedia.org/wiki/HTTP_ETag">HTTP ETags</a>, which are
a standard way of providing faster reads when content has not changed and
optimistic locking for updates.
</p>
</section>
<section name="Client Side ETags">
<p>
ETag features are added simply by adding fluent method calls to the
client method chain, as shown in the following examples.
</p>
<a name="client_read"/>
<subsection name="Read / VRead">
<p>
To notify the server that it should return an <code>HTTP 301 Not Modified</code>
if the content has not changed, add an <code>ifVersionMatches(foo).[operation]</code>
invocation.
</p>
<macro name="snippet">
<param name="id" value="etagread" />
<param name="file" value="examples/src/main/java/example/GenericClientExample.java" />
</macro>
<p>
This method will add the following header to the request:
</p>
<source>If-None-Match: "001"</source>
</subsection>
<a name="client_update"/>
<subsection name="Update">
<p>
To implement version aware updates, specify a version in the
request. This will notify the server that it should only update the
resource on the server if the version matches the given version. This
is useful to prevent two clients from attempting to modify the
resource at the same time, and having one client's updates overwrite
the other's.
</p>
<macro name="snippet">
<param name="id" value="etagupdate" />
<param name="file" value="examples/src/main/java/example/GenericClientExample.java" />
</macro>
<p>
The following header will be added to the request as a part of this
interaction.
</p>
<source>If-Match: "001"</source>
</subsection>
</section>
<section name="Server Side ETags">
<p>
ETag support is automatically enabled in the RESTful server.
This has the following effects:
</p>
<ul>
<li>
<a href="./doc_rest_operations.html#instance_read">Read</a>/<a href="./doc_rest_operations.html#instance_vread">VRead</a>
method responses will include an
<a href="http://en.wikipedia.org/wiki/HTTP_ETag">ETag</a> header, noting the version
being returned.
</li>
<li>
If an incoming Read method includes an <code>If-None-Match</code> header with
the same version as the latest version being returned, the server will automatically
return an <code>HTTP 304 Not Modified</code> instead of returning the
resource body.
</li>
</ul>
<subsection name="Disabling ETag Support">
<p>
To disable ETag support, simply invoke the
<code>setETagSupport</code> method, as in the following example.
</p>
<macro name="snippet">
<param name="id" value="disablingETags" />
<param name="file" value="examples/src/main/java/example/ServerETagExamples.java" />
</macro>
</subsection>
</section>
</body>
</document>
<?xml version="1.0" encoding="UTF-8"?>
<document xmlns="http://maven.apache.org/XDOC/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">
<properties>
<title>ETags</title>
<author email="jamesagnew@users.sourceforge.net">James Agnew</author>
</properties>
<body>
<!-- The body of the document contains a number of sections -->
<section name="ETags and Version Aware Operations">
<p>
HAPI provides support for
<a href="http://en.wikipedia.org/wiki/HTTP_ETag">HTTP ETags</a>, which are
a standard way of providing faster reads when content has not changed and
optimistic locking for updates.
</p>
</section>
<section name="Client Side ETags">
<p>
ETag features are added simply by adding fluent method calls to the
client method chain, as shown in the following examples.
</p>
<a name="client_read"/>
<subsection name="Read / VRead">
<p>
To notify the server that it should return an <code>HTTP 304 Not Modified</code>
if the content has not changed, add an <code>ifVersionMatches(foo).[operation]</code>
invocation.
</p>
<macro name="snippet">
<param name="id" value="etagread" />
<param name="file" value="examples/src/main/java/example/GenericClientExample.java" />
</macro>
<p>
This method will add the following header to the request:
</p>
<source>If-None-Match: "001"</source>
</subsection>
<a name="client_update"/>
<subsection name="Update">
<p>
To implement version aware updates, specify a version in the
request. This will notify the server that it should only update the
resource on the server if the version matches the given version. This
is useful to prevent two clients from attempting to modify the
resource at the same time, and having one client's updates overwrite
the other's.
</p>
<macro name="snippet">
<param name="id" value="etagupdate" />
<param name="file" value="examples/src/main/java/example/GenericClientExample.java" />
</macro>
<p>
The following header will be added to the request as a part of this
interaction.
</p>
<source>If-Match: "001"</source>
</subsection>
</section>
<section name="Server Side ETags">
<p>
ETag support is automatically enabled in the RESTful server.
This has the following effects:
</p>
<ul>
<li>
<a href="./doc_rest_operations.html#instance_read">Read</a>/<a href="./doc_rest_operations.html#instance_vread">VRead</a>
method responses will include an
<a href="http://en.wikipedia.org/wiki/HTTP_ETag">ETag</a> header, noting the version
being returned.
</li>
<li>
If an incoming Read method includes an <code>If-None-Match</code> header with
the same version as the latest version being returned, the server will automatically
return an <code>HTTP 304 Not Modified</code> instead of returning the
resource body.
</li>
</ul>
<subsection name="Disabling ETag Support">
<p>
To disable ETag support, simply invoke the
<code>setETagSupport</code> method, as in the following example.
</p>
<macro name="snippet">
<param name="id" value="disablingETags" />
<param name="file" value="examples/src/main/java/example/ServerETagExamples.java" />
</macro>
</subsection>
</section>
</body>
</document>