Author: mibo
Date: Tue May 19 11:26:23 2015
New Revision: 1680253
URL: http://svn.apache.org/r1680253
Log:
Added TOC
Modified:
olingo/site/trunk/content/doc/odata4/tutorials/write/tutorial_write.mdtext
Modified:
olingo/site/trunk/content/doc/odata4/tutorials/write/tutorial_write.mdtext
URL:
http://svn.apache.org/viewvc/olingo/site/trunk/content/doc/odata4/tutorials/write/tutorial_write.mdtext?rev=1680253&r1=1680252&r2=1680253&view=diff
==============================================================================
--- olingo/site/trunk/content/doc/odata4/tutorials/write/tutorial_write.mdtext
(original)
+++ olingo/site/trunk/content/doc/odata4/tutorials/write/tutorial_write.mdtext
Tue May 19 11:26:23 2015
@@ -28,13 +28,32 @@ In the first two tutorials ([Read Collec
In the present tutorial, will cover the write operations, which means creating
an entity, modifying an existing entity and deleting an existing entity.
-Note:
+
+**Note**
The full implementation of the OData service as described in the present
tutorial can be found in the [attached zip
file](/doc/odata4/tutorials/write/sample/DemoService_Tutorial_Write.zip)
([md5](/doc/odata4/tutorials/write/sample/DemoService_Tutorial_Write.zip.md5),
[sha512](/doc/odata4/tutorials/write/sample/DemoService_Tutorial_Write.zip.sha512),
[pgp](/doc/odata4/tutorials/write/sample/DemoService_Tutorial_Write.zip.asc))
that contains an Eclipse project that can be imported into your Eclipse
workspace.
-Disclaimer:
+
+**Disclaimer**
Again, in the present tutorial, will focus only on the relevant
implementation, in order to keep the code small and simple.
The sample code shouldn't be reused for advanced scenarios.
+
+**Table of Contents**
+
+ 1. Prerequisites
+ 1. Preparation
+ 1. Implementation of Read Single Entity
+ 1. Implement the `createEntity(...)` method
+ 1. Implement the `updateEntity(...)` method
+ 1. Implement the `deleteEntity(...)` method
+ 1. Run the implemented service
+ 1. Example for **CREATE**
+ 1. Example for **UPDATE (PUT)**
+ 1. Example for **UPDATE (PATCH)**
+ 1. Example for **DELETE**
+ 1. Summary
+ 1. Links
+
---
# 1. Prerequisites
@@ -300,20 +319,27 @@ The implementation is rather simple:
-## 3.4. Run the service
+# 4. Run the service
After building and deploying the project, we can invoke our OData service.
-In order to test the write operations of our OData service, we need a tool
that is able to execute the following required HTTP requests: **POST**,
**PUT**, **PATCH**, **DELETE**
+In order to test the write operations of our OData service, we need a tool
that is able to execute the following required HTTP requests:
+
+ - **POST**
+ - **PUT**
+ - **PATCH**
+ - **DELETE**
+
This is usually done with any REST client tool that can be installed into the
browser of your choice.
-Examples:
- - Firefox: âRESTClient, a debugger for RESTful web servicesâ
- - Chrome: âAdvanced REST clientâ
+Some *REST* clients which are available as browser extension for:
+
+ - Firefox: âRESTClient, a debugger for RESTful web servicesâ
+ - Chrome: âAdvanced REST clientâ
The following sections provide examples for executing the requests:
-### 3.4.1. Example for **CREATE**:
+### 4.1. Example for **CREATE**:
- URL: <http://localhost:8080/DemoService/DemoService.svc/Products>
- HTTP verb: **POST**
@@ -327,12 +353,10 @@ The following sections provide examples
"Description":"optical mouse - gamer edition"
}
-
-Note:
-The value for the ID property is arbitrary, as it will be generated by our
OData service implementation
+ **Note:** The value for the ID property is arbitrary, as it will be
generated by our OData service implementation
-### 3.4.2. Example for UPDATE (PUT):
+### 4.2. Example for UPDATE (PUT):
- URL: <http://localhost:8080/DemoService/DemoService.svc/Products(3)>
- HTTP verb: **PUT**
@@ -348,7 +372,7 @@ The value for the ID property is arbitra
-### 3.4.3. Example for UPDATE (PATCH):
+### 4.3. Example for UPDATE (PATCH):
- URL: <http://localhost:8080/DemoService/DemoService.svc/Products(3)>
- HTTP verb: **PATCH**
@@ -361,7 +385,7 @@ The value for the ID property is arbitra
}
-###3.4.4. Example for DELETE:
+### 4.4. Example for DELETE:
- URL: <http://localhost:8080/DemoService/DemoService.svc/Products(3)>
- HTTP verb: **DELETE**
@@ -370,7 +394,7 @@ The value for the ID property is arbitra
---
-# 4. Summary
+# 5. Summary
In this tutorial we have learned how to implement the creation, update and
deletion of an entity.
It has been based on a simple OData model, focusing on simple sample code and
sample data.
@@ -379,12 +403,12 @@ In the next tutorial (Part 4: Navigation
---
-# 5. Links
+# 6. Links
Tutorial OData V4 service part 1: [Read Entity
Collection](/doc/odata4/tutorials/read/tutorial_read.html) | [sample project
zip](/doc/odata4/tutorials/read/sample/DemoService_Tutorial_Read.zip)
Tutorial OData V4 service part 2: [Read Entity, Read
Property](/doc/odata4/tutorials/readep/tutorial_readep.html) | [sample project
zip](/doc/odata4/tutorials/readep/sample/DemoService_Tutorial_Readep.zip)
Tutorial OData V4 service part 3: [Write (Create, Update, Delete Entity) -
(this page)](/doc/odata4/tutorials/write/tutorial_write.html) | [sample project
zip](/doc/odata4/tutorials/write/sample/DemoService_Tutorial_Write.zip)
-Tutorial OData V4 service, part 4: [Navigation - (To Be Announced)](...)
+Tutorial OData V4 service part 4: [Navigation - (To Be Announced)](...)
OData specification: <http://odata.org/>
Olingo Javadoc:
[http://olingo.apache.org/javadoc/odata4/index.html](/javadoc/odata4/index.html)