Author: buildbot
Date: Mon Apr 18 19:57:08 2016
New Revision: 986023
Log:
Staging update by buildbot for olingo
Modified:
websites/staging/olingo/trunk/content/ (props changed)
websites/staging/olingo/trunk/content/doc/odata2/tutorials/Olingo_Tutorial_Advanced_Service_Resolution.html
Propchange: websites/staging/olingo/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Mon Apr 18 19:57:08 2016
@@ -1 +1 @@
-1737841
+1739813
Modified:
websites/staging/olingo/trunk/content/doc/odata2/tutorials/Olingo_Tutorial_Advanced_Service_Resolution.html
==============================================================================
---
websites/staging/olingo/trunk/content/doc/odata2/tutorials/Olingo_Tutorial_Advanced_Service_Resolution.html
(original)
+++
websites/staging/olingo/trunk/content/doc/odata2/tutorials/Olingo_Tutorial_Advanced_Service_Resolution.html
Mon Apr 18 19:57:08 2016
@@ -101,9 +101,9 @@ h2:hover > .headerlink, h3:hover > .head
<h1 id="service-resolution">Service Resolution<a class="headerlink"
href="#service-resolution" title="Permanent link">¶</a></h1>
<p>An OData service usually starts with "/" which delivers the service
document while all preceding path segments belong to the servlet and servlet
mapping of a web application.</p>
<p>Some service providers would like to get control over the path hierarchy.
This is called service resolution. Actually it means an OData path can start at
any hierarchy path level behind the service mapping path elements.</p>
-<p>An uri schema with and without service resolution is shown here: </p>
+<p>An uri schema with and without service resolution is shown here:</p>
<p><img alt="Picture: Service Resolution"
src="/img/service-resolution-url.png" /></p>
-<p>A service init parameter (<code>org.apache.olingo.odata2.path.split</code>)
can be set for servlet configuration (see web.xml) and define how many path
segments are not interpreted as OData path segments. In the example the split
value is 2 and the resulting service resolution uses two path segments. The
first one is for <namespace> and the secound for <service>. </p>
+<p>A service init parameter (<code>org.apache.olingo.odata2.path.split</code>)
can be set for servlet configuration (see web.xml) and define how many path
segments are not interpreted as OData path segments. In the example the split
value is 2 and the resulting service resolution uses two path segments. The
first one is for <namespace> and the secound for <service>.</p>
<div class="codehilite"><pre><span
class="cp"><?xmlversion="1.0"encoding="UTF-8"?></span>
<span class="nt"><web-appxmlns:xsi</span><span
class="err">="http://www.w3.org/2001/XMLSchema-instance"</span>
<span class="na">xmlns=</span><span
class="s">"http://java.sun.com/xml/ns/javaee"</span><span
class="na">xmlns:web=</span><span
class="s">"http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"</span>
@@ -138,7 +138,7 @@ h2:hover > .headerlink, h3:hover > .head
</pre></div>
-<p>A processor implementation (e.g. <code>ODataSingleProcessor</code>) does
have access to an <code>ODataContext</code> object which will deliver a
<code>ODataUriInfo</code> object. From this class a processor implementation
can access the service resolution information which is as following: </p>
+<p>A processor implementation (e.g. <code>ODataSingleProcessor</code>) does
have access to an <code>ODataContext</code> object which will deliver a
<code>ODataUriInfo</code> object. From this class a processor implementation
can access the service resolution information which is as following:</p>
<ul>
<li>URI:
<em>http://localhost:8080/odata.svc/[namespace]/[system]/Room('1')/Size/$value</em>
</li>
<li>preceding path segments: <em>[namespace], [system]</em> </li>
@@ -148,13 +148,14 @@ h2:hover > .headerlink, h3:hover > .head
<p><strong>Sample Code</strong></p>
<div class="codehilite"><pre><span class="n">public</span> <span
class="n">interface</span> <span class="n">ODataContext</span> <span
class="p">{</span>
<span class="n">ODataService</span> <span class="n">getService</span><span
class="p">()</span> <span class="n">throws</span> <span
class="n">ODataException</span><span class="p">;</span>
- <span class="n">ODataUriInfo</span> <span class="n">getUriInfo</span><span
class="p">()</span> <span class="n">throws</span> <span
class="n">ODataException</span><span class="p">;</span>
+ <span class="n">PathInfo</span> <span class="n">getPathInfo</span><span
class="p">()</span> <span class="n">throws</span> <span
class="n">ODataException</span><span class="p">;</span>
<span class="p">}</span>
-<span class="n">public</span> <span class="n">interface</span> <span
class="n">ODataUriInfo</span> <span class="p">{</span>
- <span class="n">List</span><span class="o"><</span><span
class="n">ODataPathSegment</span><span class="o">></span> <span
class="n">getPrecedingPathSegmentList</span><span class="p">();</span>
- <span class="n">List</span><span class="o"><</span><span
class="n">ODataPathSegment</span><span class="o">></span> <span
class="n">getODataPathSegmentList</span><span class="p">();</span>
- <span class="n">URI</span> <span class="n">getBaseUri</span><span
class="p">();</span>
+<span class="n">public</span> <span class="n">interface</span> <span
class="n">PathInfo</span> <span class="p">{</span>
+ <span class="n">List</span><span class="o"><</span><span
class="n">PathSegment</span><span class="o">></span> <span
class="n">getPrecedingSegments</span><span class="p">();</span>
+ <span class="n">List</span><span class="o"><</span><span
class="n">PathSegment</span><span class="o">></span> <span
class="n">getODataSegments</span><span class="p">();</span>
+ <span class="n">URI</span> <span class="n">getServiceRoot</span><span
class="p">();</span>
+ <span class="n">URI</span> <span class="n">getRequestUri</span><span
class="p">();</span>
<span class="p">}</span>
</pre></div><div align="center">
<p>Copyright © 2013-2015, The Apache Software Foundation<br>