001/*-
002 * #%L
003 * HAPI FHIR - Core Library
004 * %%
005 * Copyright (C) 2014 - 2025 Smile CDR, Inc.
006 * %%
007 * Licensed under the Apache License, Version 2.0 (the "License");
008 * you may not use this file except in compliance with the License.
009 * You may obtain a copy of the License at
010 *
011 *      http://www.apache.org/licenses/LICENSE-2.0
012 *
013 * Unless required by applicable law or agreed to in writing, software
014 * distributed under the License is distributed on an "AS IS" BASIS,
015 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
016 * See the License for the specific language governing permissions and
017 * limitations under the License.
018 * #L%
019 */
020package ca.uhn.fhir.interceptor.api;
021
022import ca.uhn.fhir.model.base.resource.BaseOperationOutcome;
023import ca.uhn.fhir.rest.annotation.Read;
024import ca.uhn.fhir.rest.annotation.Search;
025import ca.uhn.fhir.rest.server.exceptions.AuthenticationException;
026import ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException;
027import ca.uhn.fhir.validation.ValidationResult;
028import jakarta.annotation.Nonnull;
029import org.apache.commons.lang3.Validate;
030import org.hl7.fhir.instance.model.api.IBaseConformance;
031
032import java.io.Writer;
033import java.util.Arrays;
034import java.util.Collections;
035import java.util.HashSet;
036import java.util.List;
037import java.util.Set;
038
039import static ca.uhn.fhir.interceptor.api.IInterceptorBroadcaster.*;
040
041/**
042 * Value for {@link Hook#value()}
043 * <p>
044 * Hook pointcuts are divided into several broad categories:
045 * <ul>
046 * <li>INTERCEPTOR_xxx: Hooks on the interceptor infrastructure itself</li>
047 * <li>CLIENT_xxx: Hooks on the HAPI FHIR Client framework</li>
048 * <li>SERVER_xxx: Hooks on the HAPI FHIR Server framework</li>
049 * <li>SUBSCRIPTION_xxx: Hooks on the HAPI FHIR Subscription framework</li>
050 * <li>STORAGE_xxx: Hooks on the storage engine</li>
051 * <li>VALIDATION_xxx: Hooks on the HAPI FHIR Validation framework</li>
052 * <li>JPA_PERFTRACE_xxx: Performance tracing hooks on the JPA server</li>
053 * </ul>
054 * </p>
055 */
056public enum Pointcut implements IPointcut {
057
058        /**
059         * <b>Interceptor Framework Hook:</b>
060         * This pointcut will be called once when a given interceptor is registered
061         */
062        INTERCEPTOR_REGISTERED(void.class),
063
064        /**
065         * <b>Client Hook:</b>
066         * This hook is called before an HTTP client request is sent
067         * <p>
068         * Hooks may accept the following parameters:
069         * <ul>
070         * <li>
071         * ca.uhn.fhir.rest.client.api.IHttpRequest - The details of the request
072         * </li>
073         * <li>
074         *    ca.uhn.fhir.rest.client.api.IRestfulClient - The client object making the request
075         * </li>
076         * </ul>
077         * </p>
078         * Hook methods must return <code>void</code>.
079         */
080        CLIENT_REQUEST(
081                        void.class, "ca.uhn.fhir.rest.client.api.IHttpRequest", "ca.uhn.fhir.rest.client.api.IRestfulClient"),
082
083        /**
084         * <b>Client Hook:</b>
085         * This hook is called after an HTTP client request has completed, prior to returning
086         * the results to the calling code. Hook methods may modify the response.
087         * <p>
088         * Hooks may accept the following parameters:
089         * <ul>
090         * <li>
091         * ca.uhn.fhir.rest.client.api.IHttpRequest - The details of the request
092         * </li>
093         * <li>
094         * ca.uhn.fhir.rest.client.api.IHttpResponse - The details of the response
095         * </li>
096         * <li>
097         *    ca.uhn.fhir.rest.client.api.IRestfulClient - The client object making the request
098         * </li>
099         * <li>
100         *    ca.uhn.fhir.rest.client.api.ClientResponseContext - Contains an IHttpRequest, an IHttpResponse, and an IRestfulClient
101         *    and also allows the client to mutate the contained IHttpResponse
102         * </li>
103         * </ul>
104         * </p>
105         * Hook methods must return <code>void</code>.
106         */
107        CLIENT_RESPONSE(
108                        void.class,
109                        "ca.uhn.fhir.rest.client.api.IHttpRequest",
110                        "ca.uhn.fhir.rest.client.api.IHttpResponse",
111                        "ca.uhn.fhir.rest.client.api.IRestfulClient",
112                        "ca.uhn.fhir.rest.client.api.ClientResponseContext"),
113
114        /**
115         * <b>Server Hook:</b>
116         * This hook is called when a server CapabilityStatement is generated for returning to a client.
117         * <p>
118         * This pointcut will not necessarily be invoked for every client request to the `/metadata` endpoint.
119         * If caching of the generated CapabilityStatement is enabled, a new CapabilityStatement will be
120         * generated periodically and this pointcut will be invoked at that time.
121         * </p>
122         * <p>
123         * Hooks may accept the following parameters:
124         * <ul>
125         * <li>
126         * org.hl7.fhir.instance.model.api.IBaseConformance - The <code>CapabilityStatement</code> resource that will
127         * be returned to the client by the server. Interceptors may make changes to this resource. The parameter
128         * must be of type <code>IBaseConformance</code>, so it is the responsibility of the interceptor hook method
129         * code to cast to the appropriate version.
130         * </li>
131         * <li>
132         * ca.uhn.fhir.rest.api.server.RequestDetails - A bean containing details about the request that is about to
133         * be processed
134         * </li>
135         * <li>
136         * ca.uhn.fhir.rest.server.servlet.ServletRequestDetails - A bean containing details about the request that
137         * is about to be processed. This parameter is identical to the RequestDetails parameter above but will only
138         * be populated when operating in a RestfulServer implementation. It is provided as a convenience.
139         * </li>
140         * </ul>
141         * </p>
142         * Hook methods may an instance of a new <code>CapabilityStatement</code> resource which will replace the
143         * one that was supplied to the interceptor, or <code>void</code> to use the original one. If the interceptor
144         * chooses to modify the <code>CapabilityStatement</code> that was supplied to the interceptor, it is fine
145         * for your hook method to return <code>void</code> or <code>null</code>.
146         */
147        SERVER_CAPABILITY_STATEMENT_GENERATED(
148                        IBaseConformance.class,
149                        "org.hl7.fhir.instance.model.api.IBaseConformance",
150                        "ca.uhn.fhir.rest.api.server.RequestDetails",
151                        "ca.uhn.fhir.rest.server.servlet.ServletRequestDetails"),
152
153        /**
154         * <b>Server Hook:</b>
155         * This hook is called before any other processing takes place for each incoming request. It may be used to provide
156         * alternate handling for some requests, or to screen requests before they are handled, etc.
157         * <p>
158         * Note that any exceptions thrown by this method will not be trapped by HAPI (they will be passed up to the server)
159         * </p>
160         * <p>
161         * Hooks may accept the following parameters:
162         * <ul>
163         * <li>
164         * jakarta.servlet.http.HttpServletRequest - The servlet request, when running in a servlet environment
165         * </li>
166         * <li>
167         * jakarta.servlet.http.HttpServletResponse - The servlet response, when running in a servlet environment
168         * </li>
169         * </ul>
170         * </p>
171         * Hook methods may return <code>true</code> or <code>void</code> if processing should continue normally.
172         * This is generally the right thing to do. If your interceptor is providing a response rather than
173         * letting HAPI handle the response normally, you must return <code>false</code>. In this case,
174         * no further processing will occur and no further interceptors will be called.
175         */
176        SERVER_INCOMING_REQUEST_PRE_PROCESSED(
177                        boolean.class, "jakarta.servlet.http.HttpServletRequest", "jakarta.servlet.http.HttpServletResponse"),
178
179        /**
180         * <b>Server Hook:</b>
181         * This hook is invoked upon any exception being thrown within the server's request processing code. This includes
182         * any exceptions thrown within resource provider methods (e.g. {@link Search} and {@link Read} methods) as well as
183         * any runtime exceptions thrown by the server itself. This also includes any {@link AuthenticationException}
184         * thrown.
185         * <p>
186         * Hooks may accept the following parameters:
187         * <ul>
188         * <li>
189         * ca.uhn.fhir.rest.api.server.RequestDetails - A bean containing details about the request that is about to be processed, including details such as the
190         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
191         * pulled out of the servlet request. Note that the bean
192         * properties are not all guaranteed to be populated, depending on how early during processing the
193         * exception occurred.
194         * </li>
195         * <li>
196         * ca.uhn.fhir.rest.server.servlet.ServletRequestDetails - A bean containing details about the request that is about to be processed, including details such as the
197         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
198         * pulled out of the servlet request. Note that the bean
199         * properties are not all guaranteed to be populated, depending on how early during processing the
200         * exception occurred. This parameter is identical to the RequestDetails parameter above but will
201         * only be populated when operating in a RestfulServer implementation. It is provided as a convenience.
202         * </li>
203         * <li>
204         * jakarta.servlet.http.HttpServletRequest - The servlet request, when running in a servlet environment
205         * </li>
206         * <li>
207         * jakarta.servlet.http.HttpServletResponse - The servlet response, when running in a servlet environment
208         * </li>
209         * <li>
210         * ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException - The exception that was thrown
211         * </li>
212         * </ul>
213         * </p>
214         * <p>
215         * Implementations of this method may choose to ignore/log/count/etc exceptions, and return <code>true</code> or
216         * <code>void</code>. In
217         * this case, processing will continue, and the server will automatically generate an {@link BaseOperationOutcome
218         * OperationOutcome}. Implementations may also choose to provide their own response to the client. In this case, they
219         * should return <code>false</code>, to indicate that they have handled the request and processing should stop.
220         * </p>
221         */
222        SERVER_HANDLE_EXCEPTION(
223                        boolean.class,
224                        "ca.uhn.fhir.rest.api.server.RequestDetails",
225                        "ca.uhn.fhir.rest.server.servlet.ServletRequestDetails",
226                        "jakarta.servlet.http.HttpServletRequest",
227                        "jakarta.servlet.http.HttpServletResponse",
228                        "ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException"),
229
230        /**
231         * <b>Server Hook:</b>
232         * This method is immediately before the handling method is selected. Interceptors may make changes
233         * to the request that can influence which handler will ultimately be called.
234         * <p>
235         * Hooks may accept the following parameters:
236         * <ul>
237         * <li>
238         * ca.uhn.fhir.rest.api.server.RequestDetails - A bean containing details about the request that is about to be processed, including details such as the
239         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
240         * pulled out of the servlet request.
241         * Note that the bean properties are not all guaranteed to be populated at the time this hook is called.
242         * </li>
243         * <li>
244         * ca.uhn.fhir.rest.server.servlet.ServletRequestDetails - A bean containing details about the request that is about to be processed, including details such as the
245         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
246         * pulled out of the servlet request. This parameter is identical to the RequestDetails parameter above but will
247         * only be populated when operating in a RestfulServer implementation. It is provided as a convenience.
248         * </li>
249         * <li>
250         * jakarta.servlet.http.HttpServletRequest - The servlet request, when running in a servlet environment
251         * </li>
252         * <li>
253         * jakarta.servlet.http.HttpServletResponse - The servlet response, when running in a servlet environment
254         * </li>
255         * </ul>
256         * <p>
257         * Hook methods may return <code>true</code> or <code>void</code> if processing should continue normally.
258         * This is generally the right thing to do.
259         * If your interceptor is providing an HTTP response rather than letting HAPI handle the response normally, you
260         * must return <code>false</code>. In this case, no further processing will occur and no further interceptors
261         * will be called.
262         * </p>
263         * <p>
264         * Hook methods may also throw {@link AuthenticationException} if they would like. This exception may be thrown
265         * to indicate that the interceptor has detected an unauthorized access
266         * attempt. If thrown, processing will stop and an HTTP 401 will be returned to the client.
267         *
268         * @since 5.4.0
269         */
270        SERVER_INCOMING_REQUEST_PRE_HANDLER_SELECTED(
271                        boolean.class,
272                        "ca.uhn.fhir.rest.api.server.RequestDetails",
273                        "ca.uhn.fhir.rest.server.servlet.ServletRequestDetails",
274                        "jakarta.servlet.http.HttpServletRequest",
275                        "jakarta.servlet.http.HttpServletResponse"),
276
277        /**
278         * <b>Server Hook:</b>
279         * This method is called just before the actual implementing server method is invoked.
280         * <p>
281         * Hooks may accept the following parameters:
282         * <ul>
283         * <li>
284         * ca.uhn.fhir.rest.api.server.RequestDetails - A bean containing details about the request that is about to be processed, including details such as the
285         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
286         * pulled out of the servlet request. Note that the bean
287         * properties are not all guaranteed to be populated, depending on how early during processing the
288         * exception occurred.
289         * </li>
290         * <li>
291         * ca.uhn.fhir.rest.server.servlet.ServletRequestDetails - A bean containing details about the request that is about to be processed, including details such as the
292         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
293         * pulled out of the servlet request. This parameter is identical to the RequestDetails parameter above but will
294         * only be populated when operating in a RestfulServer implementation. It is provided as a convenience.
295         * </li>
296         * <li>
297         * jakarta.servlet.http.HttpServletRequest - The servlet request, when running in a servlet environment
298         * </li>
299         * <li>
300         * jakarta.servlet.http.HttpServletResponse - The servlet response, when running in a servlet environment
301         * </li>
302         * </ul>
303         * <p>
304         * Hook methods may return <code>true</code> or <code>void</code> if processing should continue normally.
305         * This is generally the right thing to do.
306         * If your interceptor is providing an HTTP response rather than letting HAPI handle the response normally, you
307         * must return <code>false</code>. In this case, no further processing will occur and no further interceptors
308         * will be called.
309         * </p>
310         * <p>
311         * Hook methods may also throw {@link AuthenticationException} if they would like. This exception may be thrown
312         * to indicate that the interceptor has detected an unauthorized access
313         * attempt. If thrown, processing will stop and an HTTP 401 will be returned to the client.
314         */
315        SERVER_INCOMING_REQUEST_POST_PROCESSED(
316                        boolean.class,
317                        "ca.uhn.fhir.rest.api.server.RequestDetails",
318                        "ca.uhn.fhir.rest.server.servlet.ServletRequestDetails",
319                        "jakarta.servlet.http.HttpServletRequest",
320                        "jakarta.servlet.http.HttpServletResponse"),
321
322        /**
323         * <b>Server Hook:</b>
324         * This hook is invoked before an incoming request is processed. Note that this method is called
325         * after the server has begun preparing the response to the incoming client request.
326         * As such, it is not able to supply a response to the incoming request in the way that
327         * SERVER_INCOMING_REQUEST_PRE_PROCESSED and {@link #SERVER_INCOMING_REQUEST_POST_PROCESSED} are.
328         * At this point the request has already been passed to the handler so any changes
329         * (e.g. adding parameters) will not be considered.
330         * If you'd like to modify request parameters before they are passed to the handler,
331         * use {@link Pointcut#SERVER_INCOMING_REQUEST_PRE_HANDLER_SELECTED} or {@link Pointcut#SERVER_INCOMING_REQUEST_POST_PROCESSED}.
332         * If you are attempting to modify a search before it occurs, use {@link Pointcut#STORAGE_PRESEARCH_REGISTERED}.
333         * <p>
334         * Hooks may accept the following parameters:
335         * <ul>
336         * <li>
337         * ca.uhn.fhir.rest.api.server.RequestDetails - A bean containing details about the request that is about to be processed, including details such as the
338         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
339         * pulled out of the servlet request. Note that the bean
340         * properties are not all guaranteed to be populated, depending on how early during processing the
341         * exception occurred.
342         * </li>
343         * <li>
344         * ca.uhn.fhir.rest.server.servlet.ServletRequestDetails - A bean containing details about the request that is about to be processed, including details such as the
345         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
346         * pulled out of the servlet request. This parameter is identical to the RequestDetails parameter above but will
347         * only be populated when operating in a RestfulServer implementation. It is provided as a convenience.
348         * </li>
349         * <li>
350         * ca.uhn.fhir.rest.api.RestOperationTypeEnum - The type of operation that the FHIR server has determined that the client is trying to invoke
351         * </li>
352         * </ul>
353         * </p>
354         * <p>
355         * Hook methods must return <code>void</code>
356         * </p>
357         * <p>
358         * Hook methods method may throw a subclass of {@link BaseServerResponseException}, and processing
359         * will be aborted with an appropriate error returned to the client.
360         * </p>
361         */
362        SERVER_INCOMING_REQUEST_PRE_HANDLED(
363                        void.class,
364                        "ca.uhn.fhir.rest.api.server.RequestDetails",
365                        "ca.uhn.fhir.rest.server.servlet.ServletRequestDetails",
366                        "ca.uhn.fhir.rest.api.RestOperationTypeEnum"),
367
368        /**
369         * <b>Server Hook:</b>
370         * This method is called when a resource provider method is registered and being bound
371         * by the HAPI FHIR Plain Server / RestfulServer.
372         * <p>
373         * Hooks may accept the following parameters:
374         * <ul>
375         * <li>
376         * ca.uhn.fhir.rest.server.method.BaseMethodBinding - The method binding.
377         * </li>
378         * </ul>
379         * <p>
380         * Hook methods  may modify the method binding, replace it, or return <code>null</code> to cancel the binding.
381         * </p>
382         */
383        SERVER_PROVIDER_METHOD_BOUND(
384                        "ca.uhn.fhir.rest.server.method.BaseMethodBinding", "ca.uhn.fhir.rest.server.method.BaseMethodBinding"),
385
386        /**
387         * <b>Server Hook:</b>
388         * This method is called upon any exception being thrown within the server's request processing code. This includes
389         * any exceptions thrown within resource provider methods (e.g. {@link Search} and {@link Read} methods) as well as
390         * any runtime exceptions thrown by the server itself. This hook method is invoked for each interceptor (until one of them
391         * returns a non-<code>null</code> response or the end of the list is reached), after which
392         * {@link #SERVER_HANDLE_EXCEPTION} is
393         * called for each interceptor.
394         * <p>
395         * This may be used to add an OperationOutcome to a response, or to convert between exception types for any reason.
396         * </p>
397         * <p>
398         * Implementations of this method may choose to ignore/log/count/etc exceptions, and return <code>null</code>. In
399         * this case, processing will continue, and the server will automatically generate an {@link BaseOperationOutcome
400         * OperationOutcome}. Implementations may also choose to provide their own response to the client. In this case, they
401         * should return a non-<code>null</code>, to indicate that they have handled the request and processing should stop.
402         * </p>
403         * <p>
404         * Hooks may accept the following parameters:
405         * <ul>
406         * <li>
407         * ca.uhn.fhir.rest.api.server.RequestDetails - A bean containing details about the request that is about to be processed, including details such as the
408         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
409         * pulled out of the servlet request. Note that the bean
410         * properties are not all guaranteed to be populated, depending on how early during processing the
411         * exception occurred.
412         * </li>
413         * <li>
414         * ca.uhn.fhir.rest.server.servlet.ServletRequestDetails - A bean containing details about the request that is about to be processed, including details such as the
415         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
416         * pulled out of the servlet request. This parameter is identical to the RequestDetails parameter above but will
417         * only be populated when operating in a RestfulServer implementation. It is provided as a convenience.
418         * </li>
419         * <li>
420         * java.lang.Throwable - The exception that was thrown. This will often be an instance of
421         * {@link BaseServerResponseException} but will not necessarily be one (e.g. it could be a
422         * {@link NullPointerException} in the case of a bug being triggered.
423         * </li>
424         * <li>
425         * jakarta.servlet.http.HttpServletRequest - The servlet request, when running in a servlet environment
426         * </li>
427         * <li>
428         * jakarta.servlet.http.HttpServletResponse - The servlet response, when running in a servlet environment
429         * </li>
430         * </ul>
431         * <p>
432         * Hook methods may return a new exception to use for processing, or <code>null</code> if this interceptor is not trying to
433         * modify the exception. For example, if this interceptor has nothing to do with exception processing, it
434         * should always return <code>null</code>. If this interceptor adds an OperationOutcome to the exception, it
435         * should return an exception.
436         * </p>
437         */
438        SERVER_PRE_PROCESS_OUTGOING_EXCEPTION(
439                        BaseServerResponseException.class,
440                        "ca.uhn.fhir.rest.api.server.RequestDetails",
441                        "ca.uhn.fhir.rest.server.servlet.ServletRequestDetails",
442                        "java.lang.Throwable",
443                        "jakarta.servlet.http.HttpServletRequest",
444                        "jakarta.servlet.http.HttpServletResponse"),
445
446        /**
447         * <b>Server Hook:</b>
448         * This method is called after the server implementation method has been called, but before any attempt
449         * to stream the response back to the client. Interceptors may examine or modify the response before it
450         * is returned, or even prevent the response.
451         * <p>
452         * Hooks may accept the following parameters:
453         * <ul>
454         * <li>
455         * ca.uhn.fhir.rest.api.server.RequestDetails - A bean containing details about the request that is about to be processed, including details such as the
456         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
457         * pulled out of the servlet request.
458         * </li>
459         * <li>
460         * ca.uhn.fhir.rest.server.servlet.ServletRequestDetails - A bean containing details about the request that is about to be processed, including details such as the
461         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
462         * pulled out of the servlet request. This parameter is identical to the RequestDetails parameter above but will
463         * only be populated when operating in a RestfulServer implementation. It is provided as a convenience.
464         * </li>
465         * <li>
466         * org.hl7.fhir.instance.model.api.IBaseResource - The resource that will be returned. This parameter may be <code>null</code> for some responses.
467         * </li>
468         * <li>
469         * ca.uhn.fhir.rest.api.server.ResponseDetails - This object contains details about the response, including the contents. Hook methods may modify this object to change or replace the response.
470         * </li>
471         * <li>
472         * jakarta.servlet.http.HttpServletRequest - The servlet request, when running in a servlet environment
473         * </li>
474         * <li>
475         * jakarta.servlet.http.HttpServletResponse - The servlet response, when running in a servlet environment
476         * </li>
477         * </ul>
478         * </p>
479         * <p>
480         * Hook methods may return <code>true</code> or <code>void</code> if processing should continue normally.
481         * This is generally the right thing to do. If your interceptor is providing a response rather than
482         * letting HAPI handle the response normally, you must return <code>false</code>. In this case,
483         * no further processing will occur and no further interceptors will be called.
484         * </p>
485         * <p>
486         * Hook methods may also throw {@link AuthenticationException} to indicate that the interceptor
487         * has detected an unauthorized access attempt. If thrown, processing will stop and an HTTP 401
488         * will be returned to the client.
489         */
490        SERVER_OUTGOING_RESPONSE(
491                        boolean.class,
492                        "ca.uhn.fhir.rest.api.server.RequestDetails",
493                        "ca.uhn.fhir.rest.server.servlet.ServletRequestDetails",
494                        "org.hl7.fhir.instance.model.api.IBaseResource",
495                        "ca.uhn.fhir.rest.api.server.ResponseDetails",
496                        "jakarta.servlet.http.HttpServletRequest",
497                        "jakarta.servlet.http.HttpServletResponse"),
498
499        /**
500         * <b>Server Hook:</b>
501         * This method is called when a stream writer is generated that will be used to stream a non-binary response to
502         * a client. Hooks may return a wrapped writer which adds additional functionality as needed.
503         *
504         * <p>
505         * Hooks may accept the following parameters:
506         * <ul>
507         * <li>
508         * java.io.Writer - The response writing Writer. Typically a hook will wrap this writer and layer additional functionality
509         * into the wrapping writer.
510         * </li>
511         * <li>
512         * ca.uhn.fhir.rest.api.server.RequestDetails - A bean containing details about the request that is about to be processed, including details such as the
513         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
514         * pulled out of the servlet request.
515         * </li>
516         * <li>
517         * ca.uhn.fhir.rest.server.servlet.ServletRequestDetails - A bean containing details about the request that is about to be processed, including details such as the
518         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
519         * pulled out of the servlet request. This parameter is identical to the RequestDetails parameter above but will
520         * only be populated when operating in a RestfulServer implementation. It is provided as a convenience.
521         * </li>
522         * </ul>
523         * </p>
524         * <p>
525         * Hook methods should return a {@link Writer} instance that will be used to stream the response. Hook methods
526         * should not throw any exception.
527         * </p>
528         *
529         * @since 5.0.0
530         */
531        SERVER_OUTGOING_WRITER_CREATED(
532                        Writer.class,
533                        "java.io.Writer",
534                        "ca.uhn.fhir.rest.api.server.RequestDetails",
535                        "ca.uhn.fhir.rest.server.servlet.ServletRequestDetails"),
536
537        /**
538         * <b>Server Hook:</b>
539         * This method is called after the server implementation method has been called, but before any attempt
540         * to stream the response back to the client, specifically for GraphQL requests (as these do not fit
541         * cleanly into the model provided by {@link #SERVER_OUTGOING_RESPONSE}).
542         * <p>
543         * Hooks may accept the following parameters:
544         * <ul>
545         * <li>
546         * ca.uhn.fhir.rest.api.server.RequestDetails - A bean containing details about the request that is about to be processed, including details such as the
547         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
548         * pulled out of the servlet request.
549         * </li>
550         * <li>
551         * ca.uhn.fhir.rest.server.servlet.ServletRequestDetails - A bean containing details about the request that is about to be processed, including details such as the
552         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
553         * pulled out of the servlet request. This parameter is identical to the RequestDetails parameter above but will
554         * only be populated when operating in a RestfulServer implementation. It is provided as a convenience.
555         * </li>
556         * <li>
557         * java.lang.String - The GraphQL query
558         * </li>
559         * <li>
560         * java.lang.String - The GraphQL response
561         * </li>
562         * <li>
563         * jakarta.servlet.http.HttpServletRequest - The servlet request, when running in a servlet environment
564         * </li>
565         * <li>
566         * jakarta.servlet.http.HttpServletResponse - The servlet response, when running in a servlet environment
567         * </li>
568         * </ul>
569         * </p>
570         * <p>
571         * Hook methods may return <code>true</code> or <code>void</code> if processing should continue normally.
572         * This is generally the right thing to do. If your interceptor is providing a response rather than
573         * letting HAPI handle the response normally, you must return <code>false</code>. In this case,
574         * no further processing will occur and no further interceptors will be called.
575         * </p>
576         * <p>
577         * Hook methods may also throw {@link AuthenticationException} to indicate that the interceptor
578         * has detected an unauthorized access attempt. If thrown, processing will stop and an HTTP 401
579         * will be returned to the client.
580         */
581        SERVER_OUTGOING_GRAPHQL_RESPONSE(
582                        boolean.class,
583                        "ca.uhn.fhir.rest.api.server.RequestDetails",
584                        "ca.uhn.fhir.rest.server.servlet.ServletRequestDetails",
585                        "java.lang.String",
586                        "java.lang.String",
587                        "jakarta.servlet.http.HttpServletRequest",
588                        "jakarta.servlet.http.HttpServletResponse"),
589
590        /**
591         * <b>Server Hook:</b>
592         * This method is called when an OperationOutcome is being returned in response to a failure.
593         * Hook methods may use this hook to modify the OperationOutcome being returned.
594         * <p>
595         * Hooks may accept the following parameters:
596         * <ul>
597         * <li>
598         * ca.uhn.fhir.rest.api.server.RequestDetails - A bean containing details about the request that is about to be processed, including details such as the
599         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
600         * pulled out of the servlet request. Note that the bean
601         * properties are not all guaranteed to be populated, depending on how early during processing the
602         * exception occurred.
603         * </li>
604         * <li>
605         * ca.uhn.fhir.rest.server.servlet.ServletRequestDetails - A bean containing details about the request that is about to be processed, including details such as the
606         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
607         * pulled out of the servlet request. This parameter is identical to the RequestDetails parameter above but will
608         * only be populated when operating in a RestfulServer implementation. It is provided as a convenience.
609         * </li>
610         * <li>
611         * org.hl7.fhir.instance.model.api.IBaseOperationOutcome - The OperationOutcome resource that will be
612         * returned.
613         * </ul>
614         * <p>
615         * Hook methods must return <code>void</code>
616         * </p>
617         */
618        SERVER_OUTGOING_FAILURE_OPERATIONOUTCOME(
619                        void.class,
620                        "ca.uhn.fhir.rest.api.server.RequestDetails",
621                        "ca.uhn.fhir.rest.server.servlet.ServletRequestDetails",
622                        "org.hl7.fhir.instance.model.api.IBaseOperationOutcome"),
623
624        /**
625         * <b>Server Hook:</b>
626         * This method is called after all processing is completed for a request, but only if the
627         * request completes normally (i.e. no exception is thrown).
628         * <p>
629         * This pointcut is called after the response has completely finished, meaning that the HTTP response to the client
630         * may or may not have already completely been returned to the client by the time this pointcut is invoked. Use caution
631         * if you have timing-dependent logic, since there is no guarantee about whether the client will have already moved on
632         * by the time your method is invoked. If you need a guarantee that your method is invoked before returning to the
633         * client, consider using {@link #SERVER_OUTGOING_RESPONSE} instead.
634         * </p>
635         * <p>
636         * Hooks may accept the following parameters:
637         * <ul>
638         * <li>
639         * ca.uhn.fhir.rest.api.server.RequestDetails - A bean containing details about the request that is about to be processed, including details such as the
640         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
641         * pulled out of the servlet request.
642         * </li>
643         * <li>
644         * ca.uhn.fhir.rest.server.servlet.ServletRequestDetails - A bean containing details about the request that is about to be processed, including details such as the
645         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
646         * pulled out of the request. This will be null if the server is not deployed to a RestfulServer environment.
647         * </li>
648         * </ul>
649         * </p>
650         * <p>
651         * This method must return <code>void</code>
652         * </p>
653         * <p>
654         * This method should not throw any exceptions. Any exception that is thrown by this
655         * method will be logged, but otherwise not acted upon (i.e. even if a hook method
656         * throws an exception, processing will continue and other interceptors will be
657         * called). Therefore it is considered a bug to throw an exception from hook methods using this
658         * pointcut.
659         * </p>
660         */
661        SERVER_PROCESSING_COMPLETED_NORMALLY(
662                        void.class,
663                        new ExceptionHandlingSpec().addLogAndSwallow(Throwable.class),
664                        "ca.uhn.fhir.rest.api.server.RequestDetails",
665                        "ca.uhn.fhir.rest.server.servlet.ServletRequestDetails"),
666
667        /**
668         * <b>Server Hook:</b>
669         * This method is called after all processing is completed for a request, regardless of whether
670         * the request completed successfully or not. It is called after {@link #SERVER_PROCESSING_COMPLETED_NORMALLY}
671         * in the case of successful operations.
672         * <p>
673         * Hooks may accept the following parameters:
674         * <ul>
675         * <li>
676         * ca.uhn.fhir.rest.api.server.RequestDetails - A bean containing details about the request that is about to be processed, including details such as the
677         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
678         * pulled out of the servlet request.
679         * </li>
680         * <li>
681         * ca.uhn.fhir.rest.server.servlet.ServletRequestDetails - A bean containing details about the request that is about to be processed, including details such as the
682         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
683         * pulled out of the request. This will be null if the server is not deployed to a RestfulServer environment.
684         * </li>
685         * </ul>
686         * </p>
687         * <p>
688         * This method must return <code>void</code>
689         * </p>
690         * <p>
691         * This method should not throw any exceptions. Any exception that is thrown by this
692         * method will be logged, but otherwise not acted upon (i.e. even if a hook method
693         * throws an exception, processing will continue and other interceptors will be
694         * called). Therefore it is considered a bug to throw an exception from hook methods using this
695         * pointcut.
696         * </p>
697         */
698        SERVER_PROCESSING_COMPLETED(
699                        void.class,
700                        new ExceptionHandlingSpec().addLogAndSwallow(Throwable.class),
701                        "ca.uhn.fhir.rest.api.server.RequestDetails",
702                        "ca.uhn.fhir.rest.server.servlet.ServletRequestDetails"),
703
704        /**
705         * <b>Subscription Hook:</b>
706         * Invoked whenever a persisted resource has been modified and is being submitted to the
707         * subscription processing pipeline. This method is called before the resource is placed
708         * on any queues for processing and executes synchronously during the resource modification
709         * operation itself, so it should return quickly.
710         * <p>
711         * Hooks may accept the following parameters:
712         * <ul>
713         * <li>ca.uhn.fhir.jpa.subscription.model.ResourceModifiedMessage - Hooks may modify this parameter. This will affect the checking process.</li>
714         * </ul>
715         * </p>
716         * <p>
717         * Hooks may return <code>void</code> or may return a <code>boolean</code>. If the method returns
718         * <code>void</code> or <code>true</code>, processing will continue normally. If the method
719         * returns <code>false</code>, subscription processing will not proceed for the given resource;
720         * </p>
721         */
722        SUBSCRIPTION_RESOURCE_MODIFIED(boolean.class, "ca.uhn.fhir.jpa.subscription.model.ResourceModifiedMessage"),
723
724        /**
725         * <b>Subscription Hook:</b>
726         * Invoked any time that a resource is matched by an individual subscription, and
727         * is about to be queued for delivery.
728         * <p>
729         * Hooks may make changes to the delivery payload, or make changes to the
730         * canonical subscription such as adding headers, modifying the channel
731         * endpoint, etc.
732         * </p>
733         * Hooks may accept the following parameters:
734         * <ul>
735         * <li>ca.uhn.fhir.jpa.subscription.model.CanonicalSubscription</li>
736         * <li>ca.uhn.fhir.jpa.subscription.model.ResourceDeliveryMessage</li>
737         * <li>ca.uhn.fhir.jpa.searchparam.matcher.InMemoryMatchResult</li>
738         * </ul>
739         * <p>
740         * Hooks may return <code>void</code> or may return a <code>boolean</code>. If the method returns
741         * <code>void</code> or <code>true</code>, processing will continue normally. If the method
742         * returns <code>false</code>, delivery will be aborted.
743         * </p>
744         */
745        SUBSCRIPTION_RESOURCE_MATCHED(
746                        boolean.class,
747                        "ca.uhn.fhir.jpa.subscription.model.CanonicalSubscription",
748                        "ca.uhn.fhir.jpa.subscription.model.ResourceDeliveryMessage",
749                        "ca.uhn.fhir.jpa.searchparam.matcher.InMemoryMatchResult"),
750
751        /**
752         * <b>Subscription Hook:</b>
753         * Invoked whenever a persisted resource was checked against all active subscriptions, and did not
754         * match any.
755         * <p>
756         * Hooks may accept the following parameters:
757         * <ul>
758         * <li>ca.uhn.fhir.jpa.subscription.model.ResourceModifiedMessage - Hooks should not modify this parameter as changes will not have any effect.</li>
759         * </ul>
760         * </p>
761         * <p>
762         * Hooks should return <code>void</code>.
763         * </p>
764         */
765        SUBSCRIPTION_RESOURCE_DID_NOT_MATCH_ANY_SUBSCRIPTIONS(
766                        void.class, "ca.uhn.fhir.jpa.subscription.model.ResourceModifiedMessage"),
767
768        /**
769         * <b>Subscription Hook:</b>
770         * Invoked immediately before the delivery of a subscription, and right before any channel-specific
771         * hooks are invoked (e.g. {@link #SUBSCRIPTION_BEFORE_REST_HOOK_DELIVERY}.
772         * <p>
773         * Hooks may make changes to the delivery payload, or make changes to the
774         * canonical subscription such as adding headers, modifying the channel
775         * endpoint, etc.
776         * </p>
777         * Hooks may accept the following parameters:
778         * <ul>
779         * <li>ca.uhn.fhir.jpa.subscription.model.CanonicalSubscription</li>
780         * <li>ca.uhn.fhir.jpa.subscription.model.ResourceDeliveryMessage</li>
781         * </ul>
782         * <p>
783         * Hooks may return <code>void</code> or may return a <code>boolean</code>. If the method returns
784         * <code>void</code> or <code>true</code>, processing will continue normally. If the method
785         * returns <code>false</code>, processing will be aborted.
786         * </p>
787         */
788        SUBSCRIPTION_BEFORE_DELIVERY(
789                        boolean.class,
790                        "ca.uhn.fhir.jpa.subscription.model.CanonicalSubscription",
791                        "ca.uhn.fhir.jpa.subscription.model.ResourceDeliveryMessage"),
792
793        /**
794         * <b>Subscription Hook:</b>
795         * Invoked immediately after the delivery of a subscription, and right before any channel-specific
796         * hooks are invoked (e.g. {@link #SUBSCRIPTION_AFTER_REST_HOOK_DELIVERY}.
797         * <p>
798         * Hooks may accept the following parameters:
799         * </p>
800         * <ul>
801         * <li>ca.uhn.fhir.jpa.subscription.model.CanonicalSubscription</li>
802         * <li>ca.uhn.fhir.jpa.subscription.model.ResourceDeliveryMessage</li>
803         * </ul>
804         * <p>
805         * Hooks should return <code>void</code>.
806         * </p>
807         */
808        SUBSCRIPTION_AFTER_DELIVERY(
809                        void.class,
810                        "ca.uhn.fhir.jpa.subscription.model.CanonicalSubscription",
811                        "ca.uhn.fhir.jpa.subscription.model.ResourceDeliveryMessage"),
812
813        /**
814         * <b>Subscription Hook:</b>
815         * Invoked immediately after the attempted delivery of a subscription, if the delivery
816         * failed.
817         * <p>
818         * Hooks may accept the following parameters:
819         * </p>
820         * <ul>
821         * <li>java.lang.Exception - The exception that caused the failure.  Note this could be an exception thrown by a SUBSCRIPTION_BEFORE_DELIVERY or SUBSCRIPTION_AFTER_DELIVERY interceptor</li>
822         * <li>ca.uhn.fhir.jpa.subscription.model.ResourceDeliveryMessage - the message that triggered the exception</li>
823         * <li>java.lang.Exception</li>
824         * </ul>
825         * <p>
826         * Hooks may return <code>void</code> or may return a <code>boolean</code>. If the method returns
827         * <code>void</code> or <code>true</code>, processing will continue normally, meaning that
828         * an exception will be thrown by the delivery mechanism. This typically means that the
829         * message will be returned to the processing queue. If the method
830         * returns <code>false</code>, processing will be aborted and no further action will be
831         * taken for the delivery.
832         * </p>
833         */
834        SUBSCRIPTION_AFTER_DELIVERY_FAILED(
835                        boolean.class, "ca.uhn.fhir.jpa.subscription.model.ResourceDeliveryMessage", "java.lang.Exception"),
836
837        /**
838         * <b>Subscription Hook:</b>
839         * Invoked immediately after the delivery of a REST HOOK subscription.
840         * <p>
841         * When this hook is called, all processing is complete so this hook should not
842         * make any changes to the parameters.
843         * </p>
844         * Hooks may accept the following parameters:
845         * <ul>
846         * <li>ca.uhn.fhir.jpa.subscription.model.CanonicalSubscription</li>
847         * <li>ca.uhn.fhir.jpa.subscription.model.ResourceDeliveryMessage</li>
848         * </ul>
849         * <p>
850         * Hooks should return <code>void</code>.
851         * </p>
852         */
853        SUBSCRIPTION_AFTER_REST_HOOK_DELIVERY(
854                        void.class,
855                        "ca.uhn.fhir.jpa.subscription.model.CanonicalSubscription",
856                        "ca.uhn.fhir.jpa.subscription.model.ResourceDeliveryMessage"),
857
858        /**
859         * <b>Subscription Hook:</b>
860         * Invoked immediately before the delivery of a REST HOOK subscription.
861         * <p>
862         * Hooks may make changes to the delivery payload, or make changes to the
863         * canonical subscription such as adding headers, modifying the channel
864         * endpoint, etc.
865         * </p>
866         * Hooks may accept the following parameters:
867         * <ul>
868         * <li>ca.uhn.fhir.jpa.subscription.model.CanonicalSubscription</li>
869         * <li>ca.uhn.fhir.jpa.subscription.model.ResourceDeliveryMessage</li>
870         * </ul>
871         * <p>
872         * Hooks may return <code>void</code> or may return a <code>boolean</code>. If the method returns
873         * <code>void</code> or <code>true</code>, processing will continue normally. If the method
874         * returns <code>false</code>, processing will be aborted.
875         * </p>
876         */
877        SUBSCRIPTION_BEFORE_REST_HOOK_DELIVERY(
878                        boolean.class,
879                        "ca.uhn.fhir.jpa.subscription.model.CanonicalSubscription",
880                        "ca.uhn.fhir.jpa.subscription.model.ResourceDeliveryMessage"),
881
882        /**
883         * <b>Subscription Hook:</b>
884         * Invoked immediately after the delivery of MESSAGE subscription.
885         * <p>
886         * When this hook is called, all processing is complete so this hook should not
887         * make any changes to the parameters.
888         * </p>
889         * Hooks may accept the following parameters:
890         * <ul>
891         * <li>ca.uhn.fhir.jpa.subscription.model.CanonicalSubscription</li>
892         * <li>ca.uhn.fhir.jpa.subscription.model.ResourceDeliveryMessage</li>
893         * </ul>
894         * <p>
895         * Hooks should return <code>void</code>.
896         * </p>
897         */
898        SUBSCRIPTION_AFTER_MESSAGE_DELIVERY(
899                        void.class,
900                        "ca.uhn.fhir.jpa.subscription.model.CanonicalSubscription",
901                        "ca.uhn.fhir.jpa.subscription.model.ResourceDeliveryMessage"),
902
903        /**
904         * <b>Subscription Hook:</b>
905         * Invoked immediately before the delivery of a MESSAGE subscription.
906         * <p>
907         * Hooks may make changes to the delivery payload, or make changes to the
908         * canonical subscription such as adding headers, modifying the channel
909         * endpoint, etc.
910         * Furthermore, you may modify the outgoing message wrapper, for example adding headers via ResourceModifiedJsonMessage field.
911         * </p>
912         * Hooks may accept the following parameters:
913         * <ul>
914         * <li>ca.uhn.fhir.jpa.subscription.model.CanonicalSubscription</li>
915         * <li>ca.uhn.fhir.jpa.subscription.model.ResourceDeliveryMessage</li>
916         * <li>ca.uhn.fhir.jpa.subscription.model.ResourceModifiedJsonMessage</li>
917         *
918         * </ul>
919         * <p>
920         * Hooks may return <code>void</code> or may return a <code>boolean</code>. If the method returns
921         * <code>void</code> or <code>true</code>, processing will continue normally. If the method
922         * returns <code>false</code>, processing will be aborted.
923         * </p>
924         */
925        SUBSCRIPTION_BEFORE_MESSAGE_DELIVERY(
926                        boolean.class,
927                        "ca.uhn.fhir.jpa.subscription.model.CanonicalSubscription",
928                        "ca.uhn.fhir.jpa.subscription.model.ResourceDeliveryMessage",
929                        "ca.uhn.fhir.jpa.subscription.model.ResourceModifiedJsonMessage"),
930
931        /**
932         * <b>Subscription Hook:</b>
933         * Invoked whenever a persisted resource (a resource that has just been stored in the
934         * database via a create/update/patch/etc.) is about to be checked for whether any subscriptions
935         * were triggered as a result of the operation.
936         * <p>
937         * Hooks may accept the following parameters:
938         * <ul>
939         * <li>ca.uhn.fhir.jpa.subscription.model.ResourceModifiedMessage - Hooks may modify this parameter. This will affect the checking process.</li>
940         * </ul>
941         * </p>
942         * <p>
943         * Hooks may return <code>void</code> or may return a <code>boolean</code>. If the method returns
944         * <code>void</code> or <code>true</code>, processing will continue normally. If the method
945         * returns <code>false</code>, processing will be aborted.
946         * </p>
947         */
948        SUBSCRIPTION_BEFORE_PERSISTED_RESOURCE_CHECKED(
949                        boolean.class, "ca.uhn.fhir.jpa.subscription.model.ResourceModifiedMessage"),
950
951        /**
952         * <b>Subscription Hook:</b>
953         * Invoked whenever a persisted resource (a resource that has just been stored in the
954         * database via a create/update/patch/etc.) has been checked for whether any subscriptions
955         * were triggered as a result of the operation.
956         * <p>
957         * Hooks may accept the following parameters:
958         * <ul>
959         * <li>ca.uhn.fhir.jpa.subscription.model.ResourceModifiedMessage - This parameter should not be modified as processing is complete when this hook is invoked.</li>
960         * </ul>
961         * </p>
962         * <p>
963         * Hooks should return <code>void</code>.
964         * </p>
965         */
966        SUBSCRIPTION_AFTER_PERSISTED_RESOURCE_CHECKED(
967                        void.class, "ca.uhn.fhir.jpa.subscription.model.ResourceModifiedMessage"),
968
969        /**
970         * <b>Subscription Hook:</b>
971         * Invoked immediately after an active subscription is "registered". In HAPI FHIR, when
972         * a subscription
973         * <p>
974         * Hooks may make changes to the canonicalized subscription and this will have an effect
975         * on processing across this server. Note however that timing issues may occur, since the
976         * subscription is already technically live by the time this hook is called.
977         * </p>
978         * Hooks may accept the following parameters:
979         * <ul>
980         * <li>ca.uhn.fhir.jpa.subscription.model.CanonicalSubscription</li>
981         * </ul>
982         * <p>
983         * Hooks should return <code>void</code>.
984         * </p>
985         */
986        SUBSCRIPTION_AFTER_ACTIVE_SUBSCRIPTION_REGISTERED(
987                        void.class, "ca.uhn.fhir.jpa.subscription.model.CanonicalSubscription"),
988
989        /**
990         * <b>Subscription Hook:</b>
991         * Invoked immediately after an active subscription is "registered". In HAPI FHIR, when
992         * a subscription
993         * <p>
994         * Hooks may make changes to the canonicalized subscription and this will have an effect
995         * on processing across this server. Note however that timing issues may occur, since the
996         * subscription is already technically live by the time this hook is called.
997         * </p>
998         * No parameters are currently supported.
999         * <p>
1000         * Hooks should return <code>void</code>.
1001         * </p>
1002         */
1003        SUBSCRIPTION_AFTER_ACTIVE_SUBSCRIPTION_UNREGISTERED(void.class),
1004
1005        /**
1006         * <b>Storage Hook:</b>
1007         * Invoked when a resource is being deleted in a cascaded delete. This means that
1008         * some other resource is being deleted, but per use request or other
1009         * policy, the given resource (the one supplied as a parameter to this hook)
1010         * is also being deleted.
1011         * <p>
1012         * Hooks may accept the following parameters:
1013         * </p>
1014         * <ul>
1015         * <li>
1016         * ca.uhn.fhir.rest.api.server.RequestDetails - A bean containing details about the request that is about to be processed, including details such as the
1017         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
1018         * pulled out of the servlet request. Note that the bean
1019         * properties are not all guaranteed to be populated, depending on how early during processing the
1020         * exception occurred. <b>Note that this parameter may be null in contexts where the request is not
1021         * known, such as while processing searches</b>
1022         * </li>
1023         * <li>
1024         * ca.uhn.fhir.rest.server.servlet.ServletRequestDetails - A bean containing details about the request that is about to be processed, including details such as the
1025         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
1026         * pulled out of the servlet request. This parameter is identical to the RequestDetails parameter above but will
1027         * only be populated when operating in a RestfulServer implementation. It is provided as a convenience.
1028         * </li>
1029         * <li>
1030         * ca.uhn.fhir.jpa.util.DeleteConflictList - Contains the details about the delete conflicts that are
1031         * being resolved via deletion. The source resource is the resource that will be deleted, and
1032         * is a cascade because the target resource is already being deleted.
1033         * </li>
1034         * <li>
1035         * org.hl7.fhir.instance.model.api.IBaseResource - The actual resource that is about to be deleted via a cascading delete
1036         * </li>
1037         * </ul>
1038         * <p>
1039         * Hooks should return <code>void</code>. They may choose to throw an exception however, in
1040         * which case the delete should be rolled back.
1041         * </p>
1042         */
1043        STORAGE_CASCADE_DELETE(
1044                        void.class,
1045                        "ca.uhn.fhir.rest.api.server.RequestDetails",
1046                        "ca.uhn.fhir.rest.server.servlet.ServletRequestDetails",
1047                        "ca.uhn.fhir.jpa.api.model.DeleteConflictList",
1048                        "org.hl7.fhir.instance.model.api.IBaseResource"),
1049
1050        /**
1051         * <b>Subscription Topic Hook:</b>
1052         * Invoked whenever a persisted resource (a resource that has just been stored in the
1053         * database via a create/update/patch/etc.) is about to be checked for whether any subscription topics
1054         * were triggered as a result of the operation.
1055         * <p>
1056         * Hooks may accept the following parameters:
1057         * <ul>
1058         * <li>ca.uhn.fhir.jpa.subscription.model.ResourceModifiedMessage - Hooks may modify this parameter. This will affect the checking process.</li>
1059         * </ul>
1060         * </p>
1061         * <p>
1062         * Hooks may return <code>void</code> or may return a <code>boolean</code>. If the method returns
1063         * <code>void</code> or <code>true</code>, processing will continue normally. If the method
1064         * returns <code>false</code>, processing will be aborted.
1065         * </p>
1066         */
1067        SUBSCRIPTION_TOPIC_BEFORE_PERSISTED_RESOURCE_CHECKED(
1068                        boolean.class, "ca.uhn.fhir.jpa.subscription.model.ResourceModifiedMessage"),
1069
1070        /**
1071         * <b>Subscription Topic Hook:</b>
1072         * Invoked whenever a persisted resource (a resource that has just been stored in the
1073         * database via a create/update/patch/etc.) has been checked for whether any subscription topics
1074         * were triggered as a result of the operation.
1075         * <p>
1076         * Hooks may accept the following parameters:
1077         * <ul>
1078         * <li>ca.uhn.fhir.jpa.subscription.model.ResourceModifiedMessage - This parameter should not be modified as processing is complete when this hook is invoked.</li>
1079         * </ul>
1080         * </p>
1081         * <p>
1082         * Hooks should return <code>void</code>.
1083         * </p>
1084         */
1085        SUBSCRIPTION_TOPIC_AFTER_PERSISTED_RESOURCE_CHECKED(
1086                        void.class, "ca.uhn.fhir.jpa.subscription.model.ResourceModifiedMessage"),
1087
1088        /**
1089         * <b>Storage Hook:</b>
1090         * Invoked when we are about to <a href="https://smilecdr.com/docs/fhir_repository/creating_data.html#auto-create-placeholder-reference-targets">Auto-Create a Placeholder Reference</a>.
1091         * Hooks may modify/enhance the placeholder reference target that is about to be created, or
1092         * reject the creation of the resource, which generally means that the transaction will be
1093         * rejected instead (because of the invalid reference).
1094         * <p>
1095         * Hooks may accept the following parameters:
1096         * </p>
1097         * <ul>
1098         * <li>
1099         * ca.uhn.fhir.storage.interceptor.AutoCreatePlaceholderReferenceTargetRequest - Contains details about the placeholder that is about to be created, including the source resource whose reference is being fulfilled, as well as the candidate placeholder resource that will be created.
1100         * </li>
1101         * <li>
1102         * ca.uhn.fhir.rest.api.server.RequestDetails - A bean containing details about the request that is about to be processed, including details such as the
1103         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
1104         * pulled out of the servlet request.
1105         * </li>
1106         * <li>
1107         * ca.uhn.fhir.rest.server.servlet.ServletRequestDetails - A bean containing details about the request that is about to be processed, including details such as the
1108         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
1109         * pulled out of the servlet request. This parameter is identical to the RequestDetails parameter above but will
1110         * only be populated when operating in a RestfulServer implementation. It is provided as a convenience.
1111         * </li>
1112         * </ul>
1113         * <p>
1114         * Hooks may return <code>void</code> (in which case the placeholder creation will proceed as normal),
1115         * an object of type
1116         * <code>ca.uhn.fhir.storage.interceptor.AutoCreatePlaceholderReferenceTargetResponse</code>
1117         * (in which case the response object can approve or reject the creation),
1118         * and can throw exceptions (which will trigger an appropriate error message being returned
1119         * to the client).
1120         * </p>
1121         */
1122        STORAGE_PRE_AUTO_CREATE_PLACEHOLDER_REFERENCE(
1123                        "ca.uhn.fhir.storage.interceptor.AutoCreatePlaceholderReferenceTargetResponse",
1124                        "ca.uhn.fhir.storage.interceptor.AutoCreatePlaceholderReferenceTargetRequest",
1125                        "ca.uhn.fhir.rest.api.server.RequestDetails",
1126                        "ca.uhn.fhir.rest.server.servlet.ServletRequestDetails"),
1127
1128        /**
1129         * <b>Storage Hook:</b>
1130         * Invoked when a Bulk Export job is being kicked off, but before any permission checks
1131         * have been done.
1132         * This hook can be used to modify or update parameters as need be before
1133         * authorization/permission checks are done.
1134         * <p>
1135         * Hooks may accept the following parameters:
1136         * </p>
1137         * <ul>
1138         * <li>
1139         * ca.uhn.fhir.jpa.bulk.export.api.BulkDataExportOptions - The details of the job being kicked off
1140         * </li>
1141         * <li>
1142         * ca.uhn.fhir.rest.api.server.RequestDetails - A bean containing details about the request that is about to be processed, including details such as the
1143         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
1144         * pulled out of the servlet request. Note that the bean
1145         * properties are not all guaranteed to be populated, depending on how early during processing the
1146         * exception occurred. <b>Note that this parameter may be null in contexts where the request is not
1147         * known, such as while processing searches</b>
1148         * </li>
1149         * <li>
1150         * ca.uhn.fhir.rest.server.servlet.ServletRequestDetails - A bean containing details about the request that is about to be processed, including details such as the
1151         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
1152         * pulled out of the servlet request. This parameter is identical to the RequestDetails parameter above but will
1153         * only be populated when operating in a RestfulServer implementation. It is provided as a convenience.
1154         * </li>
1155         * </ul>
1156         * <p>
1157         * Hooks should return <code>void</code>, and can throw exceptions.
1158         * </p>
1159         */
1160        STORAGE_PRE_INITIATE_BULK_EXPORT(
1161                        void.class,
1162                        "ca.uhn.fhir.rest.api.server.bulk.BulkExportJobParameters",
1163                        "ca.uhn.fhir.rest.api.server.RequestDetails",
1164                        "ca.uhn.fhir.rest.server.servlet.ServletRequestDetails"),
1165
1166        /**
1167         * <b>Storage Hook:</b>
1168         * Invoked when a Bulk Export job is being kicked off. Hook methods may modify
1169         * the request, or raise an exception to prevent it from being initiated.
1170         * This hook is not guaranteed to be called before permission checks, and so
1171         * anu implementers should be cautious of changing the options in ways that would
1172         * affect permissions.
1173         * <p>
1174         * Hooks may accept the following parameters:
1175         * </p>
1176         * <ul>
1177         * <li>
1178         * ca.uhn.fhir.jpa.bulk.export.api.BulkDataExportOptions - The details of the job being kicked off
1179         * </li>
1180         * <li>
1181         * ca.uhn.fhir.rest.api.server.RequestDetails - A bean containing details about the request that is about to be processed, including details such as the
1182         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
1183         * pulled out of the servlet request. Note that the bean
1184         * properties are not all guaranteed to be populated, depending on how early during processing the
1185         * exception occurred. <b>Note that this parameter may be null in contexts where the request is not
1186         * known, such as while processing searches</b>
1187         * </li>
1188         * <li>
1189         * ca.uhn.fhir.rest.server.servlet.ServletRequestDetails - A bean containing details about the request that is about to be processed, including details such as the
1190         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
1191         * pulled out of the servlet request. This parameter is identical to the RequestDetails parameter above but will
1192         * only be populated when operating in a RestfulServer implementation. It is provided as a convenience.
1193         * </li>
1194         * </ul>
1195         * <p>
1196         * Hooks should return <code>void</code>, and can throw exceptions.
1197         * </p>
1198         */
1199        STORAGE_INITIATE_BULK_EXPORT(
1200                        void.class,
1201                        "ca.uhn.fhir.rest.api.server.bulk.BulkExportJobParameters",
1202                        "ca.uhn.fhir.rest.api.server.RequestDetails",
1203                        "ca.uhn.fhir.rest.server.servlet.ServletRequestDetails"),
1204
1205        /**
1206         * <b>Storage Hook:</b>
1207         * Invoked when a Bulk Export job is being processed. If any hook method is registered
1208         * for this pointcut, the hook method will be called once for each resource that is
1209         * loaded for inclusion in a bulk export file. Hook methods may modify
1210         * the resource object and this modification will affect the copy that is stored in the
1211         * bulk export data file (but will not affect the original). Hook methods may also
1212         * return <code>false</code> in order to request that the resource be filtered
1213         * from the export.
1214         * <p>
1215         * Hooks may accept the following parameters:
1216         * </p>
1217         * <ul>
1218         * <li>
1219         * ca.uhn.fhir.rest.api.server.bulk.BulkExportJobParameters - The details of the job being kicked off
1220         * </li>
1221         * <li>
1222         *org.hl7.fhir.instance.model.api.IBaseResource - The resource that will be included in the file
1223         * </li>
1224         * </ul>
1225         * <p>
1226         * Hooks methods may return <code>false</code> to indicate that the resource should be
1227         * filtered out. Otherwise, hook methods should return <code>true</code>.
1228         * </p>
1229         *
1230         * @since 6.8.0
1231         */
1232        STORAGE_BULK_EXPORT_RESOURCE_INCLUSION(
1233                        boolean.class,
1234                        "ca.uhn.fhir.rest.api.server.bulk.BulkExportJobParameters",
1235                        "org.hl7.fhir.instance.model.api.IBaseResource"),
1236
1237        /**
1238         * <b>Storage Hook:</b>
1239         * Invoked when a set of resources are about to be deleted and expunged via url like {@code http://localhost/Patient?active=false&_expunge=true}.
1240         * <p>
1241         * Hooks may accept the following parameters:
1242         * </p>
1243         * <ul>
1244         * <li>
1245         * ca.uhn.fhir.rest.api.server.RequestDetails - A bean containing details about the request that is about to be processed, including details such as the
1246         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
1247         * pulled out of the servlet request. Note that the bean
1248         * properties are not all guaranteed to be populated, depending on how early during processing the
1249         * exception occurred. <b>Note that this parameter may be null in contexts where the request is not
1250         * known, such as while processing searches</b>
1251         * </li>
1252         * <li>
1253         * ca.uhn.fhir.rest.server.servlet.ServletRequestDetails - A bean containing details about the request that is about to be processed, including details such as the
1254         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
1255         * pulled out of the servlet request. This parameter is identical to the RequestDetails parameter above but will
1256         * only be populated when operating in a RestfulServer implementation. It is provided as a convenience.
1257         * </li>
1258         * <li>
1259         * java.lang.String - Contains the url used to delete and expunge the resources
1260         * </li>
1261         * </ul>
1262         * <p>
1263         * Hooks should return <code>void</code>. They may choose to throw an exception however, in
1264         * which case the delete expunge will not occur.
1265         * </p>
1266         */
1267        STORAGE_PRE_DELETE_EXPUNGE(
1268                        void.class,
1269                        "ca.uhn.fhir.rest.api.server.RequestDetails",
1270                        "ca.uhn.fhir.rest.server.servlet.ServletRequestDetails",
1271                        "java.lang.String"),
1272
1273        /**
1274         * <b>Storage Hook:</b>
1275         * Invoked when a batch of resource pids are about to be deleted and expunged via url like {@code http://localhost/Patient?active=false&_expunge=true}.
1276         * <p>
1277         * Hooks may accept the following parameters:
1278         * </p>
1279         * <ul>
1280         * <li>
1281         * java.lang.String - the name of the resource type being deleted
1282         * </li>
1283         * <li>
1284         * java.util.List - the list of Long pids of the resources about to be deleted
1285         * </li>
1286         * <li>
1287         * java.util.concurrent.atomic.AtomicLong - holds a running tally of all entities deleted so far.
1288         * If the pointcut callback deletes any entities, then this parameter should be incremented by the total number
1289         * of additional entities deleted.
1290         * </li>
1291         * <li>
1292         * ca.uhn.fhir.rest.api.server.RequestDetails - A bean containing details about the request that is about to be processed, including details such as the
1293         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
1294         * pulled out of the servlet request. Note that the bean
1295         * properties are not all guaranteed to be populated, depending on how early during processing the
1296         * exception occurred. <b>Note that this parameter may be null in contexts where the request is not
1297         * known, such as while processing searches</b>
1298         * </li>
1299         * <li>
1300         * ca.uhn.fhir.rest.server.servlet.ServletRequestDetails - A bean containing details about the request that is about to be processed, including details such as the
1301         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
1302         * pulled out of the servlet request. This parameter is identical to the RequestDetails parameter above but will
1303         * only be populated when operating in a RestfulServer implementation. It is provided as a convenience.
1304         * </li>
1305         * <li>
1306         * java.lang.String - Contains the url used to delete and expunge the resources
1307         * </li>
1308         * </ul>
1309         * <p>
1310         * Hooks should return <code>void</code>. They may choose to throw an exception however, in
1311         * which case the delete expunge will not occur.
1312         * </p>
1313         */
1314        STORAGE_PRE_DELETE_EXPUNGE_PID_LIST(
1315                        void.class,
1316                        "java.lang.String",
1317                        "java.util.List",
1318                        "java.util.concurrent.atomic.AtomicLong",
1319                        "ca.uhn.fhir.rest.api.server.RequestDetails",
1320                        "ca.uhn.fhir.rest.server.servlet.ServletRequestDetails"),
1321
1322        /**
1323         * <b>Storage Hook:</b>
1324         * Invoked when one or more resources may be returned to the user, whether as a part of a READ,
1325         * a SEARCH, or even as the response to a CREATE/UPDATE, etc.
1326         * <p>
1327         * This hook is invoked when a resource has been loaded by the storage engine and
1328         * is being returned to the HTTP stack for response. This is not a guarantee that the
1329         * client will ultimately see it, since filters/headers/etc may affect what
1330         * is returned but if a resource is loaded it is likely to be used.
1331         * Note also that caching may affect whether this pointcut is invoked.
1332         * </p>
1333         * <p>
1334         * Hooks will have access to the contents of the resource being returned
1335         * and may choose to make modifications. These changes will be reflected in
1336         * returned resource but have no effect on storage.
1337         * </p>
1338         * Hooks may accept the following parameters:
1339         * <ul>
1340         * <li>
1341         * ca.uhn.fhir.rest.api.server.IPreResourceAccessDetails - Contains details about the
1342         * specific resources being returned.
1343         * </li>
1344         * <li>
1345         * ca.uhn.fhir.rest.api.server.RequestDetails - A bean containing details about the request that is about to be processed, including details such as the
1346         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
1347         * pulled out of the servlet request. Note that the bean
1348         * properties are not all guaranteed to be populated, depending on how early during processing the
1349         * exception occurred. <b>Note that this parameter may be null in contexts where the request is not
1350         * known, such as while processing searches</b>
1351         * </li>
1352         * <li>
1353         * ca.uhn.fhir.rest.server.servlet.ServletRequestDetails - A bean containing details about the request that is about to be processed, including details such as the
1354         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
1355         * pulled out of the servlet request. This parameter is identical to the RequestDetails parameter above but will
1356         * only be populated when operating in a RestfulServer implementation. It is provided as a convenience.
1357         * </li>
1358         * </ul>
1359         * <p>
1360         * Hooks should return <code>void</code>.
1361         * </p>
1362         */
1363        STORAGE_PREACCESS_RESOURCES(
1364                        void.class,
1365                        "ca.uhn.fhir.rest.api.server.IPreResourceAccessDetails",
1366                        "ca.uhn.fhir.rest.api.server.RequestDetails",
1367                        "ca.uhn.fhir.rest.server.servlet.ServletRequestDetails"),
1368
1369        /**
1370         * <b>Storage Hook:</b>
1371         * Invoked when the storage engine is about to check for the existence of a pre-cached search
1372         * whose results match the given search parameters.
1373         * <p>
1374         * Hooks may accept the following parameters:
1375         * </p>
1376         * <ul>
1377         * <li>
1378         * ca.uhn.fhir.jpa.searchparam.SearchParameterMap - Contains the details of the search being checked
1379         * </li>
1380         * <li>
1381         * ca.uhn.fhir.rest.api.server.RequestDetails - A bean containing details about the request that is about to be processed, including details such as the
1382         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
1383         * pulled out of the servlet request. Note that the bean
1384         * properties are not all guaranteed to be populated, depending on how early during processing the
1385         * exception occurred. <b>Note that this parameter may be null in contexts where the request is not
1386         * known, such as while processing searches</b>
1387         * </li>
1388         * <li>
1389         * ca.uhn.fhir.rest.server.servlet.ServletRequestDetails - A bean containing details about the request that is about to be processed, including details such as the
1390         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
1391         * pulled out of the servlet request. This parameter is identical to the RequestDetails parameter above but will
1392         * only be populated when operating in a RestfulServer implementation. It is provided as a convenience.
1393         * </li>
1394         * </ul>
1395         * <p>
1396         * Hooks may return <code>boolean</code>. If the hook method returns
1397         * <code>false</code>, the server will not attempt to check for a cached
1398         * search no matter what.
1399         * </p>
1400         */
1401        STORAGE_PRECHECK_FOR_CACHED_SEARCH(
1402                        boolean.class,
1403                        "ca.uhn.fhir.jpa.searchparam.SearchParameterMap",
1404                        "ca.uhn.fhir.rest.api.server.RequestDetails",
1405                        "ca.uhn.fhir.rest.server.servlet.ServletRequestDetails"),
1406
1407        /**
1408         * <b>Storage Hook:</b>
1409         * Invoked when a search is starting, prior to selecting the partition for the search.
1410         * Hooks may examine the request and potentially modify it if they wish to affect the
1411         * partition selection.
1412         * <p>
1413         * This hook is called shortly before {@link #STORAGE_PRESEARCH_REGISTERED}. It is not
1414         * called if the search has an explicit partition already selected.
1415         * </p>
1416         * <p>
1417         * Hooks may accept the following parameters:
1418         * </p>
1419         * <ul>
1420         * <li>
1421         * ca.uhn.fhir.rest.server.util.ICachedSearchDetails - Contains the details of the search that
1422         * is being created and initialized. Interceptors may use this parameter to modify aspects of the search
1423         * before it is stored and executed.
1424         * </li>
1425         * <li>
1426         * ca.uhn.fhir.rest.api.server.RequestDetails - A bean containing details about the request that is about to be processed, including details such as the
1427         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
1428         * pulled out of the servlet request. Note that the bean
1429         * properties are not all guaranteed to be populated, depending on how early during processing the
1430         * exception occurred. <b>Note that this parameter may be null in contexts where the request is not
1431         * known, such as while processing searches</b>
1432         * </li>
1433         * <li>
1434         * ca.uhn.fhir.rest.server.servlet.ServletRequestDetails - A bean containing details about the request that is about to be processed, including details such as the
1435         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
1436         * pulled out of the servlet request. This parameter is identical to the RequestDetails parameter above but will
1437         * only be populated when operating in a RestfulServer implementation. It is provided as a convenience.
1438         * </li>
1439         * <li>
1440         * ca.uhn.fhir.jpa.searchparam.SearchParameterMap - Contains the details of the search being checked. This can be modified.
1441         * </li>
1442         * </ul>
1443         * <p>
1444         * Hooks should return <code>void</code>.
1445         * </p>
1446         *
1447         * @since 8.6.0
1448         */
1449        STORAGE_PRESEARCH_PARTITION_SELECTED(
1450                        void.class,
1451                        "ca.uhn.fhir.rest.server.util.ICachedSearchDetails",
1452                        "ca.uhn.fhir.rest.api.server.RequestDetails",
1453                        "ca.uhn.fhir.rest.server.servlet.ServletRequestDetails",
1454                        "ca.uhn.fhir.jpa.searchparam.SearchParameterMap"),
1455
1456        /**
1457         * <b>Storage Hook:</b>
1458         * Invoked when a search is starting, prior to creating a record for the search.
1459         * <p>
1460         * Hooks may accept the following parameters:
1461         * </p>
1462         * <ul>
1463         * <li>
1464         * ca.uhn.fhir.rest.server.util.ICachedSearchDetails - Contains the details of the search that
1465         * is being created and initialized. Interceptors may use this parameter to modify aspects of the search
1466         * before it is stored and executed.
1467         * </li>
1468         * <li>
1469         * ca.uhn.fhir.rest.api.server.RequestDetails - A bean containing details about the request that is about to be processed, including details such as the
1470         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
1471         * pulled out of the servlet request. Note that the bean
1472         * properties are not all guaranteed to be populated, depending on how early during processing the
1473         * exception occurred. <b>Note that this parameter may be null in contexts where the request is not
1474         * known, such as while processing searches</b>
1475         * </li>
1476         * <li>
1477         * ca.uhn.fhir.rest.server.servlet.ServletRequestDetails - A bean containing details about the request that is about to be processed, including details such as the
1478         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
1479         * pulled out of the servlet request. This parameter is identical to the RequestDetails parameter above but will
1480         * only be populated when operating in a RestfulServer implementation. It is provided as a convenience.
1481         * </li>
1482         * <li>
1483         * ca.uhn.fhir.jpa.searchparam.SearchParameterMap - Contains the details of the search being checked. This can be modified.
1484         * </li>
1485         * <li>
1486         * ca.uhn.fhir.interceptor.model.RequestPartitionId - The partition associated with the request (or {@literal null} if the server is not partitioned)
1487         * </li>
1488         * </ul>
1489         * <p>
1490         * Hooks should return <code>void</code>.
1491         * </p>
1492         */
1493        STORAGE_PRESEARCH_REGISTERED(
1494                        void.class,
1495                        "ca.uhn.fhir.rest.server.util.ICachedSearchDetails",
1496                        "ca.uhn.fhir.rest.api.server.RequestDetails",
1497                        "ca.uhn.fhir.rest.server.servlet.ServletRequestDetails",
1498                        "ca.uhn.fhir.jpa.searchparam.SearchParameterMap",
1499                        "ca.uhn.fhir.interceptor.model.RequestPartitionId"),
1500
1501        /**
1502         * <b>Storage Hook:</b>
1503         * Invoked when one or more resources may be returned to the user, whether as a part of a READ,
1504         * a SEARCH, or even as the response to a CREATE/UPDATE, etc.
1505         * <p>
1506         * This hook is invoked when a resource has been loaded by the storage engine and
1507         * is being returned to the HTTP stack for response.
1508         * This is not a guarantee that the
1509         * client will ultimately see it, since filters/headers/etc may affect what
1510         * is returned but if a resource is loaded it is likely to be used.
1511         * Note also that caching may affect whether this pointcut is invoked.
1512         * </p>
1513         * <p>
1514         * Hooks will have access to the contents of the resource being returned
1515         * and may choose to make modifications. These changes will be reflected in
1516         * returned resource but have no effect on storage.
1517         * </p>
1518         * Hooks may accept the following parameters:
1519         * <ul>
1520         * <li>
1521         * ca.uhn.fhir.rest.api.server.IPreResourceShowDetails - Contains the resources that
1522         * will be shown to the user. This object may be manipulated in order to modify
1523         * the actual resources being shown to the user (e.g. for masking)
1524         * </li>
1525         * <li>
1526         * ca.uhn.fhir.rest.api.server.RequestDetails - A bean containing details about the request that is about to be processed, including details such as the
1527         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
1528         * pulled out of the servlet request. Note that the bean
1529         * properties are not all guaranteed to be populated, depending on how early during processing the
1530         * exception occurred. <b>Note that this parameter may be null in contexts where the request is not
1531         * known, such as while processing searches</b>
1532         * </li>
1533         * <li>
1534         * ca.uhn.fhir.rest.server.servlet.ServletRequestDetails - A bean containing details about the request that is about to be processed, including details such as the
1535         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
1536         * pulled out of the servlet request. This parameter is identical to the RequestDetails parameter above but will
1537         * only be populated when operating in a RestfulServer implementation. It is provided as a convenience.
1538         * </li>
1539         * </ul>
1540         * <p>
1541         * Hooks should return <code>void</code>.
1542         * </p>
1543         */
1544        STORAGE_PRESHOW_RESOURCES(
1545                        void.class,
1546                        "ca.uhn.fhir.rest.api.server.IPreResourceShowDetails",
1547                        "ca.uhn.fhir.rest.api.server.RequestDetails",
1548                        "ca.uhn.fhir.rest.server.servlet.ServletRequestDetails"),
1549
1550        /**
1551         * <b>Storage Hook:</b>
1552         * Invoked before a resource will be created, immediately before the resource
1553         * is persisted to the database.
1554         * <p>
1555         * Hooks will have access to the contents of the resource being created
1556         * and may choose to make modifications to it. These changes will be
1557         * reflected in permanent storage.
1558         * </p>
1559         * Hooks may accept the following parameters:
1560         * <ul>
1561         * <li>org.hl7.fhir.instance.model.api.IBaseResource</li>
1562         * <li>
1563         * ca.uhn.fhir.rest.api.server.RequestDetails - A bean containing details about the request that is about to be processed, including details such as the
1564         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
1565         * pulled out of the servlet request. Note that the bean
1566         * properties are not all guaranteed to be populated, depending on how early during processing the
1567         * exception occurred.
1568         * </li>
1569         * <li>
1570         * ca.uhn.fhir.rest.server.servlet.ServletRequestDetails - A bean containing details about the request that is about to be processed, including details such as the
1571         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
1572         * pulled out of the servlet request. This parameter is identical to the RequestDetails parameter above but will
1573         * only be populated when operating in a RestfulServer implementation. It is provided as a convenience.
1574         * </li>
1575         * <li>
1576         * ca.uhn.fhir.rest.api.server.storage.TransactionDetails - The outer transaction details object (since 5.0.0)
1577         * </li>
1578         * </ul>
1579         * <p>
1580         * Hooks should return <code>void</code>.
1581         * </p>
1582         */
1583        STORAGE_PRESTORAGE_RESOURCE_CREATED(
1584                        void.class,
1585                        "org.hl7.fhir.instance.model.api.IBaseResource",
1586                        "ca.uhn.fhir.rest.api.server.RequestDetails",
1587                        "ca.uhn.fhir.rest.server.servlet.ServletRequestDetails",
1588                        "ca.uhn.fhir.rest.api.server.storage.TransactionDetails",
1589                        "ca.uhn.fhir.interceptor.model.RequestPartitionId"),
1590
1591        /**
1592         * <b>Storage Hook:</b>
1593         * Invoked before client-assigned id is created.
1594         * <p>
1595         * Hooks will have access to the contents of the resource being created
1596         * so that client-assigned ids can be allowed/denied. These changes will
1597         * be reflected in permanent storage.
1598         * </p>
1599         * Hooks may accept the following parameters:
1600         * <ul>
1601         * <li>org.hl7.fhir.instance.model.api.IBaseResource</li>
1602         * <li>
1603         * ca.uhn.fhir.rest.api.server.RequestDetails - A bean containing details about the request that is about to be processed, including details such as the
1604         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
1605         * pulled out of the servlet request. Note that the bean
1606         * properties are not all guaranteed to be populated, depending on how early during processing the
1607         * exception occurred.
1608         * </li>
1609         * </ul>
1610         * <p>
1611         * Hooks should return <code>void</code>.
1612         * </p>
1613         */
1614        STORAGE_PRESTORAGE_CLIENT_ASSIGNED_ID(
1615                        void.class, "org.hl7.fhir.instance.model.api.IBaseResource", "ca.uhn.fhir.rest.api.server.RequestDetails"),
1616
1617        /**
1618         * <b>Storage Hook:</b>
1619         * Invoked before a resource will be updated, immediately before the resource
1620         * is persisted to the database.
1621         * <p>
1622         * Hooks will have access to the contents of the resource being updated
1623         * (both the previous and new contents) and may choose to make modifications
1624         * to the new contents of the resource. These changes will be reflected in
1625         * permanent storage.
1626         * </p>
1627         * <p>
1628         * <b>NO-OPS:</b> If the client has submitted an update that does not actually make any changes
1629         * (i.e. the resource they include in the PUT body is identical to the content that
1630         * was already stored) the server may choose to ignore the update and perform
1631         * a "NO-OP". In this case, this pointcut is still invoked, but {@link #STORAGE_PRECOMMIT_RESOURCE_UPDATED}
1632         * will not be. Hook methods for this pointcut may make changes to the new contents of the
1633         * resource being updated, and in this case the NO-OP will be cancelled and
1634         * {@link #STORAGE_PRECOMMIT_RESOURCE_UPDATED} will also be invoked.
1635         * </p>
1636         * Hooks may accept the following parameters:
1637         * <ul>
1638         * <li>org.hl7.fhir.instance.model.api.IBaseResource - The previous contents of the resource being updated</li>
1639         * <li>org.hl7.fhir.instance.model.api.IBaseResource - The new contents of the resource being updated</li>
1640         * <li>
1641         * ca.uhn.fhir.rest.api.server.RequestDetails - A bean containing details about the request that is about to be processed, including details such as the
1642         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
1643         * pulled out of the servlet request. Note that the bean
1644         * properties are not all guaranteed to be populated, depending on how early during processing the
1645         * exception occurred.
1646         * </li>
1647         * <li>
1648         * ca.uhn.fhir.rest.server.servlet.ServletRequestDetails - A bean containing details about the request that is about to be processed, including details such as the
1649         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
1650         * pulled out of the servlet request. This parameter is identical to the RequestDetails parameter above but will
1651         * only be populated when operating in a RestfulServer implementation. It is provided as a convenience.
1652         * </li>
1653         * <li>
1654         * ca.uhn.fhir.rest.api.server.storage.TransactionDetails - The outer transaction details object (since 5.0.0)
1655         * </li>
1656         * </ul>
1657         * <p>
1658         * Hooks should return <code>void</code>.
1659         * </p>
1660         */
1661        STORAGE_PRESTORAGE_RESOURCE_UPDATED(
1662                        void.class,
1663                        "org.hl7.fhir.instance.model.api.IBaseResource",
1664                        "org.hl7.fhir.instance.model.api.IBaseResource",
1665                        "ca.uhn.fhir.rest.api.server.RequestDetails",
1666                        "ca.uhn.fhir.rest.server.servlet.ServletRequestDetails",
1667                        "ca.uhn.fhir.rest.api.server.storage.TransactionDetails"),
1668
1669        /**
1670         * <b>Storage Hook:</b>
1671         * Invoked before a resource will be deleted, immediately before the resource
1672         * is removed from the database.
1673         * <p>
1674         * Hooks will have access to the contents of the resource being deleted
1675         * and may choose to make modifications related to it. These changes will be
1676         * reflected in permanent storage.
1677         * </p>
1678         * Hooks may accept the following parameters:
1679         * <ul>
1680         * <li>org.hl7.fhir.instance.model.api.IBaseResource - The resource being deleted</li>
1681         * <li>
1682         * ca.uhn.fhir.rest.api.server.RequestDetails - A bean containing details about the request that is about to be processed, including details such as the
1683         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
1684         * pulled out of the servlet request. Note that the bean
1685         * properties are not all guaranteed to be populated, depending on how early during processing the
1686         * exception occurred.
1687         * </li>
1688         * <li>
1689         * ca.uhn.fhir.rest.server.servlet.ServletRequestDetails - A bean containing details about the request that is about to be processed, including details such as the
1690         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
1691         * pulled out of the servlet request. This parameter is identical to the RequestDetails parameter above but will
1692         * only be populated when operating in a RestfulServer implementation. It is provided as a convenience.
1693         * </li>
1694         * <li>
1695         * ca.uhn.fhir.rest.api.server.storage.TransactionDetails - The outer transaction details object (since 5.0.0)
1696         * </li>
1697         * </ul>
1698         * <p>
1699         * Hooks should return <code>void</code>.
1700         * </p>
1701         */
1702        STORAGE_PRESTORAGE_RESOURCE_DELETED(
1703                        void.class,
1704                        "org.hl7.fhir.instance.model.api.IBaseResource",
1705                        "ca.uhn.fhir.rest.api.server.RequestDetails",
1706                        "ca.uhn.fhir.rest.server.servlet.ServletRequestDetails",
1707                        "ca.uhn.fhir.rest.api.server.storage.TransactionDetails"),
1708
1709        /**
1710         * <b>Storage Hook:</b>
1711         * Invoked before a resource will be created, immediately before the transaction
1712         * is committed (after all validation and other business rules have successfully
1713         * completed, and any other database activity is complete.
1714         * <p>
1715         * Hooks will have access to the contents of the resource being created
1716         * but should generally not make any
1717         * changes as storage has already occurred. Changes will not be reflected
1718         * in storage, but may be reflected in the HTTP response.
1719         * </p>
1720         * Hooks may accept the following parameters:
1721         * <ul>
1722         * <li>org.hl7.fhir.instance.model.api.IBaseResource</li>
1723         * <li>
1724         * ca.uhn.fhir.rest.api.server.RequestDetails - A bean containing details about the request that is about to be processed, including details such as the
1725         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
1726         * pulled out of the servlet request. Note that the bean
1727         * properties are not all guaranteed to be populated, depending on how early during processing the
1728         * exception occurred.
1729         * </li>
1730         * <li>
1731         * ca.uhn.fhir.rest.server.servlet.ServletRequestDetails - A bean containing details about the request that is about to be processed, including details such as the
1732         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
1733         * pulled out of the servlet request. This parameter is identical to the RequestDetails parameter above but will
1734         * only be populated when operating in a RestfulServer implementation. It is provided as a convenience.
1735         * </li>
1736         * <li>
1737         * ca.uhn.fhir.rest.api.server.storage.TransactionDetails - The outer transaction details object (since 5.0.0)
1738         * </li>
1739         * <li>
1740         * Boolean - Whether this pointcut invocation was deferred or not(since 5.4.0)
1741         * </li>
1742         * <li>
1743         * ca.uhn.fhir.rest.api.InterceptorInvocationTimingEnum - The timing at which the invocation of the interceptor took place. Options are ACTIVE and DEFERRED.
1744         * </li>
1745         * </ul>
1746         * <p>
1747         * Hooks should return <code>void</code>.
1748         * </p>
1749         */
1750        STORAGE_PRECOMMIT_RESOURCE_CREATED(
1751                        void.class,
1752                        "org.hl7.fhir.instance.model.api.IBaseResource",
1753                        "ca.uhn.fhir.rest.api.server.RequestDetails",
1754                        "ca.uhn.fhir.rest.server.servlet.ServletRequestDetails",
1755                        "ca.uhn.fhir.rest.api.server.storage.TransactionDetails",
1756                        "ca.uhn.fhir.rest.api.InterceptorInvocationTimingEnum"),
1757
1758        /**
1759         * <b>Storage Hook:</b>
1760         * Invoked before a resource will be updated, immediately before the transaction
1761         * is committed (after all validation and other business rules have successfully
1762         * completed, and any other database activity is complete.
1763         * <p>
1764         * Hooks will have access to the contents of the resource being updated
1765         * (both the previous and new contents) but should generally not make any
1766         * changes as storage has already occurred. Changes will not be reflected
1767         * in storage, but may be reflected in the HTTP response.
1768         * </p>
1769         * <p>
1770         * NO-OP note: See {@link #STORAGE_PRESTORAGE_RESOURCE_UPDATED} for a note on
1771         * no-op updates when no changes are detected.
1772         * </p>
1773         * Hooks may accept the following parameters:
1774         * <ul>
1775         * <li>org.hl7.fhir.instance.model.api.IBaseResource - The previous contents of the resource</li>
1776         * <li>org.hl7.fhir.instance.model.api.IBaseResource - The proposed new contents of the resource</li>
1777         * <li>
1778         * ca.uhn.fhir.rest.api.server.RequestDetails - A bean containing details about the request that is about to be processed, including details such as the
1779         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
1780         * pulled out of the servlet request. Note that the bean
1781         * properties are not all guaranteed to be populated, depending on how early during processing the
1782         * exception occurred.
1783         * </li>
1784         * <li>
1785         * ca.uhn.fhir.rest.server.servlet.ServletRequestDetails - A bean containing details about the request that is about to be processed, including details such as the
1786         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
1787         * pulled out of the servlet request. This parameter is identical to the RequestDetails parameter above but will
1788         * only be populated when operating in a RestfulServer implementation. It is provided as a convenience.
1789         * </li>
1790         * <li>
1791         * ca.uhn.fhir.rest.api.server.storage.TransactionDetails - The outer transaction details object (since 5.0.0)
1792         * </li>
1793         * <li>
1794         * ca.uhn.fhir.rest.api.InterceptorInvocationTimingEnum - The timing at which the invocation of the interceptor took place. Options are ACTIVE and DEFERRED.
1795         * </li>
1796         * </ul>
1797         * <p>
1798         * Hooks should return <code>void</code>.
1799         * </p>
1800         */
1801        STORAGE_PRECOMMIT_RESOURCE_UPDATED(
1802                        void.class,
1803                        "org.hl7.fhir.instance.model.api.IBaseResource",
1804                        "org.hl7.fhir.instance.model.api.IBaseResource",
1805                        "ca.uhn.fhir.rest.api.server.RequestDetails",
1806                        "ca.uhn.fhir.rest.server.servlet.ServletRequestDetails",
1807                        "ca.uhn.fhir.rest.api.server.storage.TransactionDetails",
1808                        "ca.uhn.fhir.rest.api.InterceptorInvocationTimingEnum"),
1809
1810        /**
1811         * <b>Storage Hook:</b>
1812         * Invoked before a resource will be deleted
1813         * <p>
1814         * Hooks will have access to the contents of the resource being deleted
1815         * but should not make any changes as storage has already occurred
1816         * </p>
1817         * Hooks may accept the following parameters:
1818         * <ul>
1819         * <li>org.hl7.fhir.instance.model.api.IBaseResource - The resource being deleted</li>
1820         * <li>
1821         * ca.uhn.fhir.rest.api.server.RequestDetails - A bean containing details about the request that is about to be processed, including details such as the
1822         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
1823         * pulled out of the servlet request. Note that the bean
1824         * properties are not all guaranteed to be populated, depending on how early during processing the
1825         * exception occurred.
1826         * </li>
1827         * <li>
1828         * ca.uhn.fhir.rest.server.servlet.ServletRequestDetails - A bean containing details about the request that is about to be processed, including details such as the
1829         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
1830         * pulled out of the servlet request. This parameter is identical to the RequestDetails parameter above but will
1831         * only be populated when operating in a RestfulServer implementation. It is provided as a convenience.
1832         * </li>
1833         * <li>
1834         * ca.uhn.fhir.rest.api.server.storage.TransactionDetails - The outer transaction details object (since 5.0.0)
1835         * </li>
1836         * <li>
1837         * ca.uhn.fhir.rest.api.InterceptorInvocationTimingEnum - The timing at which the invocation of the interceptor took place. Options are ACTIVE and DEFERRED.
1838         * </li>
1839         * </ul>
1840         * <p>
1841         * Hooks should return <code>void</code>.
1842         * </p>
1843         */
1844        STORAGE_PRECOMMIT_RESOURCE_DELETED(
1845                        void.class,
1846                        "org.hl7.fhir.instance.model.api.IBaseResource",
1847                        "ca.uhn.fhir.rest.api.server.RequestDetails",
1848                        "ca.uhn.fhir.rest.server.servlet.ServletRequestDetails",
1849                        "ca.uhn.fhir.rest.api.server.storage.TransactionDetails",
1850                        "ca.uhn.fhir.rest.api.InterceptorInvocationTimingEnum"),
1851
1852        /**
1853         * <b>Storage Hook:</b>
1854         * Invoked before a FHIR transaction is processed, and allows interceptor code to
1855         * split the FHIR transaction into multiple sub-transactions which will be processed
1856         * individually. These sub-transactions will be executed in the order they are
1857         * returned by the interceptor.
1858         * <p>
1859         * The sub-transactions are processed in order, and processing stops at the first failure.
1860         * If any sub-transaction fails, any previous sub-transactions will not be rolled back.
1861         * This means that splitting a transaction with this pointcut can result in
1862         * FHIR transaction processing not actually fully respecting the atomicity specified
1863         * in the FHIR specification. Use with caution!
1864         * </p>
1865         * Hooks may accept the following parameters:
1866         * <ul>
1867         * <li>org.hl7.fhir.instance.model.api.IBaseBundle - The FHIR transaction Bundle</li>
1868         * <li>
1869         * ca.uhn.fhir.rest.api.server.RequestDetails - A bean containing details about the request that is about to be processed, including details such as the
1870         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
1871         * pulled out of the servlet request. Note that the bean
1872         * properties are not all guaranteed to be populated, depending on how early during processing the
1873         * exception occurred.
1874         * </li>
1875         * <li>
1876         * ca.uhn.fhir.rest.server.servlet.ServletRequestDetails - A bean containing details about the request that is about to be processed, including details such as the
1877         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
1878         * pulled out of the servlet request. This parameter is identical to the RequestDetails parameter above but will
1879         * only be populated when operating in a RestfulServer implementation. It is provided as a convenience.
1880         * </li>
1881         * </ul>
1882         * <p>
1883         * Hooks must return an instance of <code>ca.uhn.fhir.jpa.dao.TransactionPrePartitionResponse</code>.
1884         * </p>
1885         *
1886         * @since 8.6.0
1887         */
1888        STORAGE_TRANSACTION_PRE_PARTITION(
1889                        "ca.uhn.fhir.jpa.dao.TransactionPrePartitionResponse",
1890                        "ca.uhn.fhir.rest.api.server.RequestDetails",
1891                        "ca.uhn.fhir.rest.server.servlet.ServletRequestDetails",
1892                        "org.hl7.fhir.instance.model.api.IBaseBundle"),
1893
1894        /**
1895         * <b>Storage Hook:</b>
1896         * Invoked when a FHIR transaction bundle is about to begin processing. Hooks may choose to
1897         * modify the bundle, and may affect processing by doing so.
1898         * <p>
1899         * Hooks will have access to the original bundle, as well as all the deferred interceptor broadcasts related to the
1900         * processing of the transaction bundle
1901         * </p>
1902         * Hooks may accept the following parameters:
1903         * <ul>
1904         * <li>org.hl7.fhir.instance.model.api.IBaseBundle - The Bundle being processed</li>
1905         * <li>
1906         * ca.uhn.fhir.rest.api.server.RequestDetails - A bean containing details about the request that is about to be processed, including details such as the
1907         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
1908         * pulled out of the servlet request.
1909         * </li>
1910         * <li>
1911         * ca.uhn.fhir.rest.server.servlet.ServletRequestDetails - A bean containing details about the request that is about to be processed, including details such as the
1912         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
1913         * pulled out of the servlet request. This parameter is identical to the RequestDetails parameter above but will
1914         * only be populated when operating in a RestfulServer implementation. It is provided as a convenience.
1915         * </li>
1916         * </ul>
1917         * <p>
1918         * Hooks should return <code>void</code>.
1919         * </p>
1920         *
1921         * @see #STORAGE_TRANSACTION_PROCESSED
1922         * @since 6.2.0
1923         */
1924        STORAGE_TRANSACTION_PROCESSING(
1925                        void.class,
1926                        "org.hl7.fhir.instance.model.api.IBaseBundle",
1927                        "ca.uhn.fhir.rest.api.server.RequestDetails",
1928                        "ca.uhn.fhir.rest.server.servlet.ServletRequestDetails"),
1929
1930        /**
1931         * <b>Storage Hook:</b>
1932         * Invoked after all entries in a transaction bundle have been executed
1933         * <p>
1934         * Hooks will have access to the original bundle, as well as all the deferred interceptor broadcasts related to the
1935         * processing of the transaction bundle
1936         * </p>
1937         * Hooks may accept the following parameters:
1938         * <ul>
1939         * <li>org.hl7.fhir.instance.model.api.IBaseBundle - The Bundle that wsa processed</li>
1940         * <li>
1941         * ca.uhn.fhir.rest.api.server.storage.DeferredInterceptorBroadcasts- A collection of pointcut invocations and their parameters which were deferred.
1942         * </li>
1943         * <li>
1944         * ca.uhn.fhir.rest.api.server.RequestDetails - A bean containing details about the request that is about to be processed, including details such as the
1945         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
1946         * pulled out of the servlet request.
1947         * </li>
1948         * <li>
1949         * ca.uhn.fhir.rest.server.servlet.ServletRequestDetails - A bean containing details about the request that is about to be processed, including details such as the
1950         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
1951         * pulled out of the servlet request. This parameter is identical to the RequestDetails parameter above but will
1952         * only be populated when operating in a RestfulServer implementation. It is provided as a convenience.
1953         * </li>
1954         * <li>
1955         * ca.uhn.fhir.rest.api.server.storage.TransactionDetails - The outer transaction details object (since 5.0.0)
1956         * </li>
1957         * </ul>
1958         * <p>
1959         * Hooks should return <code>void</code>.
1960         * </p>
1961         *
1962         * @see #STORAGE_TRANSACTION_PROCESSING
1963         */
1964        STORAGE_TRANSACTION_PROCESSED(
1965                        void.class,
1966                        "org.hl7.fhir.instance.model.api.IBaseBundle",
1967                        "ca.uhn.fhir.rest.api.server.storage.DeferredInterceptorBroadcasts",
1968                        "ca.uhn.fhir.rest.api.server.RequestDetails",
1969                        "ca.uhn.fhir.rest.server.servlet.ServletRequestDetails",
1970                        "ca.uhn.fhir.rest.api.server.storage.TransactionDetails"),
1971
1972        /**
1973         * <b>Storage Hook:</b>
1974         * Invoked during a FHIR transaction, immediately before processing all write operations (i.e. immediately
1975         * before a database transaction will be opened)
1976         * <p>
1977         * Hooks may accept the following parameters:
1978         * </p>
1979         * <ul>
1980         * <li>
1981         * ca.uhn.fhir.interceptor.model.TransactionWriteOperationsDetails - Contains details about the transaction that is about to start
1982         * </li>
1983         * <li>
1984         * ca.uhn.fhir.rest.api.server.storage.TransactionDetails - The outer transaction details object (since 5.0.0)
1985         * </li>
1986         * </ul>
1987         * <p>
1988         * Hooks should return <code>void</code>.
1989         * </p>
1990         */
1991        STORAGE_TRANSACTION_WRITE_OPERATIONS_PRE(
1992                        void.class,
1993                        "ca.uhn.fhir.interceptor.model.TransactionWriteOperationsDetails",
1994                        "ca.uhn.fhir.rest.api.server.storage.TransactionDetails"),
1995
1996        /**
1997         * <b>Storage Hook:</b>
1998         * Invoked during a FHIR transaction, immediately after processing all write operations (i.e. immediately
1999         * after the transaction has been committed or rolled back). This hook will always be called if
2000         * {@link #STORAGE_TRANSACTION_WRITE_OPERATIONS_PRE} has been called, regardless of whether the operation
2001         * succeeded or failed.
2002         * <p>
2003         * Hooks may accept the following parameters:
2004         * </p>
2005         * <ul>
2006         * <li>
2007         * ca.uhn.fhir.interceptor.model.TransactionWriteOperationsDetails - Contains details about the transaction that is about to start
2008         * </li>
2009         * <li>
2010         * ca.uhn.fhir.rest.api.server.storage.TransactionDetails - The outer transaction details object (since 5.0.0)
2011         * </li>
2012         * </ul>
2013         * <p>
2014         * Hooks should return <code>void</code>.
2015         * </p>
2016         */
2017        STORAGE_TRANSACTION_WRITE_OPERATIONS_POST(
2018                        void.class,
2019                        "ca.uhn.fhir.interceptor.model.TransactionWriteOperationsDetails",
2020                        "ca.uhn.fhir.rest.api.server.storage.TransactionDetails"),
2021
2022        /**
2023         * <b>Storage Hook:</b>
2024         * Invoked when a resource delete operation is about to fail due to referential integrity checks. Intended for use with {@literal ca.uhn.fhir.jpa.interceptor.CascadingDeleteInterceptor}.
2025         * <p>
2026         * Hooks will have access to the list of resources that have references to the resource being deleted.
2027         * </p>
2028         * Hooks may accept the following parameters:
2029         * <ul>
2030         * <li>ca.uhn.fhir.jpa.api.model.DeleteConflictList - The list of delete conflicts</li>
2031         * <li>
2032         * ca.uhn.fhir.rest.api.server.RequestDetails - A bean containing details about the request that is about to be processed, including details such as the
2033         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
2034         * pulled out of the servlet request. Note that the bean
2035         * properties are not all guaranteed to be populated, depending on how early during processing the
2036         * exception occurred.
2037         * </li>
2038         * <li>
2039         * ca.uhn.fhir.rest.server.servlet.ServletRequestDetails - A bean containing details about the request that is about to be processed, including details such as the
2040         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
2041         * pulled out of the servlet request. This parameter is identical to the RequestDetails parameter above but will
2042         * only be populated when operating in a RestfulServer implementation. It is provided as a convenience.
2043         * </li>
2044         * <li>
2045         * ca.uhn.fhir.rest.api.server.storage.TransactionDetails - The outer transaction details object (since 5.0.0)
2046         * </li>
2047         * </ul>
2048         * <p>
2049         * Hooks should return <code>ca.uhn.fhir.jpa.delete.DeleteConflictOutcome</code>.
2050         * If the interceptor returns a non-null result, the DeleteConflictOutcome can be
2051         * used to indicate a number of times to retry.
2052         * </p>
2053         */
2054        STORAGE_PRESTORAGE_DELETE_CONFLICTS(
2055                        // Return type
2056                        "ca.uhn.fhir.jpa.delete.DeleteConflictOutcome",
2057                        // Params
2058                        "ca.uhn.fhir.jpa.api.model.DeleteConflictList",
2059                        "ca.uhn.fhir.rest.api.server.RequestDetails",
2060                        "ca.uhn.fhir.rest.server.servlet.ServletRequestDetails",
2061                        "ca.uhn.fhir.rest.api.server.storage.TransactionDetails"),
2062
2063        /**
2064         * <b>Storage Hook:</b>
2065         * Invoked before a resource is about to be expunged via the <code>$expunge</code> operation.
2066         * <p>
2067         * Hooks will be passed a reference to a counter containing the current number of records that have been deleted.
2068         * If the hook deletes any records, the hook is expected to increment this counter by the number of records deleted.
2069         * </p>
2070         * <p>
2071         * Hooks may accept the following parameters:
2072         * </p>
2073         * <ul>
2074         * <li>java.util.concurrent.atomic.AtomicInteger - The counter holding the number of records deleted.</li>
2075         * <li>org.hl7.fhir.instance.model.api.IIdType - The ID of the resource that is about to be deleted</li>
2076         * <li>org.hl7.fhir.instance.model.api.IBaseResource - The resource that is about to be deleted</li>
2077         * <li>
2078         * ca.uhn.fhir.rest.api.server.RequestDetails - A bean containing details about the request that is about to be processed, including details such as the
2079         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
2080         * pulled out of the servlet request. Note that the bean
2081         * properties are not all guaranteed to be populated, depending on how early during processing the
2082         * exception occurred.
2083         * </li>
2084         * <li>
2085         * ca.uhn.fhir.rest.server.servlet.ServletRequestDetails - A bean containing details about the request that is about to be processed, including details such as the
2086         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
2087         * pulled out of the servlet request. This parameter is identical to the RequestDetails parameter above but will
2088         * only be populated when operating in a RestfulServer implementation. It is provided as a convenience.
2089         * </li>
2090         * </ul>
2091         * <p>
2092         * Hooks should return void.
2093         * </p>
2094         */
2095        STORAGE_PRESTORAGE_EXPUNGE_RESOURCE(
2096                        // Return type
2097                        void.class,
2098                        // Params
2099                        "java.util.concurrent.atomic.AtomicInteger",
2100                        "org.hl7.fhir.instance.model.api.IIdType",
2101                        "org.hl7.fhir.instance.model.api.IBaseResource",
2102                        "ca.uhn.fhir.rest.api.server.RequestDetails",
2103                        "ca.uhn.fhir.rest.server.servlet.ServletRequestDetails"),
2104
2105        /**
2106         * <b>Storage Hook:</b>
2107         * Invoked before an <code>$expunge</code> operation on all data (expungeEverything) is called.
2108         * <p>
2109         * Hooks will be passed a reference to a counter containing the current number of records that have been deleted.
2110         * If the hook deletes any records, the hook is expected to increment this counter by the number of records deleted.
2111         * </p>
2112         * Hooks may accept the following parameters:
2113         * <ul>
2114         * <li>java.util.concurrent.atomic.AtomicInteger - The counter holding the number of records deleted.</li>
2115         * <li>
2116         * ca.uhn.fhir.rest.api.server.RequestDetails - A bean containing details about the request that is about to be processed, including details such as the
2117         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
2118         * pulled out of the servlet request. Note that the bean
2119         * properties are not all guaranteed to be populated, depending on how early during processing the
2120         * exception occurred.
2121         * </li>
2122         * <li>
2123         * ca.uhn.fhir.rest.server.servlet.ServletRequestDetails - A bean containing details about the request that is about to be processed, including details such as the
2124         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
2125         * pulled out of the servlet request. This parameter is identical to the RequestDetails parameter above but will
2126         * only be populated when operating in a RestfulServer implementation. It is provided as a convenience.
2127         * </li>
2128         * </ul>
2129         * <p>
2130         * Hooks should return void.
2131         * </p>
2132         */
2133        STORAGE_PRESTORAGE_EXPUNGE_EVERYTHING(
2134                        // Return type
2135                        void.class,
2136                        // Params
2137                        "java.util.concurrent.atomic.AtomicInteger",
2138                        "ca.uhn.fhir.rest.api.server.RequestDetails",
2139                        "ca.uhn.fhir.rest.server.servlet.ServletRequestDetails"),
2140
2141        /**
2142         * <b>Storage Hook:</b>
2143         * Invoked before FHIR <b>create</b> operation to request the identification of the partition ID to be associated
2144         * with the resource being created. This hook will only be called if partitioning is enabled in the JPA
2145         * server.
2146         * <p>
2147         * Hooks may accept the following parameters:
2148         * </p>
2149         * <ul>
2150         * <li>
2151         * org.hl7.fhir.instance.model.api.IBaseResource - The resource that will be created and needs a tenant ID assigned.
2152         * </li>
2153         * <li>
2154         * ca.uhn.fhir.rest.api.server.RequestDetails - A bean containing details about the request that is about to be processed, including details such as the
2155         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
2156         * pulled out of the servlet request. Note that the bean
2157         * properties are not all guaranteed to be populated, depending on how early during processing the
2158         * exception occurred.
2159         * </li>
2160         * <li>
2161         * ca.uhn.fhir.rest.server.servlet.ServletRequestDetails - A bean containing details about the request that is about to be processed, including details such as the
2162         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
2163         * pulled out of the servlet request. This parameter is identical to the RequestDetails parameter above but will
2164         * only be populated when operating in a RestfulServer implementation. It is provided as a convenience.
2165         * </li>
2166         * </ul>
2167         * <p>
2168         * Hooks must return an instance of <code>ca.uhn.fhir.interceptor.model.RequestPartitionId</code>.
2169         * </p>
2170         *
2171         * @see #STORAGE_PARTITION_IDENTIFY_ANY For an alternative that is not read/write specific
2172         */
2173        STORAGE_PARTITION_IDENTIFY_CREATE(
2174                        // Return type
2175                        "ca.uhn.fhir.interceptor.model.RequestPartitionId",
2176                        // Params
2177                        "org.hl7.fhir.instance.model.api.IBaseResource",
2178                        "ca.uhn.fhir.rest.api.server.RequestDetails",
2179                        "ca.uhn.fhir.rest.server.servlet.ServletRequestDetails"),
2180
2181        /**
2182         * <b>Storage Hook:</b>
2183         * Invoked before any FHIR read/access/extended operation (e.g. <b>read/vread</b>, <b>search</b>, <b>history</b>,
2184         * <b>$reindex</b>, etc.) operation to request the identification of the partition ID to be associated with
2185         * the resource(s) being searched for, read, etc. Essentially any operations in the JPA server that are not
2186         * creating a resource will use this pointcut. Creates will use {@link #STORAGE_PARTITION_IDENTIFY_CREATE}.
2187         *
2188         * <p>
2189         * This hook will only be called if
2190         * partitioning is enabled in the JPA server.
2191         * </p>
2192         * <p>
2193         * Hooks may accept the following parameters:
2194         * </p>
2195         * <ul>
2196         * <li>
2197         * ca.uhn.fhir.rest.api.server.RequestDetails - A bean containing details about the request that is about to be processed, including details such as the
2198         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
2199         * pulled out of the servlet request. Note that the bean
2200         * properties are not all guaranteed to be populated, depending on how early during processing the
2201         * exception occurred.
2202         * </li>
2203         * <li>
2204         * ca.uhn.fhir.rest.server.servlet.ServletRequestDetails - A bean containing details about the request that is about to be processed, including details such as the
2205         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
2206         * pulled out of the servlet request. This parameter is identical to the RequestDetails parameter above but will
2207         * only be populated when operating in a RestfulServer implementation. It is provided as a convenience.
2208         * </li>
2209         * <li>ca.uhn.fhir.interceptor.model.ReadPartitionIdRequestDetails - Contains details about what is being read</li>
2210         * </ul>
2211         * <p>
2212         * Hooks must return an instance of <code>ca.uhn.fhir.interceptor.model.RequestPartitionId</code>.
2213         * </p>
2214         *
2215         * @see #STORAGE_PARTITION_IDENTIFY_ANY For an alternative that is not read/write specific
2216         */
2217        STORAGE_PARTITION_IDENTIFY_READ(
2218                        // Return type
2219                        "ca.uhn.fhir.interceptor.model.RequestPartitionId",
2220                        // Params
2221                        "ca.uhn.fhir.rest.api.server.RequestDetails",
2222                        "ca.uhn.fhir.rest.server.servlet.ServletRequestDetails",
2223                        "ca.uhn.fhir.interceptor.model.ReadPartitionIdRequestDetails"),
2224
2225        /**
2226         * <b>Storage Hook:</b>
2227         * Invoked before FHIR operations to request the identification of the partition ID to be associated with the
2228         * request being made.
2229         * <p>
2230         * This hook is an alternative to {@link #STORAGE_PARTITION_IDENTIFY_READ} and {@link #STORAGE_PARTITION_IDENTIFY_CREATE}
2231         * and can be used in cases where a partition interceptor does not need knowledge of the specific resources being
2232         * accessed/read/written in order to determine the appropriate partition.
2233         * If registered, then neither STORAGE_PARTITION_IDENTIFY_READ, nor STORAGE_PARTITION_IDENTIFY_CREATE will be called.
2234         * </p>
2235         * <p>
2236         * This hook will only be called if
2237         * partitioning is enabled in the JPA server.
2238         * </p>
2239         * <p>
2240         * Hooks may accept the following parameters:
2241         * </p>
2242         * <ul>
2243         * <li>
2244         * ca.uhn.fhir.rest.api.server.RequestDetails - A bean containing details about the request that is about to be processed, including details such as the
2245         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
2246         * pulled out of the servlet request. Note that the bean
2247         * properties are not all guaranteed to be populated, depending on how early during processing the
2248         * exception occurred.
2249         * </li>
2250         * <li>
2251         * ca.uhn.fhir.rest.server.servlet.ServletRequestDetails - A bean containing details about the request that is about to be processed, including details such as the
2252         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
2253         * pulled out of the servlet request. This parameter is identical to the RequestDetails parameter above but will
2254         * only be populated when operating in a RestfulServer implementation. It is provided as a convenience.
2255         * </li>
2256         * </ul>
2257         * <p>
2258         * Hooks must return an instance of <code>ca.uhn.fhir.interceptor.model.RequestPartitionId</code>.
2259         * </p>
2260         *
2261         * @see #STORAGE_PARTITION_IDENTIFY_READ
2262         * @see #STORAGE_PARTITION_IDENTIFY_CREATE
2263         */
2264        STORAGE_PARTITION_IDENTIFY_ANY(
2265                        // Return type
2266                        "ca.uhn.fhir.interceptor.model.RequestPartitionId",
2267                        // Params
2268                        "ca.uhn.fhir.rest.api.server.RequestDetails",
2269                        "ca.uhn.fhir.rest.server.servlet.ServletRequestDetails"),
2270
2271        /**
2272         * <b>Storage Hook:</b>
2273         * Invoked when a partition has been created, typically meaning the <code>$partition-management-create-partition</code>
2274         * operation has been invoked.
2275         * <p>
2276         * This hook will only be called if
2277         * partitioning is enabled in the JPA server.
2278         * </p>
2279         * <p>
2280         * Hooks may accept the following parameters:
2281         * </p>
2282         * <ul>
2283         * <li>
2284         * ca.uhn.fhir.interceptor.model.RequestPartitionId - The partition ID that was selected
2285         * </li>
2286         * <li>
2287         * ca.uhn.fhir.rest.api.server.RequestDetails - A bean containing details about the request that is about to be processed, including details such as the
2288         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
2289         * pulled out of the servlet request. Note that the bean
2290         * properties are not all guaranteed to be populated, depending on how early during processing the
2291         * exception occurred.
2292         * </li>
2293         * <li>
2294         * ca.uhn.fhir.rest.server.servlet.ServletRequestDetails - A bean containing details about the request that is about to be processed, including details such as the
2295         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
2296         * pulled out of the servlet request. This parameter is identical to the RequestDetails parameter above but will
2297         * only be populated when operating in a RestfulServer implementation. It is provided as a convenience.
2298         * </li>
2299         * </ul>
2300         * <p>
2301         * Hooks must return void.
2302         * </p>
2303         */
2304        STORAGE_PARTITION_CREATED(
2305                        // Return type
2306                        void.class,
2307                        // Params
2308                        "ca.uhn.fhir.interceptor.model.RequestPartitionId",
2309                        "ca.uhn.fhir.rest.api.server.RequestDetails",
2310                        "ca.uhn.fhir.rest.server.servlet.ServletRequestDetails"),
2311
2312        /**
2313         * <b>Storage Hook:</b>
2314         * Invoked when a partition has been deleted, typically meaning the <code>$partition-management-delete-partition</code>
2315         * operation has been invoked.
2316         * <p>
2317         * This hook will only be called if
2318         * partitioning is enabled in the JPA server.
2319         * </p>
2320         * <p>
2321         * Hooks may accept the following parameters:
2322         * </p>
2323         * <ul>
2324         * <li>
2325         * ca.uhn.fhir.interceptor.model.RequestPartitionId - The ID of the partition that was deleted.
2326         * </li>
2327         * </ul>
2328         * <p>
2329         * Hooks must return void.
2330         * </p>
2331         */
2332        STORAGE_PARTITION_DELETED(
2333                        // Return type
2334                        void.class,
2335                        // Params
2336                        "ca.uhn.fhir.interceptor.model.RequestPartitionId"),
2337
2338        /**
2339         * <b>Storage Hook:</b>
2340         * Invoked before any partition aware FHIR operation, when the selected partition has been identified (ie. after the
2341         * {@link #STORAGE_PARTITION_IDENTIFY_CREATE} or {@link #STORAGE_PARTITION_IDENTIFY_READ} hook was called. This allows
2342         * a separate hook to register, and potentially make decisions about whether the request should be allowed to proceed.
2343         * <p>
2344         * This hook will only be called if
2345         * partitioning is enabled in the JPA server.
2346         * </p>
2347         * <p>
2348         * Hooks may accept the following parameters:
2349         * </p>
2350         * <ul>
2351         * <li>
2352         * ca.uhn.fhir.interceptor.model.RequestPartitionId - The partition ID that was selected
2353         * </li>
2354         * <li>
2355         * ca.uhn.fhir.rest.api.server.RequestDetails - A bean containing details about the request that is about to be processed, including details such as the
2356         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
2357         * pulled out of the servlet request. Note that the bean
2358         * properties are not all guaranteed to be populated, depending on how early during processing the
2359         * exception occurred.
2360         * </li>
2361         * <li>
2362         * ca.uhn.fhir.rest.server.servlet.ServletRequestDetails - A bean containing details about the request that is about to be processed, including details such as the
2363         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
2364         * pulled out of the servlet request. This parameter is identical to the RequestDetails parameter above but will
2365         * only be populated when operating in a RestfulServer implementation. It is provided as a convenience.
2366         * </li>
2367         * <li>
2368         * ca.uhn.fhir.context.RuntimeResourceDefinition - The resource type being accessed, or {@literal null} if no specific type is associated with the request.
2369         * </li>
2370         * </ul>
2371         * <p>
2372         * Hooks must return void.
2373         * </p>
2374         */
2375        STORAGE_PARTITION_SELECTED(
2376                        // Return type
2377                        void.class,
2378                        // Params
2379                        "ca.uhn.fhir.interceptor.model.RequestPartitionId",
2380                        "ca.uhn.fhir.rest.api.server.RequestDetails",
2381                        "ca.uhn.fhir.rest.server.servlet.ServletRequestDetails",
2382                        "ca.uhn.fhir.context.RuntimeResourceDefinition"),
2383
2384        /**
2385         * <b>Storage Hook:</b>
2386         * Invoked when a transaction has been rolled back as a result of a {@link ca.uhn.fhir.rest.server.exceptions.ResourceVersionConflictException},
2387         * meaning that a database constraint has been violated. This pointcut allows an interceptor to specify a resolution strategy
2388         * other than simply returning the error to the client. This interceptor will be fired after the database transaction rollback
2389         * has been completed.
2390         * <p>
2391         * Hooks may accept the following parameters:
2392         * </p>
2393         * <ul>
2394         * <li>
2395         * ca.uhn.fhir.rest.api.server.RequestDetails - A bean containing details about the request that is about to be processed, including details such as the
2396         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
2397         * pulled out of the servlet request. Note that the bean
2398         * properties are not all guaranteed to be populated, depending on how early during processing the
2399         * exception occurred. <b>Note that this parameter may be null in contexts where the request is not
2400         * known, such as while processing searches</b>
2401         * </li>
2402         * <li>
2403         * ca.uhn.fhir.rest.server.servlet.ServletRequestDetails - A bean containing details about the request that is about to be processed, including details such as the
2404         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
2405         * pulled out of the servlet request. This parameter is identical to the RequestDetails parameter above but will
2406         * only be populated when operating in a RestfulServer implementation. It is provided as a convenience.
2407         * </li>
2408         * </ul>
2409         * <p>
2410         * Hooks should return <code>ca.uhn.fhir.jpa.api.model.ResourceVersionConflictResolutionStrategy</code>. Hooks should not
2411         * throw any exception.
2412         * </p>
2413         */
2414        STORAGE_VERSION_CONFLICT(
2415                        "ca.uhn.fhir.jpa.api.model.ResourceVersionConflictResolutionStrategy",
2416                        "ca.uhn.fhir.rest.api.server.RequestDetails",
2417                        "ca.uhn.fhir.rest.server.servlet.ServletRequestDetails"),
2418
2419        /**
2420         * <b>Validation Hook:</b>
2421         * This hook is called after validation has completed, regardless of whether the validation was successful or failed.
2422         * Typically this is used to modify validation results.
2423         * <p>
2424         * <b>Note on validation Pointcuts:</b> The HAPI FHIR interceptor framework is a part of the client and server frameworks and
2425         * not a part of the core FhirContext. Therefore this Pointcut is invoked by the
2426         * </p>
2427         * <p>
2428         * Hooks may accept the following parameters:
2429         * <ul>
2430         * <li>
2431         * org.hl7.fhir.instance.model.api.IBaseResource - The resource being validated, if a parsed version is available (null otherwise)
2432         * </li>
2433         * <li>
2434         * java.lang.String - The resource being validated, if a raw version is available (null otherwise)
2435         * </li>
2436         * <li>
2437         * ca.uhn.fhir.validation.ValidationResult - The outcome of the validation. Hooks methods should not modify this object, but they can return a new one.
2438         * </li>
2439         * </ul>
2440         * </p>
2441         * Hook methods may return an instance of {@link ca.uhn.fhir.validation.ValidationResult} if they wish to override the validation results, or they may return <code>null</code> or <code>void</code> otherwise.
2442         */
2443        VALIDATION_COMPLETED(
2444                        ValidationResult.class,
2445                        "org.hl7.fhir.instance.model.api.IBaseResource",
2446                        "java.lang.String",
2447                        "ca.uhn.fhir.validation.ValidationResult"),
2448
2449        /**
2450         * <b>MDM(EMPI) Hook:</b>
2451         * Invoked when a persisted resource (a resource that has just been stored in the
2452         * database via a create/update/patch/etc.) enters the MDM module. The purpose of the pointcut is to permit a pseudo
2453         * modification of the resource elements to influence the MDM linking process.  Any modifications to the resource are not persisted.
2454         * <p>
2455         * Hooks may accept the following parameters:
2456         * <ul>
2457         * <li>org.hl7.fhir.instance.model.api.IBaseResource - </li>
2458         * </ul>
2459         * </p>
2460         * <p>
2461         * Hooks should return <code>void</code>.
2462         * </p>
2463         */
2464        MDM_BEFORE_PERSISTED_RESOURCE_CHECKED(void.class, "org.hl7.fhir.instance.model.api.IBaseResource"),
2465
2466        /**
2467         * <b>MDM(EMPI) Hook:</b>
2468         * Invoked whenever a persisted resource (a resource that has just been stored in the
2469         * database via a create/update/patch/etc.) has been matched against related resources and MDM links have been updated.
2470         * <p>
2471         * Hooks may accept the following parameters:
2472         * <ul>
2473         * <li>ca.uhn.fhir.rest.server.messaging.ResourceOperationMessage - This parameter should not be modified as processing is complete when this hook is invoked.</li>
2474         * <li>ca.uhn.fhir.rest.server.TransactionLogMessages - This parameter is for informational messages provided by the MDM module during MDM processing.</li>
2475         * <li>ca.uhn.fhir.mdm.model.mdmevents.MdmLinkEvent - Contains information about the change event, including target and golden resource IDs and the operation type.</li>
2476         * </ul>
2477         * </p>
2478         * <p>
2479         * Hooks should return <code>void</code>.
2480         * </p>
2481         */
2482        MDM_AFTER_PERSISTED_RESOURCE_CHECKED(
2483                        void.class,
2484                        "ca.uhn.fhir.rest.server.messaging.ResourceOperationMessage",
2485                        "ca.uhn.fhir.rest.server.TransactionLogMessages",
2486                        "ca.uhn.fhir.mdm.model.mdmevents.MdmLinkEvent"),
2487
2488        /**
2489         * <b>MDM Create Link</b>
2490         * This hook is invoked after an MDM link is created,
2491         * and changes have been persisted to the database.
2492         * <p>
2493         * Hook may accept the following parameters:
2494         * </p>
2495         * <ul>
2496         * <li>
2497         * ca.uhn.fhir.rest.api.server.RequestDetails - An object containing details about the request that is about to be processed, including details such as the
2498         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
2499         * pulled out of the servlet request.
2500         * </li>
2501         * <li>
2502         * ca.uhn.fhir.mdm.api.MdmLinkChangeEvent - Contains information about the link event, including target and golden resource IDs and the operation type.
2503         * </li>
2504         * </ul>
2505         * <p>
2506         * Hooks should return <code>void</code>.
2507         * </p>
2508         */
2509        MDM_POST_CREATE_LINK(
2510                        void.class, "ca.uhn.fhir.rest.api.server.RequestDetails", "ca.uhn.fhir.mdm.model.mdmevents.MdmLinkEvent"),
2511
2512        /**
2513         * <b>MDM Update Link</b>
2514         * This hook is invoked after an MDM link is updated,
2515         * and changes have been persisted to the database.
2516         * <p>
2517         * Hook may accept the following parameters:
2518         * </p>
2519         * <ul>
2520         * <li>
2521         * ca.uhn.fhir.rest.api.server.RequestDetails - An object containing details about the request that is about to be processed, including details such as the
2522         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
2523         * pulled out of the servlet request.
2524         * </li>
2525         * <li>
2526         * ca.uhn.fhir.mdm.api.MdmLinkChangeEvent - Contains information about the link event, including target and golden resource IDs and the operation type.
2527         * </li>
2528         * </ul>
2529         * <p>
2530         * Hooks should return <code>void</code>.
2531         * </p>
2532         */
2533        MDM_POST_UPDATE_LINK(
2534                        void.class, "ca.uhn.fhir.rest.api.server.RequestDetails", "ca.uhn.fhir.mdm.model.mdmevents.MdmLinkEvent"),
2535
2536        /**
2537         * <b>MDM Merge Golden Resources</b>
2538         * This hook is invoked after 2 golden resources have been
2539         * merged together and results persisted.
2540         * <p>
2541         * Hook may accept the following parameters:
2542         * </p>
2543         * <ul>
2544         * <li>
2545         * ca.uhn.fhir.rest.api.server.RequestDetails - An object containing details about the request that is about to be processed, including details such as the
2546         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
2547         * pulled out of the servlet request.
2548         * </li>
2549         * <li>
2550         * ca.uhn.fhir.mdm.model.mdmevents.MdmMergeEvent - Contains information about the from and to resources.
2551         * </li>
2552         * <li>
2553         * ca.uhn.fhir.mdm.model.mdmevents.MdmTransactionContext - Contains information about the Transaction context, e.g. merge or link.
2554         * </li>
2555         * </ul>
2556         * <p>
2557         * Hooks should return <code>void</code>.
2558         * </p>
2559         */
2560        MDM_POST_MERGE_GOLDEN_RESOURCES(
2561                        void.class,
2562                        "ca.uhn.fhir.rest.api.server.RequestDetails",
2563                        "ca.uhn.fhir.mdm.model.mdmevents.MdmMergeEvent",
2564                        "ca.uhn.fhir.mdm.model.MdmTransactionContext"),
2565
2566        /**
2567         * <b>MDM Link History Hook:</b>
2568         * This hook is invoked after link histories are queried,
2569         * but before the results are returned to the caller.
2570         * <p>
2571         * Hook may accept the following parameters:
2572         * </p>
2573         * <ul>
2574         * <li>
2575         * ca.uhn.fhir.rest.api.server.RequestDetails - An object containing details about the request that is about to be processed.
2576         * </li>
2577         * <li>
2578         * ca.uhn.fhir.mdm.model.mdmevents.MdmHistoryEvent - An MDM History Event containing
2579         * information about the requested golden resource ids and/or source ids input, and
2580         * the returned link histories.
2581         * </li>
2582         * </ul>
2583         */
2584        MDM_POST_LINK_HISTORY(
2585                        void.class,
2586                        "ca.uhn.fhir.rest.api.server.RequestDetails",
2587                        "ca.uhn.fhir.mdm.model.mdmevents.MdmHistoryEvent"),
2588
2589        /**
2590         * <b>MDM Not Duplicate/Unduplicate Hook:</b>
2591         * This hook is invoked after 2 golden resources with an existing link
2592         * of "POSSIBLE_DUPLICATE" get unlinked/unduplicated.
2593         * <p>
2594         * This hook accepts the following parameters:
2595         * </p>
2596         * <ul>
2597         * <li>
2598         * ca.uhn.fhir.rest.api.server.RequestDetails - An object containing details about the request that is about to be processed.
2599         * </li>
2600         * <li>
2601         * ca.uhn.fhir.mdm.model.mdmevents.MdmLinkEvent - the resulting final link
2602         * between the 2 golden resources; now a NO_MATCH link.
2603         * </li>
2604         * </ul>
2605         */
2606        MDM_POST_NOT_DUPLICATE(
2607                        void.class, "ca.uhn.fhir.rest.api.server.RequestDetails", "ca.uhn.fhir.mdm.model.mdmevents.MdmLinkEvent"),
2608
2609        /**
2610         * <b>MDM Clear Hook:</b>
2611         * This hook is invoked when an mdm clear operation is requested.
2612         * <p>
2613         * This hook accepts the following parameters:
2614         * </p>
2615         * <ul>
2616         * <li>
2617         * ca.uhn.fhir.rest.api.server.RequestDetails - An object containing details about the request that is about to be processed.
2618         * </li>
2619         * <li>
2620         * ca.uhn.fhir.mdm.model.mdmevents.MdmClearEvent - the event containing information on the clear command,
2621         * including the type filter (if any) and the batch size (if any).
2622         * </li>
2623         * </ul>
2624         */
2625        MDM_CLEAR(
2626                        void.class, "ca.uhn.fhir.rest.api.server.RequestDetails", "ca.uhn.fhir.mdm.model.mdmevents.MdmClearEvent"),
2627
2628        /**
2629         * <b>MDM Submit Hook:</b>
2630         * This hook is invoked whenever when mdm submit operation is requested.
2631         * MDM submits can be invoked in multiple ways.
2632         * Some of which accept asynchronous calling, and some of which do not.
2633         * <p>
2634         * If the MDM Submit operation is asynchronous
2635         * (typically because the Prefer: respond-async header has been provided)
2636         * this hook will be invoked after the job is submitted, but before it has
2637         * necessarily been executed.
2638         * </p>
2639         * <p>
2640         * If the MDM Submit operation is synchronous,
2641         * this hook will be invoked immediately after the submit operation
2642         * has been executed, but before the call is returned to the caller.
2643         * </p>
2644         * <ul>
2645         * <li>
2646         * On Patient Type. Can be synchronous or asynchronous.
2647         * </li>
2648         * <li>
2649         * On Practitioner Type. Can be synchronous or asynchronous.
2650         * </li>
2651         * <li>
2652         * On specific patient instances. Is always synchronous.
2653         * </li>
2654         * <li>
2655         * On specific practitioner instances. Is always synchronous.
2656         * </li>
2657         * <li>
2658         * On the server (ie, not on any resource) with or without a resource filter.
2659         * Can be synchronous or asynchronous.
2660         * </li>
2661         * </ul>
2662         * <p>
2663         * In all cases, this hook will take the following parameters:
2664         * </p>
2665         * <ul>
2666         * <li>
2667         * ca.uhn.fhir.rest.api.server.RequestDetails - An object containing details about the request that is about to be processed.
2668         * </li>
2669         * <li>
2670         * ca.uhn.fhir.mdm.model.mdmevents.MdmSubmitEvent - An event with the Mdm Submit information
2671         * (urls specifying paths that will be searched for MDM submit, as well as
2672         * if this was an asynchronous request or not).
2673         * </li>
2674         * </ul>
2675         */
2676        MDM_SUBMIT(
2677                        void.class, "ca.uhn.fhir.rest.api.server.RequestDetails", "ca.uhn.fhir.mdm.model.mdmevents.MdmSubmitEvent"),
2678
2679        /**
2680         * <b>MDM_SUBMIT_PRE_MESSAGE_DELIVERY Hook:</b>
2681         * Invoked immediately before the delivery of a MESSAGE to the broker.
2682         * <p>
2683         * Hooks can make changes to the delivery payload.
2684         * Furthermore, modification can be made to the outgoing message,
2685         * for example adding headers or changing message key,
2686         * which will be used for the subsequent processing.
2687         * </p>
2688         * Hooks should accept the following parameters:
2689         * <ul>
2690         * <li>ca.uhn.fhir.jpa.subscription.model.ResourceModifiedJsonMessage</li>
2691         * </ul>
2692         */
2693        MDM_SUBMIT_PRE_MESSAGE_DELIVERY(void.class, "ca.uhn.fhir.jpa.subscription.model.ResourceModifiedJsonMessage"),
2694
2695        /**
2696         * <b>JPA Hook:</b>
2697         * This hook is invoked during resource indexing and can be used to influence the
2698         * text extracted from a given resource for FullText indexing in support of the
2699         * <code>_content</code> Search Parameter.
2700         * By default, when FullText indexing is enabled HAPI FHIR extracts all string
2701         * content from resources for indexing in order to support the <code>_content</code>
2702         * Search Parameter. This means looking for all <code>string</code> datatypes
2703         * found within a given resource instance, and combining the strings.
2704         * <p>
2705         * Hooks may choose to replace the automatically extracted index text.
2706         * They may also declare that a given resource should not be indexed.
2707         * </p>
2708         * <p>
2709         * Note on selectively disabling indexing: If you return
2710         * <code>FullTextExtractionResponse.doNotIndex()</code> for both invocations of this
2711         * Pointcut for a given resource, this will flag to the indexing
2712         * service that no data should be written to the index for the resource. This is useful
2713         * if you want to selectively enable FullText indexing only for specific resource types,
2714         * or by some other property. Be careful of resource deletes in this scenario! If you
2715         * allow indexing for a given resource, but then invoke <code>doNotIndex()</code>
2716         * when the resource is being deleted then the existing FullText index record will
2717         * be left in place. This can lead to inefficient use of space, and potentially cause
2718         * slow/inefficient searches.
2719         * </p>
2720         * Hooks should accept the following parameters:
2721         * <ul>
2722         * <li>ca.uhn.fhir.jpa.searchparam.fulltext.FullTextExtractionRequest</li>
2723         * </ul>
2724         * <p>
2725         * Hooks may return either <code>null</code> (to indicate that the default indexing should
2726         * be used) or an instance of <code>ca.uhn.fhir.jpa.searchparam.fulltext.FullTextExtractionResponse</code>
2727         * if you wish to override the default indexing behaviour.
2728         * </p>
2729         *
2730         * @since 8.4.0
2731         * @see #JPA_INDEX_EXTRACT_FULLTEXT_TEXT
2732         */
2733        JPA_INDEX_EXTRACT_FULLTEXT_CONTENT(
2734                        "ca.uhn.fhir.jpa.searchparam.fulltext.FullTextExtractionResponse",
2735                        "ca.uhn.fhir.jpa.searchparam.fulltext.FullTextExtractionRequest"),
2736
2737        /**
2738         * <b>JPA Hook:</b>
2739         * This hook is invoked during resource indexing and can be used to influence the
2740         * text extracted from a given resource for FullText indexing in support of the
2741         * <code>_text</code> Search Parameter.
2742         * HAPI FHIR extracts all text in the narrative
2743         * (<code>Resource.text.div</code>) for indexing in order to support the <code>_text</code>
2744         * Search Parameter.
2745         * <p>
2746         * Hooks may choose to replace the automatically extracted index text.
2747         * They may also declare that a given resource should not be indexed.
2748         * </p>
2749         * <p>
2750         * Note on selectively disabling indexing: If you return
2751         * <code>FullTextExtractionResponse.doNotIndex()</code> for both invocations of this
2752         * Pointcut for a given resource, this will flag to the indexing
2753         * service that no data should be written to the index for the resource. This is useful
2754         * if you want to selectively enable FullText indexing only for specific resource types,
2755         * or by some other property. Be careful of resource deletes in this scenario! If you
2756         * allow indexing for a given resource, but then invoke <code>doNotIndex()</code>
2757         * when the resource is being deleted then the existing FullText index record will
2758         * be left in place. This can lead to inefficient use of space, and potentially cause
2759         * slow/inefficient searches.
2760         * </p>
2761         * Hooks should accept the following parameters:
2762         * <ul>
2763         * <li>ca.uhn.fhir.jpa.searchparam.fulltext.FullTextExtractionRequest</li>
2764         * </ul>
2765         * <p>
2766         * Hooks may return either <code>null</code> (to indicate that the default indexing should
2767         * be used) or an instance of <code>ca.uhn.fhir.jpa.searchparam.fulltext.FullTextExtractionResponse</code>
2768         * if you wish to override the default indexing behaviour.
2769         * </p>
2770         *
2771         * @since 8.4.0
2772         * @see #JPA_INDEX_EXTRACT_FULLTEXT_CONTENT
2773         */
2774        JPA_INDEX_EXTRACT_FULLTEXT_TEXT(
2775                        "ca.uhn.fhir.jpa.searchparam.fulltext.FullTextExtractionResponse",
2776                        "ca.uhn.fhir.jpa.searchparam.fulltext.FullTextExtractionRequest"),
2777
2778        /**
2779         * <b>JPA Hook:</b>
2780         * This hook is invoked when a cross-partition reference is about to be
2781         * stored in the database.
2782         * <p>
2783         * <b>This is an experimental API - It may change in the future, use with caution.</b>
2784         * </p>
2785         * <p>
2786         * Hooks may accept the following parameters:
2787         * </p>
2788         * <ul>
2789         * <li>
2790         * {@literal ca.uhn.fhir.jpa.searchparam.extractor.CrossPartitionReferenceDetails} - Contains details about the
2791         * cross partition reference.
2792         * </li>
2793         * </ul>
2794         * <p>
2795         * Hooks should return <code>void</code>.
2796         * </p>
2797         */
2798        JPA_RESOLVE_CROSS_PARTITION_REFERENCE(
2799                        "ca.uhn.fhir.jpa.model.cross.IResourceLookup",
2800                        "ca.uhn.fhir.jpa.searchparam.extractor.CrossPartitionReferenceDetails"),
2801
2802        /**
2803         * <b>Performance Tracing Hook:</b>
2804         * This hook is invoked when any informational messages generated by the
2805         * SearchCoordinator are created. It is typically used to provide logging
2806         * or capture details related to a specific request.
2807         * <p>
2808         * Note that this is a performance tracing hook. Use with caution in production
2809         * systems, since calling it may (or may not) carry a cost.
2810         * </p>
2811         * Hooks may accept the following parameters:
2812         * <ul>
2813         * <li>
2814         * ca.uhn.fhir.rest.api.server.RequestDetails - A bean containing details about the request that is about to be processed, including details such as the
2815         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
2816         * pulled out of the servlet request. Note that the bean
2817         * properties are not all guaranteed to be populated, depending on how early during processing the
2818         * exception occurred.
2819         * </li>
2820         * <li>
2821         * ca.uhn.fhir.rest.server.servlet.ServletRequestDetails - A bean containing details about the request that is about to be processed, including details such as the
2822         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
2823         * pulled out of the servlet request. This parameter is identical to the RequestDetails parameter above but will
2824         * only be populated when operating in a RestfulServer implementation. It is provided as a convenience.
2825         * </li>
2826         * <li>
2827         * ca.uhn.fhir.jpa.model.search.StorageProcessingMessage - Contains the message
2828         * </li>
2829         * </ul>
2830         * <p>
2831         * Hooks should return <code>void</code>.
2832         * </p>
2833         */
2834        JPA_PERFTRACE_INFO(
2835                        void.class,
2836                        "ca.uhn.fhir.rest.api.server.RequestDetails",
2837                        "ca.uhn.fhir.rest.server.servlet.ServletRequestDetails",
2838                        "ca.uhn.fhir.jpa.model.search.StorageProcessingMessage"),
2839
2840        /**
2841         * <b>Performance Tracing Hook:</b>
2842         * This hook is invoked when any warning messages generated by the
2843         * SearchCoordinator are created. It is typically used to provide logging
2844         * or capture details related to a specific request.
2845         * <p>
2846         * Note that this is a performance tracing hook. Use with caution in production
2847         * systems, since calling it may (or may not) carry a cost.
2848         * </p>
2849         * Hooks may accept the following parameters:
2850         * <ul>
2851         * <li>
2852         * ca.uhn.fhir.rest.api.server.RequestDetails - A bean containing details about the request that is about to be processed, including details such as the
2853         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
2854         * pulled out of the servlet request. Note that the bean
2855         * properties are not all guaranteed to be populated, depending on how early during processing the
2856         * exception occurred.
2857         * </li>
2858         * <li>
2859         * ca.uhn.fhir.rest.server.servlet.ServletRequestDetails - A bean containing details about the request that is about to be processed, including details such as the
2860         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
2861         * pulled out of the servlet request. This parameter is identical to the RequestDetails parameter above but will
2862         * only be populated when operating in a RestfulServer implementation. It is provided as a convenience.
2863         * </li>
2864         * <li>
2865         * ca.uhn.fhir.jpa.model.search.StorageProcessingMessage - Contains the message
2866         * </li>
2867         * </ul>
2868         * <p>
2869         * Hooks should return <code>void</code>.
2870         * </p>
2871         */
2872        JPA_PERFTRACE_WARNING(
2873                        void.class,
2874                        "ca.uhn.fhir.rest.api.server.RequestDetails",
2875                        "ca.uhn.fhir.rest.server.servlet.ServletRequestDetails",
2876                        "ca.uhn.fhir.jpa.model.search.StorageProcessingMessage"),
2877
2878        /**
2879         * <b>Performance Tracing Hook:</b>
2880         * This hook is invoked when a search has returned the very first result
2881         * from the database. The timing on this call can be a good indicator of how
2882         * performant a query is in general.
2883         * <p>
2884         * Note that this is a performance tracing hook. Use with caution in production
2885         * systems, since calling it may (or may not) carry a cost.
2886         * </p>
2887         * Hooks may accept the following parameters:
2888         * <ul>
2889         * <li>
2890         * ca.uhn.fhir.rest.api.server.RequestDetails - A bean containing details about the request that is about to be processed, including details such as the
2891         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
2892         * pulled out of the servlet request. Note that the bean
2893         * properties are not all guaranteed to be populated, depending on how early during processing the
2894         * exception occurred.
2895         * </li>
2896         * <li>
2897         * ca.uhn.fhir.rest.server.servlet.ServletRequestDetails - A bean containing details about the request that is about to be processed, including details such as the
2898         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
2899         * pulled out of the servlet request. This parameter is identical to the RequestDetails parameter above but will
2900         * only be populated when operating in a RestfulServer implementation. It is provided as a convenience.
2901         * </li>
2902         * <li>
2903         * ca.uhn.fhir.jpa.model.search.SearchRuntimeDetails - Contains details about the search being
2904         * performed. Hooks should not modify this object.
2905         * </li>
2906         * </ul>
2907         * <p>
2908         * Hooks should return <code>void</code>.
2909         * </p>
2910         */
2911        JPA_PERFTRACE_SEARCH_FIRST_RESULT_LOADED(
2912                        void.class,
2913                        "ca.uhn.fhir.rest.api.server.RequestDetails",
2914                        "ca.uhn.fhir.rest.server.servlet.ServletRequestDetails",
2915                        "ca.uhn.fhir.jpa.model.search.SearchRuntimeDetails"),
2916
2917        /**
2918         * <b>Performance Tracing Hook:</b>
2919         * This hook is invoked when an individual search query SQL SELECT statement
2920         * has completed and no more results are available from that query. Note that this
2921         * doesn't necessarily mean that no more matching results exist in the database,
2922         * since HAPI FHIR JPA batch loads results in to the query cache in chunks in order
2923         * to provide predicable results without overloading memory or the database.
2924         * <p>
2925         * Note that this is a performance tracing hook. Use with caution in production
2926         * systems, since calling it may (or may not) carry a cost.
2927         * </p>
2928         * Hooks may accept the following parameters:
2929         * <ul>
2930         * <li>
2931         * ca.uhn.fhir.rest.api.server.RequestDetails - A bean containing details about the request that is about to be processed, including details such as the
2932         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
2933         * pulled out of the servlet request. Note that the bean
2934         * properties are not all guaranteed to be populated, depending on how early during processing the
2935         * exception occurred.
2936         * </li>
2937         * <li>
2938         * ca.uhn.fhir.rest.server.servlet.ServletRequestDetails - A bean containing details about the request that is about to be processed, including details such as the
2939         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
2940         * pulled out of the servlet request. This parameter is identical to the RequestDetails parameter above but will
2941         * only be populated when operating in a RestfulServer implementation. It is provided as a convenience.
2942         * </li>
2943         * <li>
2944         * ca.uhn.fhir.jpa.model.search.SearchRuntimeDetails - Contains details about the search being
2945         * performed. Hooks should not modify this object.
2946         * </li>
2947         * </ul>
2948         * <p>
2949         * Hooks should return <code>void</code>.
2950         * </p>
2951         */
2952        JPA_PERFTRACE_SEARCH_SELECT_COMPLETE(
2953                        void.class,
2954                        "ca.uhn.fhir.rest.api.server.RequestDetails",
2955                        "ca.uhn.fhir.rest.server.servlet.ServletRequestDetails",
2956                        "ca.uhn.fhir.jpa.model.search.SearchRuntimeDetails"),
2957
2958        /**
2959         * <b>Performance Tracing Hook:</b>
2960         * This hook is invoked when a search has failed for any reason. When this pointcut
2961         * is invoked, the search has completed unsuccessfully and will not be continued.
2962         * <p>
2963         * Note that this is a performance tracing hook. Use with caution in production
2964         * systems, since calling it may (or may not) carry a cost.
2965         * </p>
2966         * Hooks may accept the following parameters:
2967         * <ul>
2968         * <li>
2969         * ca.uhn.fhir.rest.api.server.RequestDetails - A bean containing details about the request that is about to be processed, including details such as the
2970         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
2971         * pulled out of the servlet request. Note that the bean
2972         * properties are not all guaranteed to be populated, depending on how early during processing the
2973         * exception occurred.
2974         * </li>
2975         * <li>
2976         * ca.uhn.fhir.rest.server.servlet.ServletRequestDetails - A bean containing details about the request that is about to be processed, including details such as the
2977         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
2978         * pulled out of the servlet request. This parameter is identical to the RequestDetails parameter above but will
2979         * only be populated when operating in a RestfulServer implementation. It is provided as a convenience.
2980         * </li>
2981         * <li>
2982         * ca.uhn.fhir.jpa.model.search.SearchRuntimeDetails - Contains details about the search being
2983         * performed. Hooks should not modify this object.
2984         * </li>
2985         * </ul>
2986         * <p>
2987         * Hooks should return <code>void</code>.
2988         * </p>
2989         */
2990        JPA_PERFTRACE_SEARCH_FAILED(
2991                        void.class,
2992                        "ca.uhn.fhir.rest.api.server.RequestDetails",
2993                        "ca.uhn.fhir.rest.server.servlet.ServletRequestDetails",
2994                        "ca.uhn.fhir.jpa.model.search.SearchRuntimeDetails"),
2995
2996        /**
2997         * <b>Performance Tracing Hook:</b>
2998         * This hook is invoked when a search has completed. When this pointcut
2999         * is invoked, a pass in the Search Coordinator has completed successfully, but
3000         * not all possible resources have been loaded yet so a future paging request
3001         * may trigger a new task that will load further resources.
3002         * <p>
3003         * Note that this is a performance tracing hook. Use with caution in production
3004         * systems, since calling it may (or may not) carry a cost.
3005         * </p>
3006         * Hooks may accept the following parameters:
3007         * <ul>
3008         * <li>
3009         * ca.uhn.fhir.rest.api.server.RequestDetails - A bean containing details about the request that is about to be processed, including details such as the
3010         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
3011         * pulled out of the servlet request. Note that the bean
3012         * properties are not all guaranteed to be populated, depending on how early during processing the
3013         * exception occurred.
3014         * </li>
3015         * <li>
3016         * ca.uhn.fhir.rest.server.servlet.ServletRequestDetails - A bean containing details about the request that is about to be processed, including details such as the
3017         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
3018         * pulled out of the servlet request. This parameter is identical to the RequestDetails parameter above but will
3019         * only be populated when operating in a RestfulServer implementation. It is provided as a convenience.
3020         * </li>
3021         * <li>
3022         * ca.uhn.fhir.jpa.model.search.SearchRuntimeDetails - Contains details about the search being
3023         * performed. Hooks should not modify this object.
3024         * </li>
3025         * </ul>
3026         * <p>
3027         * Hooks should return <code>void</code>.
3028         * </p>
3029         */
3030        JPA_PERFTRACE_SEARCH_PASS_COMPLETE(
3031                        void.class,
3032                        "ca.uhn.fhir.rest.api.server.RequestDetails",
3033                        "ca.uhn.fhir.rest.server.servlet.ServletRequestDetails",
3034                        "ca.uhn.fhir.jpa.model.search.SearchRuntimeDetails"),
3035
3036        /**
3037         * <b>Performance Tracing Hook:</b>
3038         * This hook is invoked when a query involving an external index (e.g. Elasticsearch) has completed. When this pointcut
3039         * is invoked, an initial list of resource IDs has been generated which will be used as part of a subsequent database query.
3040         * <p>
3041         * Note that this is a performance tracing hook. Use with caution in production
3042         * systems, since calling it may (or may not) carry a cost.
3043         * </p>
3044         * Hooks may accept the following parameters:
3045         * <ul>
3046         * <li>
3047         * ca.uhn.fhir.rest.api.server.RequestDetails - A bean containing details about the request that is about to be processed, including details such as the
3048         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
3049         * pulled out of the servlet request. Note that the bean
3050         * properties are not all guaranteed to be populated, depending on how early during processing the
3051         * exception occurred.
3052         * </li>
3053         * <li>
3054         * ca.uhn.fhir.rest.server.servlet.ServletRequestDetails - A bean containing details about the request that is about to be processed, including details such as the
3055         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
3056         * pulled out of the servlet request. This parameter is identical to the RequestDetails parameter above but will
3057         * only be populated when operating in a RestfulServer implementation. It is provided as a convenience.
3058         * </li>
3059         * <li>
3060         * ca.uhn.fhir.jpa.model.search.SearchRuntimeDetails - Contains details about the search being
3061         * performed. Hooks should not modify this object.
3062         * </li>
3063         * </ul>
3064         * <p>
3065         * Hooks should return <code>void</code>.
3066         * </p>
3067         */
3068        JPA_PERFTRACE_INDEXSEARCH_QUERY_COMPLETE(
3069                        void.class,
3070                        "ca.uhn.fhir.rest.api.server.RequestDetails",
3071                        "ca.uhn.fhir.rest.server.servlet.ServletRequestDetails",
3072                        "ca.uhn.fhir.jpa.model.search.SearchRuntimeDetails"),
3073
3074        /**
3075         * <b>Performance Tracing Hook:</b>
3076         * Invoked when the storage engine is about to reuse the results of
3077         * a previously cached search.
3078         * <p>
3079         * Note that this is a performance tracing hook. Use with caution in production
3080         * systems, since calling it may (or may not) carry a cost.
3081         * </p>
3082         * <p>
3083         * Hooks may accept the following parameters:
3084         * </p>
3085         * <ul>
3086         * <li>
3087         * ca.uhn.fhir.jpa.searchparam.SearchParameterMap - Contains the details of the search being checked
3088         * </li>
3089         * <li>
3090         * ca.uhn.fhir.rest.api.server.RequestDetails - A bean containing details about the request that is about to be processed, including details such as the
3091         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
3092         * pulled out of the servlet request. Note that the bean
3093         * properties are not all guaranteed to be populated, depending on how early during processing the
3094         * exception occurred. <b>Note that this parameter may be null in contexts where the request is not
3095         * known, such as while processing searches</b>
3096         * </li>
3097         * <li>
3098         * ca.uhn.fhir.rest.server.servlet.ServletRequestDetails - A bean containing details about the request that is about to be processed, including details such as the
3099         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
3100         * pulled out of the servlet request. This parameter is identical to the RequestDetails parameter above but will
3101         * only be populated when operating in a RestfulServer implementation. It is provided as a convenience.
3102         * </li>
3103         * </ul>
3104         * <p>
3105         * Hooks should return <code>void</code>.
3106         * </p>
3107         */
3108        JPA_PERFTRACE_SEARCH_REUSING_CACHED(
3109                        boolean.class,
3110                        "ca.uhn.fhir.jpa.searchparam.SearchParameterMap",
3111                        "ca.uhn.fhir.rest.api.server.RequestDetails",
3112                        "ca.uhn.fhir.rest.server.servlet.ServletRequestDetails"),
3113
3114        /**
3115         * <b>Performance Tracing Hook:</b>
3116         * This hook is invoked when a search has failed for any reason. When this pointcut
3117         * is invoked, a pass in the Search Coordinator has completed successfully, and all
3118         * possible results have been fetched and loaded into the query cache.
3119         * <p>
3120         * Note that this is a performance tracing hook. Use with caution in production
3121         * systems, since calling it may (or may not) carry a cost.
3122         * </p>
3123         * Hooks may accept the following parameters:
3124         * <ul>
3125         * <li>
3126         * ca.uhn.fhir.rest.api.server.RequestDetails - A bean containing details about the request that is about to be processed, including details such as the
3127         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
3128         * pulled out of the servlet request. Note that the bean
3129         * properties are not all guaranteed to be populated, depending on how early during processing the
3130         * exception occurred.
3131         * </li>
3132         * <li>
3133         * ca.uhn.fhir.rest.server.servlet.ServletRequestDetails - A bean containing details about the request that is about to be processed, including details such as the
3134         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
3135         * pulled out of the servlet request. This parameter is identical to the RequestDetails parameter above but will
3136         * only be populated when operating in a RestfulServer implementation. It is provided as a convenience.
3137         * </li>
3138         * <li>
3139         * ca.uhn.fhir.jpa.model.search.SearchRuntimeDetails - Contains details about the search being
3140         * performed. Hooks should not modify this object.
3141         * </li>
3142         * </ul>
3143         * <p>
3144         * Hooks should return <code>void</code>.
3145         * </p>
3146         */
3147        JPA_PERFTRACE_SEARCH_COMPLETE(
3148                        void.class,
3149                        "ca.uhn.fhir.rest.api.server.RequestDetails",
3150                        "ca.uhn.fhir.rest.server.servlet.ServletRequestDetails",
3151                        "ca.uhn.fhir.jpa.model.search.SearchRuntimeDetails"),
3152
3153        /**
3154         * <b>Performance Tracing Hook:</b>
3155         * <p>
3156         * This hook is invoked when a search has found an individual ID.
3157         * </p>
3158         * <p>
3159         * THIS IS AN EXPERIMENTAL HOOK AND MAY BE REMOVED OR CHANGED WITHOUT WARNING.
3160         * </p>
3161         * <p>
3162         * Note that this is a performance tracing hook. Use with caution in production
3163         * systems, since calling it may (or may not) carry a cost.
3164         * </p>
3165         * <p>
3166         * Hooks may accept the following parameters:
3167         * </p>
3168         * <ul>
3169         * <li>
3170         * java.lang.Integer - The query ID
3171         * </li>
3172         * <li>
3173         * java.lang.Object - The ID
3174         * </li>
3175         * </ul>
3176         * <p>
3177         * Hooks should return <code>void</code>.
3178         * </p>
3179         */
3180        JPA_PERFTRACE_SEARCH_FOUND_ID(void.class, "java.lang.Integer", "java.lang.Object"),
3181
3182        /**
3183         * <b>Performance Tracing Hook:</b>
3184         * This hook is invoked when a query has executed, and includes the raw SQL
3185         * statements that were executed against the database.
3186         * <p>
3187         * Note that this is a performance tracing hook. Use with caution in production
3188         * systems, since calling it may (or may not) carry a cost.
3189         * </p>
3190         * <p>
3191         * Hooks may accept the following parameters:
3192         * </p>
3193         * <ul>
3194         * <li>
3195         * ca.uhn.fhir.rest.api.server.RequestDetails - A bean containing details about the request that is about to be processed, including details such as the
3196         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
3197         * pulled out of the servlet request. Note that the bean
3198         * properties are not all guaranteed to be populated, depending on how early during processing the
3199         * exception occurred.
3200         * </li>
3201         * <li>
3202         * ca.uhn.fhir.rest.server.servlet.ServletRequestDetails - A bean containing details about the request that is about to be processed, including details such as the
3203         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
3204         * pulled out of the servlet request. This parameter is identical to the RequestDetails parameter above but will
3205         * only be populated when operating in a RestfulServer implementation. It is provided as a convenience.
3206         * </li>
3207         * <li>
3208         * ca.uhn.fhir.jpa.util.SqlQueryList - Contains details about the raw SQL queries.
3209         * </li>
3210         * </ul>
3211         * <p>
3212         * Hooks should return <code>void</code>.
3213         * </p>
3214         */
3215        JPA_PERFTRACE_RAW_SQL(
3216                        void.class,
3217                        "ca.uhn.fhir.rest.api.server.RequestDetails",
3218                        "ca.uhn.fhir.rest.server.servlet.ServletRequestDetails",
3219                        "ca.uhn.fhir.jpa.util.SqlQueryList"),
3220
3221        /**
3222         * <b> Deprecated but still supported.  Will eventually be removed.  <code>Please use Pointcut.STORAGE_BINARY_ASSIGN_BINARY_CONTENT_ID_PREFIX</code>  </b>
3223         * <b> Binary Blob Prefix Assigning Hook:</b>
3224         * <p>
3225         * Immediately before a binary blob is stored to its eventual data sink, this hook is called.
3226         * This hook allows implementers to provide a prefix to the binary blob's ID.
3227         * This is helpful in cases where you want to identify this blob for later retrieval outside of HAPI-FHIR. Note that allowable characters will depend on the specific storage sink being used.
3228         * <ul>
3229         * <li>
3230         * ca.uhn.fhir.rest.api.server.RequestDetails - A bean containing details about the request that is about to be processed, including details such as the
3231         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
3232         * pulled out of the servlet request. Note that the bean
3233         * properties are not all guaranteed to be populated.
3234         * </li>
3235         * <li>
3236         * org.hl7.fhir.instance.model.api.IBaseBinary - The binary resource that is about to be stored.
3237         * </li>
3238         * </ul>
3239         * <p>
3240         * Hooks should return <code>String</code>, which represents the full prefix to be applied to the blob.
3241         * </p>
3242         */
3243        @Deprecated(since = "7.2.0 - Use STORAGE_BINARY_ASSIGN_BINARY_CONTENT_ID_PREFIX instead.")
3244        STORAGE_BINARY_ASSIGN_BLOB_ID_PREFIX(
3245                        String.class,
3246                        "ca.uhn.fhir.rest.api.server.RequestDetails",
3247                        "org.hl7.fhir.instance.model.api.IBaseResource"),
3248
3249        /**
3250         * <b> Binary Content Prefix Assigning Hook:</b>
3251         * <p>
3252         * Immediately before binary content is stored to its eventual data sink, this hook is called.
3253         * This hook allows implementers to provide a prefix to the binary content's ID.
3254         * This is helpful in cases where you want to identify this blob for later retrieval outside of HAPI-FHIR. Note that allowable characters will depend on the specific storage sink being used.
3255         * <ul>
3256         * <li>
3257         * ca.uhn.fhir.rest.api.server.RequestDetails - A bean containing details about the request that is about to be processed, including details such as the
3258         * resource type and logical ID (if any) and other FHIR-specific aspects of the request which have been
3259         * pulled out of the servlet request. Note that the bean
3260         * properties are not all guaranteed to be populated.
3261         * </li>
3262         * <li>
3263         * org.hl7.fhir.instance.model.api.IBaseBinary - The binary resource that is about to be stored.
3264         * </li>
3265         * </ul>
3266         * <p>
3267         * Hooks should return <code>String</code>, which represents the full prefix to be applied to the blob.
3268         * </p>
3269         */
3270        STORAGE_BINARY_ASSIGN_BINARY_CONTENT_ID_PREFIX(
3271                        String.class,
3272                        "ca.uhn.fhir.rest.api.server.RequestDetails",
3273                        "org.hl7.fhir.instance.model.api.IBaseResource"),
3274
3275        /**
3276         * <b>Storage Hook:</b>
3277         * Invoked before a batch job is persisted to the database.
3278         * <p>
3279         * Hooks will have access to the content of the job being created
3280         * and may choose to make modifications to it. These changes will be
3281         * reflected in permanent storage.
3282         * </p>
3283         * Hooks may accept the following parameters:
3284         * <ul>
3285         * <li>
3286         * ca.uhn.fhir.batch2.model.JobInstance
3287         * </li>
3288         * <li>
3289         * ca.uhn.fhir.rest.api.server.RequestDetails - A bean containing details about the request that lead to the creation
3290         * of the jobInstance.
3291         * </li>
3292         * </ul>
3293         * <p>
3294         * Hooks should return <code>void</code>.
3295         * </p>
3296         */
3297        STORAGE_PRESTORAGE_BATCH_JOB_CREATE(
3298                        void.class, "ca.uhn.fhir.batch2.model.JobInstance", "ca.uhn.fhir.rest.api.server.RequestDetails"),
3299
3300        /**
3301         * <b>CDS Hooks Prefetch Hook:</b>
3302         * Invoked before a CDS Hooks prefetch request is made.
3303         * Hooks may accept the following parameters:
3304         * <ul>
3305         *     <li> "ca.uhn.hapi.fhir.cdshooks.api.json.prefetch.CdsHookPrefetchPointcutContextJson" - The prefetch query, template and resolution strategy used for the request.
3306         *              This parameter also contains a user data map <code>(String, Object)</code>, that allows data to be store between pointcut
3307         *              invocations of a prefetch request/response.</li>
3308         *     <li> "ca.uhn.fhir.rest.api.server.cdshooks.CdsServiceRequestJson" - The CDS Hooks request that the prefetch is being made for</li>
3309         *  </ul>
3310         *
3311         * <p>
3312         * Hooks should return <code>void</code>.
3313         * </p>
3314         */
3315        CDS_HOOK_PREFETCH_REQUEST(
3316                        void.class,
3317                        "ca.uhn.hapi.fhir.cdshooks.api.json.prefetch.CdsHookPrefetchPointcutContextJson",
3318                        "ca.uhn.fhir.rest.api.server.cdshooks.CdsServiceRequestJson"),
3319
3320        /**
3321         * <b>CDS Hooks Prefetch Hook:</b>
3322         * Invoked after CDS Hooks prefetch request is completed successfully.
3323         * Hooks may accept the following parameters:
3324         * <ul>
3325         *     <li> "ca.uhn.hapi.fhir.cdshooks.api.json.prefetch.CdsHookPrefetchPointcutContextJson" - The prefetch query and template and resolution strategy used for the request.
3326         *              This parameter also contains a user data map <code>(String, Object)</code>, that allows data to be store between pointcut
3327         *              invocations of a prefetch request/response.</li>
3328         *     <li> "ca.uhn.fhir.rest.api.server.cdshooks.CdsServiceRequestJson" - The CDS Hooks request that the prefetch is being made for</li>
3329         *     <li> "org.hl7.fhir.instance.model.api.IBaseResource" - The resource that is returned by the prefetch
3330         *     request</li>
3331         *  </ul>
3332         *
3333         * <p>
3334         * Hooks should return <code>void</code>.
3335         * </p>
3336         */
3337        CDS_HOOK_PREFETCH_RESPONSE(
3338                        void.class,
3339                        "ca.uhn.hapi.fhir.cdshooks.api.json.prefetch.CdsHookPrefetchPointcutContextJson",
3340                        "ca.uhn.fhir.rest.api.server.cdshooks.CdsServiceRequestJson",
3341                        "org.hl7.fhir.instance.model.api.IBaseResource"),
3342
3343        /**
3344         * <b>CDS Hooks Prefetch Hook:</b>
3345         * Invoked after a failed CDS Hooks prefetch request.
3346         * Hooks may accept the following parameters:
3347         * <ul>
3348         *     <li> "ca.uhn.hapi.fhir.cdshooks.api.json.prefetch.CdsHookPrefetchPointcutContextJson" - The prefetch query and template and resolution strategy used for the request.
3349         *                      This parameter also contains a user data map <code>(String, Object)</code>, that allows data to be store between pointcut
3350         *                      invocations of a prefetch request/response.</li>
3351         *     <li> "ca.uhn.fhir.rest.api.server.cdshooks.CdsServiceRequestJson" - The CDS Hooks request that the prefetch is being made for</li>
3352         *     <li> "java.lang.Exception" - The exception that caused the failure of the prefetch request</li>
3353         *  </ul>
3354         *
3355         * <p>
3356         * Hooks should return <code>void</code>.
3357         * </p>
3358         */
3359        CDS_HOOK_PREFETCH_FAILED(
3360                        void.class,
3361                        "ca.uhn.hapi.fhir.cdshooks.api.json.prefetch.CdsHookPrefetchPointcutContextJson",
3362                        "ca.uhn.fhir.rest.api.server.cdshooks.CdsServiceRequestJson",
3363                        "java.lang.Exception"),
3364
3365        /**
3366         * <b>Batch2 Hook:</b>
3367         * <p>This is a filter hook that can be used around workchunk processing.
3368         * It is expected that implementers return an <code>IInterceptorFilterHook</code> that invokes the supplier
3369         * and includes the logic that should be executed:</p>
3370         * <ol>
3371         *     <li>Before a workchunk has been processed</li>
3372         *     <li>If an error occurs during processing</li>
3373         *     <li>After the workchunk has been processed</li>
3374         * </ol>
3375         * <p>Parameters:</p>
3376         * <ul>
3377         *     <li>ca.uhn.fhir.batch2.model.JobInstance - The job instance</li>
3378         *     <li>ca.uhn.fhir.batch2.model.WorkChunk - The work chunk</li>
3379         *  </ul>
3380         * <p>Hooks should return an {@link ca.uhn.fhir.interceptor.api.IBaseInterceptorBroadcaster.IInterceptorFilterHook}</p>
3381         * <p>For more details see <a href="http://hapifhir.io/hapi-fhir/docs/interceptors/filter_hook_interceptors.html">Filter Hook Interceptors</a></p>
3382         */
3383        BATCH2_CHUNK_PROCESS_FILTER(
3384                        IInterceptorFilterHook.class, "ca.uhn.fhir.batch2.model.JobInstance", "ca.uhn.fhir.batch2.model.WorkChunk"),
3385
3386        /**
3387         * <b>Provenance Agents Pointcut:</b>
3388         * This is a pointcut to retrieve data for populating the agent element of a Provenance resource that needs to be created
3389         * as a result of a request, such as a $merge or a $hapi.fhir.replace-references operation.
3390         * <p> Hooks should accept the following parameter:</p>
3391         * <ul>
3392         *     <li>ca.uhn.fhir.jpa.model.ProvenanceAgentPointcutParameters - an object containing the parameters for the hook, including:</li>
3393         *     <ul>
3394         *         <li>ca.uhn.fhir.rest.api.server.RequestDetails - A bean containing details about the request that is being processed.</li>
3395         *         <li>List of ca.uhn.fhir.model.api.IProvenanceAgent - This is an output parameter; the hook should add the agent information to this list</li>
3396         *     </ul>
3397         * </ul>
3398         * Hooks should return <code>void</code> and use the parameter object to add the agent information.
3399         */
3400        PROVENANCE_AGENTS(void.class, "ca.uhn.fhir.jpa.model.IProvenanceAgentsPointcutParameter"),
3401
3402        /**
3403         * This pointcut is used only for unit tests. Do not use in production code as it may be changed or
3404         * removed at any time.
3405         */
3406        TEST_RB(
3407                        boolean.class,
3408                        new ExceptionHandlingSpec().addLogAndSwallow(IllegalStateException.class),
3409                        String.class.getName(),
3410                        String.class.getName()),
3411
3412        /**
3413         * This pointcut is used only for unit tests. Do not use in production code as it may be changed or
3414         * removed at any time.
3415         */
3416        TEST_FILTER(IInterceptorFilterHook.class, String.class.getName()),
3417
3418        /**
3419         * This pointcut is used only for unit tests. Do not use in production code as it may be changed or
3420         * removed at any time.
3421         */
3422        TEST_RO(BaseServerResponseException.class, String.class.getName(), String.class.getName());
3423
3424        private final List<String> myParameterTypes;
3425        private final Class<?> myReturnType;
3426        private final ExceptionHandlingSpec myExceptionHandlingSpec;
3427
3428        Pointcut(@Nonnull String theReturnType, String... theParameterTypes) {
3429                this(toReturnTypeClass(theReturnType), new ExceptionHandlingSpec(), theParameterTypes);
3430        }
3431
3432        Pointcut(
3433                        @Nonnull Class<?> theReturnType,
3434                        @Nonnull ExceptionHandlingSpec theExceptionHandlingSpec,
3435                        String... theParameterTypes) {
3436
3437                // This enum uses the lowercase-b boolean type to indicate boolean return pointcuts
3438                Validate.isTrue(!theReturnType.equals(Boolean.class), "Return type Boolean not allowed here, must be boolean");
3439
3440                myReturnType = theReturnType;
3441                myExceptionHandlingSpec = theExceptionHandlingSpec;
3442                myParameterTypes = Collections.unmodifiableList(Arrays.asList(theParameterTypes));
3443        }
3444
3445        Pointcut(@Nonnull Class<?> theReturnType, String... theParameterTypes) {
3446                this(theReturnType, new ExceptionHandlingSpec(), theParameterTypes);
3447        }
3448
3449        @Override
3450        public boolean isShouldLogAndSwallowException(@Nonnull Throwable theException) {
3451                for (Class<? extends Throwable> next : myExceptionHandlingSpec.myTypesToLogAndSwallow) {
3452                        if (next.isAssignableFrom(theException.getClass())) {
3453                                return true;
3454                        }
3455                }
3456                return false;
3457        }
3458
3459        @Override
3460        @Nonnull
3461        public Class<?> getReturnType() {
3462                return myReturnType;
3463        }
3464
3465        @Override
3466        public Class<?> getBooleanReturnTypeForEnum() {
3467                return boolean.class;
3468        }
3469
3470        @Override
3471        @Nonnull
3472        public List<String> getParameterTypes() {
3473                return myParameterTypes;
3474        }
3475
3476        private static class UnknownType {}
3477
3478        private static class ExceptionHandlingSpec {
3479
3480                private final Set<Class<? extends Throwable>> myTypesToLogAndSwallow = new HashSet<>();
3481
3482                ExceptionHandlingSpec addLogAndSwallow(@Nonnull Class<? extends Throwable> theType) {
3483                        myTypesToLogAndSwallow.add(theType);
3484                        return this;
3485                }
3486        }
3487
3488        private static Class<?> toReturnTypeClass(String theReturnType) {
3489                try {
3490                        return Class.forName(theReturnType);
3491                } catch (ClassNotFoundException theE) {
3492                        return UnknownType.class;
3493                }
3494        }
3495}