Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: URI options description

...

NameTypeDescription
data
Object
Data with appropriate type used to create or modify the OData resource
keyPredicate
String
Key predicate to create a parameterized OData resource endpoint. Useful for create/update operations where the key predicate value is dynamically provided in a header
queryParams
java.util.Map<String, String>
OData system options and custom query options. For more information see OData 2.0 URI Conventions
resourcePath
String
OData resource path, may or may not contain key predicate
*
String
Any other URI option is treated as a query parameter and added to query parameter map, overwriting an existing specified entries in a queryParams option, if also specified

Consumer Endpoints

Only the read endpoint can be used as a consumer endpoint. Consumer endpoints can use Scheduled Poll Consumer Options with a consumer. prefix to schedule endpoint invocation. By default consumer endpoints that return an array or collection will generate one exchange per element, and their routes will be executed once for each exchange. This behavior can be disabled by setting the endpoint property consumer.splitResult=false

...

The following route reads top 5 entries from the Manufacturer feed ordered by ascending Name property. 

 

from("direct:...")
    .setHeader("CamelOlingo2.$top", "5");
    .to("olingo2://read/Manufacturers?orderBy=Name%20asc");

 

The following route reads Manufacturer entry using the key property value in incoming id header. 

 

from("direct:...")
    .setHeader("CamelOlingo2.keyPredicate", header("id"))
    .to("olingo2://read/Manufacturers");

The following route creates Manufacturer entry using the Map<String, Object> in body message. 

 

from("direct:...")
    .to("olingo2://create/Manufacturers");

 

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.