From ed5a430451e434044b8315a60ca257ad34761d37 Mon Sep 17 00:00:00 2001 From: Tony Quach Date: Wed, 23 Apr 2025 15:20:28 +0700 Subject: [PATCH] docs: update cds-data.md --- java/cds-data.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/java/cds-data.md b/java/cds-data.md index e24f4fa9e..efb1c7343 100644 --- a/java/cds-data.md +++ b/java/cds-data.md @@ -1290,7 +1290,7 @@ For the download scenario, as well, you don't need to implement any custom handl If you want to override the default logic to process the uploaded stream with custom logic (for example, to parse a stream of CSV data), the best place to do that is in a custom `On` handler, as the following examples shows: ```java -@On(event = CdsService.EVENT_UPDATE) +@On(event = CqnService.EVENT_UPDATE) public void processCoverImage(CdsUpdateEventContext context, List books) { books.forEach(book -> { InputStream is = book.getCoverImage(); @@ -1355,7 +1355,7 @@ For uploads, you can either use a custom `Before` or `On` handler to wrap the pr Using a custom `Before` handler makes sense if the stream's final destination is the persistence layer of the CAP Java SDK, which writes the content to the database. Note that the pre-processing logic in this example is implemented in the `read()` methods of the `FilterInputStream` and is only called when the data is streamed, during the `On` phase of the request: ```java -@Before(event = CdsService.EVENT_UPDATE) +@Before(event = CqnService.EVENT_UPDATE) public void preProcessCoverImage(CdsUpdateEventContext context, List books) { books.forEach(book -> { book.setCoverImage(new CoverImagePreProcessor(book.getCoverImage())); @@ -1368,7 +1368,7 @@ The original `InputStream` is replaced by the proxy implementation in the `cover Using a custom `On` handler makes sense if you want to prevent that the default `On` handler is executed and to control the final destination for the stream. You then have the option to pass the streamed data on to some other service for persistence: ```java -@On(event = CdsService.EVENT_UPDATE) +@On(event = CqnService.EVENT_UPDATE) public Result processCoverImage(CdsUpdateEventContext context, List books) { books.forEach(book -> { book.setCoverImage(new CoverImagePreProcessor(book.getCoverImage()));