...
The Olingo2 component utilizes Apache Olingo version 2.0 APIs to interact with OData 2.0 and 3.0 compliant services. It supports reading feeds, delta feeds, entities, simple and complex properties, links, counts, using custom and OData system query parameters. It supports updating entities, properties, and association links. It also supports submitting queries and change requests as a single OData batch operation.
...
<complex
Simple property value
OData Resource Type |
Resource URI from resourcePath and keyPredicate |
In or Out Body Type |
Entity data model |
$metadata |
org.apache.olingo.odata2.api.edm.Edm |
Service document |
/ |
org.apache.olingo.odata2.api.servicedocument.ServiceDocument |
OData feed |
<entity-set> |
org.apache.olingo.odata2.api.ep.feed.ODataFeed |
OData entry |
<entity-set>(<key-predicate>) |
org.apache.olingo.odata2.api.ep.entry.ODataEntry |
Simple property |
<entity-set>(<key-predicate>)/<simple-property> |
Appropriate Java data type as described by Olingo EdmPropertyComplex |
Simple property value |
<entity-set>(<key-predicate>)/ |
<simple-property> |
java.util.Map<String, Object>
|
/$value |
Appropriate Java data type as described by Olingo EdmProperty |
Complex property |
<entity-set>(<key-predicate>)/<simple<complex-property>/$value |
Appropriate Java data type as described by Olingo EdmProperty |
Link |
java.util.Map<String, Object>
|
Zero or one association link |
<entity-set>(<key-predicate>/$link/<one-to-one-entity-set-property> |
String Links |
Zero or many association links |
<entity-set>(<key-predicate>/$link/<one-to-many-entity-set-property> |
java.util.List<String> |
Count |
<resource-uri>/$count |
java.lang.Long |
...
All result message bodies utilize objects provided by the underlying Apache Olingo 2.0 API used by the Olingo2Component. Producer endpoints can specify the option name for incoming message body in the inBody
endpoint URI parameter. For endpoints that return an array or collection, a consumer endpoint will map every element to distinct messages, unless consumer.splitResult is set to false.
Use cases
The following route reads top 5 entries from the Manufacturer feed ordered by ascending Name property.
The following route reads Manufacturer entry using the key property value in incoming id header.
from(
"direct:..."
)
.setHeader(
"CamelOlingo2.keyPredicate", header("id")
)
|
The following route creates Manufacturer entry using the Map<String, Object> in body message.
The following route polls Manufacturer delta feed every 30 seconds. The bean blah updates the bean paramsBean to add an updated !deltatoken property with the value returned in the ODataDeltaFeed result. Since the initial delta token is not known, the consumer endpoint will produce an ODataFeed value the first time, and ODataDeltaFeed on subsequent polls.