From 55ec6581db198c91fb841998d8bba68fccd272d9 Mon Sep 17 00:00:00 2001 From: BraunMatthias <59841349+BraunMatthias@users.noreply.github.com> Date: Thu, 6 Jun 2024 06:41:16 +0200 Subject: [PATCH] Fixed links (#976) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fixed links * Update java/event-handlers/index.md * Update java/event-handlers/index.md Co-authored-by: Marc Becker * Update java/event-handlers/index.md --------- Co-authored-by: René Jeglinsky Co-authored-by: Marc Becker --- java/event-handlers/index.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/java/event-handlers/index.md b/java/event-handlers/index.md index ca703d188..9a50ecd87 100644 --- a/java/event-handlers/index.md +++ b/java/event-handlers/index.md @@ -28,7 +28,7 @@ Event handlers enable you to add custom business logic to your application by ei Event handlers are a powerful means to extend CAP. Did you know, that most of the built-in features provided by CAP are implemented using event handlers? ::: -Common events are the CRUD events (`CREATE`, `READ`, `UPDATE`, `DELETE`), which are handled by the different kinds of [CQN-based services[(../cqn-services/#cdsservices). +Common events are the CRUD events (`CREATE`, `READ`, `UPDATE`, `DELETE`), which are handled by the different kinds of [CQN-based services](../cqn-services/#cdsservices). These events are most typically triggered, when an HTTP-based protocol adapter (for example OData V4) executes a CQN statement on an Application Service to fulfill the HTTP request. The CAP Java SDK provides a lot of built-in event handlers (also known as [Generic Providers](../../guides/providing-services)) that handle CRUD operations out of the box and implement the handling of many CDS annotations. Applications most commonly use event handlers on CRUD events to _extend_ the event processing by using the [`Before`](#before) and [`After`](#after) phase. @@ -113,10 +113,10 @@ Object result = context.get("result"); Using the `get` and `put` methods has several drawbacks: The API is neither type-safe nor is it clear what the correct keys for different event parameters are. To solve these issues it is possible to overlay the general Event Context with an event-specific Event Context, which provides typed getters and setters for the parameters of a specific event. -For each event that the CAP Java SDK provides out-of-the-box (for example the [CRUD events[(../cqn-services/application-services#crudevents)) a corresponding Event Context is provided. +For each event that the CAP Java SDK provides out-of-the-box (for example the [CRUD events](../cqn-services/application-services#crudevents)) a corresponding Event Context is provided. Let's have a look at an example. The [CdsReadEventContext](https://www.javadoc.io/doc/com.sap.cds/cds-services-api/latest/com/sap/cds/services/cds/CdsReadEventContext.html) interface is the `READ` event-specific Event Context. -As one of the parameters of the `READ` event is a [CqnSelect](../../cds/cqn#select) it provides a `CqnSelect getCqn()` method. The return value of a `READ` event is a [Result[(../working-with-cql/query-execution#result). +As one of the parameters of the `READ` event is a [CqnSelect](../../cds/cqn#select) it provides a `CqnSelect getCqn()` method. The return value of a `READ` event is a [Result](../working-with-cql/query-execution#result). The context therefore also provides a `Result getResult()` and a `setResult(Result r)` method. You can use the `as` method provided by the general Event Context to overlay it: ```java @@ -361,7 +361,7 @@ public void changeBooks(List books) { } The mapping between a data accessor interface and an entity, is based on the `@CdsName` annotation of the accessor interface. ::: -Entity data arguments only work on [CRUD events[(../cqn-services/application-services#crudevents) of [CQN-based services](../cqn-services/#cdsservices). In addition they work with the [draft-specific CRUD events[(../fiori-drafts#draftevents) provided by Draft Services. +Entity data arguments only work on [CRUD events](../cqn-services/application-services#crudevents) of [CQN-based services](../cqn-services/#cdsservices). In addition they work with the [draft-specific CRUD events](../fiori-drafts#draftevents) provided by Draft Services. The origin from which the entity data is provided depends on the phase of the event processing. During the `Before` and `On` phase it is obtained from the CQN statement. The CQN statement contains the entity data that was provided by the service client. @@ -413,10 +413,10 @@ public List readBooks(CdsReadEventContext context) { } ``` -Event handler methods with return values only work on [CRUD events[(cqn-services/application-services#crudevents) of [CQN-based services[(cqn-services/#cdsservices) or the [draft-specific CRUD events[(../fiori-drafts#draftevents) provided by Draft Services. +Event handler methods with return values only work on [CRUD events](../cqn-services/application-services#crudevents) of [CQN-based services](../cqn-services/#cdsservices) or the [draft-specific CRUD events](../fiori-drafts#draftevents) provided by Draft Services. ::: tip -To learn how to build your own Result objects, have a look at the [Result Builder API[(../cqn-services/application-services#result-builder) +To learn how to build your own Result objects, have a look at the [Result Builder API](../cqn-services/application-services#result-builder) ::: ### Ordering of Event Handler Methods