You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by bu...@apache.org on 2015/10/06 13:39:58 UTC

svn commit: r967936 - in /websites/staging/olingo/trunk/content: ./ doc/odata4/tutorials/action/tutorial_action.html

Author: buildbot
Date: Tue Oct  6 11:39:58 2015
New Revision: 967936

Log:
Staging update by buildbot for olingo

Modified:
    websites/staging/olingo/trunk/content/   (props changed)
    websites/staging/olingo/trunk/content/doc/odata4/tutorials/action/tutorial_action.html

Propchange: websites/staging/olingo/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Tue Oct  6 11:39:58 2015
@@ -1 +1 @@
-1707001
+1707007

Modified: websites/staging/olingo/trunk/content/doc/odata4/tutorials/action/tutorial_action.html
==============================================================================
--- websites/staging/olingo/trunk/content/doc/odata4/tutorials/action/tutorial_action.html (original)
+++ websites/staging/olingo/trunk/content/doc/odata4/tutorials/action/tutorial_action.html Tue Oct  6 11:39:58 2015
@@ -236,14 +236,14 @@ This action takes an optional parameter
 </pre></div>
 
 
-<p>The way to announce the operations is very similar to announcing EntityTypes. We have to override some methods. Those methods provides the definition of the Edm elements. We need methods for:</p>
+<p>The way to announce the operations is very similar to announcing EntityTypes. We have to override some methods. Those methods provide the definition of the Edm elements. We need methods for:</p>
 <ul>
 <li>Actions</li>
 <li>Functions</li>
 <li>Action Imports</li>
 <li>Function Imports</li>
 </ul>
-<p>The code is simple and straight forward. First, we check which function we have to return. Then, a list of parameters and the return type are created. At the end the fit all parts together and return a new <em>CsdlFunction</em> Object.</p>
+<p>The code is simple and straight forward. First, we check which function we have to return. Then, a list of parameters and the return type are created. At the end all parts are fit together and get returned as new <em>CsdlFunction</em> Object.</p>
 <div class="codehilite"><pre><span class="nd">@Override</span>
 <span class="kd">public</span> <span class="n">List</span><span class="o">&lt;</span><span class="n">CsdlFunction</span><span class="o">&gt;</span> <span class="n">getFunctions</span><span class="o">(</span><span class="kd">final</span> <span class="n">FullQualifiedName</span> <span class="n">functionName</span><span class="o">)</span> <span class="o">{</span>
     <span class="k">if</span> <span class="o">(</span><span class="n">functionName</span><span class="o">.</span><span class="na">equals</span><span class="o">(</span><span class="n">FUNCTION_COUNT_CATEGORIES_FQN</span><span class="o">))</span> <span class="o">{</span>
@@ -335,7 +335,7 @@ This action takes an optional parameter
 </pre></div>
 
 
-<p>The last thing to do is we have to announce these operations to the schema and the entity container.
+<p>Finally we have to announce these operations to the schema and the entity container.
 Add the following lines to the method <em>getSchemas()</em>:</p>
 <div class="codehilite"><pre><span class="c1">// add actions</span>
 <span class="n">List</span><span class="o">&lt;</span><span class="n">CsdlAction</span><span class="o">&gt;</span> <span class="n">actions</span> <span class="o">=</span> <span class="k">new</span> <span class="n">ArrayList</span><span class="o">&lt;</span><span class="n">CsdlAction</span><span class="o">&gt;();</span>
@@ -461,7 +461,7 @@ A cleverer implementation can handle bot
 </pre></div>
 
 
-<p>Like by reading entity collections, the first step is to analyze the URI and read the data of the function import.</p>
+<p>Like reading entity collections, the first step are analyze the URI and read the data (of the function import).</p>
 <div class="codehilite"><pre><span class="kd">private</span> <span class="kt">void</span> <span class="nf">readFunctionImportCollection</span><span class="o">(</span><span class="kd">final</span> <span class="n">ODataRequest</span> <span class="n">request</span><span class="o">,</span> <span class="kd">final</span> <span class="n">ODataResponse</span> <span class="n">response</span><span class="o">,</span> 
     <span class="kd">final</span> <span class="n">UriInfo</span> <span class="n">uriInfo</span><span class="o">,</span> <span class="kd">final</span> <span class="n">ContentType</span> <span class="n">responseFormat</span><span class="o">)</span> <span class="kd">throws</span> <span class="n">ODataApplicationException</span><span class="o">,</span> <span class="n">SerializerException</span> <span class="o">{</span>
 
@@ -479,7 +479,7 @@ A cleverer implementation can handle bot
 </pre></div>
 
 
-<p>Then the result has to be serialized. The only difference to entity sets if the way how the Edm Entity Type is determined.</p>
+<p>Then the result has to be serialized. The only difference to entity sets is the way how the Edm Entity Type is determined.</p>
 <div class="codehilite"><pre>    <span class="c1">// 2nd step: Serialize the response entity</span>
     <span class="kd">final</span> <span class="n">EdmEntityType</span> <span class="n">edmEntityType</span> <span class="o">=</span> <span class="o">(</span><span class="n">EdmEntityType</span><span class="o">)</span> <span class="n">uriResourceFunction</span><span class="o">.</span><span class="na">getFunction</span><span class="o">().</span><span class="na">getReturnType</span><span class="o">().</span><span class="na">getType</span><span class="o">();</span>
     <span class="kd">final</span> <span class="n">ContextURL</span> <span class="n">contextURL</span> <span class="o">=</span> <span class="n">ContextURL</span><span class="o">.</span><span class="na">with</span><span class="o">().</span><span class="na">asCollection</span><span class="o">().</span><span class="na">type</span><span class="o">(</span><span class="n">edmEntityType</span><span class="o">).</span><span class="na">build</span><span class="o">();</span>
@@ -589,7 +589,7 @@ A cleverer implementation can handle bot
 </pre></div>
 
 
-<p>Execute the action and set the response code</p>
+<p>Execute the action and set the response code.</p>
 <div class="codehilite"><pre>    <span class="c1">// The parameter amount is nullable</span>
     <span class="k">if</span><span class="o">(</span><span class="n">parameterAmount</span><span class="o">.</span><span class="na">isNull</span><span class="o">())</span> <span class="o">{</span>
         <span class="n">storage</span><span class="o">.</span><span class="na">resetDataSet</span><span class="o">();</span>