From d4717a08d61ff2a39224d27034eb600377149a89 Mon Sep 17 00:00:00 2001 From: James Agnew Date: Tue, 12 Sep 2023 16:40:48 -0400 Subject: [PATCH] Improve docs for NO-OP update pointcuts (#5294) --- .../ca/uhn/fhir/interceptor/api/Pointcut.java | 13 +++ .../dao/r4/FhirResourceDaoR4UpdateTest.java | 92 +++++++++++++++++++ 2 files changed, 105 insertions(+) diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/interceptor/api/Pointcut.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/interceptor/api/Pointcut.java index e481f4cc2bb..994ea9cd1cf 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/interceptor/api/Pointcut.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/interceptor/api/Pointcut.java @@ -1484,6 +1484,15 @@ public enum Pointcut implements IPointcut { * to the new contents of the resource. These changes will be reflected in * permanent storage. *

+ *

+ * NO-OPS: If the client has submitted an update that does not actually make any changes + * (i.e. the resource they include in the PUT body is identical to the content that + * was already stored) the server may choose to ignore the update and perform + * a "NO-OP". In this case, this pointcut is still invoked, but {@link #STORAGE_PRECOMMIT_RESOURCE_UPDATED} + * will not be. Hook methods for this pointcut may make changes to the new contents of the + * resource being updated, and in this case the NO-OP will be cancelled and + * {@link #STORAGE_PRECOMMIT_RESOURCE_UPDATED} will also be invoked. + *

* Hooks may accept the following parameters: *