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 e569f7ca872..8a5d1a6f034 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 @@ -27,7 +27,11 @@ import ca.uhn.fhir.rest.server.exceptions.AuthenticationException; import ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException; import javax.annotation.Nonnull; -import java.util.*; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashSet; +import java.util.List; +import java.util.Set; /** * Value for {@link Hook#value()} @@ -374,7 +378,6 @@ public enum Pointcut { ), - /** * Server Hook: * This method is called after the server implementation method has been called, but before any attempt @@ -1323,14 +1326,16 @@ public enum Pointcut { /** * Storage Hook: - * Invoked before an $expunge operation on all data (expungeEverything) is called. + * Invoked before FHIR create operation to request the identification of the partition ID to be associated + * with the resource being created. This hook will only be called if partitioning is enabled in the JPA + * server. *

- * Hooks will be passed a reference to a counter containing the current number of records that have been deleted. - * If the hook deletes any records, the hook is expected to increment this counter by the number of records deleted. - *

* Hooks may accept the following parameters: + *

* *

- * Hooks should return an instance of ca.uhn.fhir.jpa.model.entity.TenantId or null. + * Hooks should return an instance of ca.uhn.fhir.jpa.model.entity.PartitionId or null. *

*/ - STORAGE_TENANT_IDENTIFY_CREATE ( + STORAGE_PARTITION_IDENTIFY_CREATE( // Return type - "ca.uhn.fhir.jpa.model.entity.TenantId", + "ca.uhn.fhir.jpa.model.entity.PartitionId", // Params "org.hl7.fhir.instance.model.api.IBaseResource", "ca.uhn.fhir.rest.api.server.RequestDetails", "ca.uhn.fhir.rest.server.servlet.ServletRequestDetails" ), + /** + * Storage Hook: + * Invoked before FHIR read/access operation (e.g. read/vread, search, history, etc.) operation to request the + * identification of the partition ID to be associated with the resource being created. This hook will only be called if + * partitioning is enabled in the JPA server. + *

+ * Hooks may accept the following parameters: + *

+ * + *

+ * Hooks should return an instance of ca.uhn.fhir.jpa.model.entity.PartitionId or null. + *

+ */ + STORAGE_PARTITION_IDENTIFY_READ( + // Return type + "ca.uhn.fhir.jpa.model.entity.PartitionId", + // Params + "ca.uhn.fhir.rest.api.server.RequestDetails", + "ca.uhn.fhir.rest.server.servlet.ServletRequestDetails" + ), + /** * Performance Tracing Hook: * This hook is invoked when any informational messages generated by the @@ -1680,12 +1720,12 @@ public enum Pointcut { *

*

* THIS IS AN EXPERIMENTAL HOOK AND MAY BE REMOVED OR CHANGED WITHOUT WARNING. - *

- *

+ *

+ *

* Note that this is a performance tracing hook. Use with caution in production * systems, since calling it may (or may not) carry a cost. - *

- *

+ *

+ *

* Hooks may accept the following parameters: *

*