Interface FHIRPersistenceInterceptor
-
- All Known Implementing Classes:
AuthzPolicyEnforcementPersistenceInterceptor
,FHIRNotificationService
public interface FHIRPersistenceInterceptor
This interface describes a persistence interceptor. Persistence interceptors are invoked by the FHIR Server to allow users to inject business logic into the REST API processing flow. To make use of this interceptor, develop a class that implements this interface, then store your implementation class name in a file called META-INF/services/com.ibm.fhir.persistence.FHIRPersistenceInterceptor within your jar file.
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default void
afterCreate(FHIRPersistenceEvent event)
This method is called during the processing of a 'create' REST API invocation, immediately after the new resource has been stored by the persistence layer.default void
afterDelete(FHIRPersistenceEvent event)
This method is called during the processing of a 'delete' REST API invocation, immediately after the resource has been deleted by the persistence layer.default void
afterHistory(FHIRPersistenceEvent event)
This method is called during the processing of a 'history' REST API invocation, immediately after the resource's history has been read by the persistence layer.default void
afterPatch(FHIRPersistenceEvent event)
This method is called during the processing of an 'patch' REST API invocation, immediately after the updated resource has been stored by the persistence layer.default void
afterRead(FHIRPersistenceEvent event)
This method is called during the processing of a 'read' REST API invocation, immediately after the resource has been read by the persistence layer.default void
afterSearch(FHIRPersistenceEvent event)
This method is called during the processing of a 'search' REST API invocation, immediately after the search has been performed by the persistence layer.default void
afterUpdate(FHIRPersistenceEvent event)
This method is called during the processing of an 'update' REST API invocation, immediately after the updated resource has been stored by the persistence layer.default void
afterVread(FHIRPersistenceEvent event)
This method is called during the processing of a 'vread' REST API invocation, immediately after the resource has been read by the persistence layer.default void
beforeCreate(FHIRPersistenceEvent event)
This method is called during the processing of a 'create' REST API invocation, immediately before the new resource is stored by the persistence layer.default void
beforeDelete(FHIRPersistenceEvent event)
This method is called during the processing of a 'delete' REST API invocation, immediately before the resource is deleted by the persistence layer.default void
beforeHistory(FHIRPersistenceEvent event)
This method is called during the processing of a 'history' REST API invocation, immediately before the resource's history is read by the persistence layer.default void
beforePatch(FHIRPersistenceEvent event)
This method is called during the processing of an 'patch' REST API invocation, immediately before the updated resource is stored by the persistence layer.default void
beforeRead(FHIRPersistenceEvent event)
This method is called during the processing of a 'read' REST API invocation, immediately before the resource is read by the persistence layer.default void
beforeSearch(FHIRPersistenceEvent event)
This method is called during the processing of a 'search' REST API invocation, immediately before the search is performed by the persistence layer.default void
beforeUpdate(FHIRPersistenceEvent event)
This method is called during the processing of an 'update' REST API invocation, immediately before the updated resource is stored by the persistence layer.default void
beforeVread(FHIRPersistenceEvent event)
This method is called during the processing of a 'vread' (versioned read) REST API invocation, immediately before the resource is read by the persistence layer.
-
-
-
Method Detail
-
beforeCreate
default void beforeCreate(FHIRPersistenceEvent event) throws FHIRPersistenceInterceptorException
This method is called during the processing of a 'create' REST API invocation, immediately before the new resource is stored by the persistence layer.- Parameters:
event
- information about the 'create' event- Throws:
FHIRPersistenceInterceptorException
-
afterCreate
default void afterCreate(FHIRPersistenceEvent event) throws FHIRPersistenceInterceptorException
This method is called during the processing of a 'create' REST API invocation, immediately after the new resource has been stored by the persistence layer.- Parameters:
event
- information about the 'create' event- Throws:
FHIRPersistenceInterceptorException
-
beforeUpdate
default void beforeUpdate(FHIRPersistenceEvent event) throws FHIRPersistenceInterceptorException
This method is called during the processing of an 'update' REST API invocation, immediately before the updated resource is stored by the persistence layer.- Parameters:
event
- information about the 'update' event- Throws:
FHIRPersistenceInterceptorException
-
afterUpdate
default void afterUpdate(FHIRPersistenceEvent event) throws FHIRPersistenceInterceptorException
This method is called during the processing of an 'update' REST API invocation, immediately after the updated resource has been stored by the persistence layer.- Parameters:
event
- information about the 'update' event- Throws:
FHIRPersistenceInterceptorException
-
beforePatch
default void beforePatch(FHIRPersistenceEvent event) throws FHIRPersistenceInterceptorException
This method is called during the processing of an 'patch' REST API invocation, immediately before the updated resource is stored by the persistence layer.- Parameters:
event
- information about the 'patch' event- Throws:
FHIRPersistenceInterceptorException
-
afterPatch
default void afterPatch(FHIRPersistenceEvent event) throws FHIRPersistenceInterceptorException
This method is called during the processing of an 'patch' REST API invocation, immediately after the updated resource has been stored by the persistence layer.- Parameters:
event
- information about the 'patch' event- Throws:
FHIRPersistenceInterceptorException
-
beforeDelete
default void beforeDelete(FHIRPersistenceEvent event) throws FHIRPersistenceInterceptorException
This method is called during the processing of a 'delete' REST API invocation, immediately before the resource is deleted by the persistence layer.- Parameters:
event
- information about the 'delete' event- Throws:
FHIRPersistenceInterceptorException
-
afterDelete
default void afterDelete(FHIRPersistenceEvent event) throws FHIRPersistenceInterceptorException
This method is called during the processing of a 'delete' REST API invocation, immediately after the resource has been deleted by the persistence layer.- Parameters:
event
- information about the 'delete' event- Throws:
FHIRPersistenceInterceptorException
-
beforeRead
default void beforeRead(FHIRPersistenceEvent event) throws FHIRPersistenceInterceptorException
This method is called during the processing of a 'read' REST API invocation, immediately before the resource is read by the persistence layer.- Parameters:
event
- information about the 'read' event- Throws:
FHIRPersistenceInterceptorException
-
afterRead
default void afterRead(FHIRPersistenceEvent event) throws FHIRPersistenceInterceptorException
This method is called during the processing of a 'read' REST API invocation, immediately after the resource has been read by the persistence layer.- Parameters:
event
- information about the 'read' event- Throws:
FHIRPersistenceInterceptorException
-
beforeVread
default void beforeVread(FHIRPersistenceEvent event) throws FHIRPersistenceInterceptorException
This method is called during the processing of a 'vread' (versioned read) REST API invocation, immediately before the resource is read by the persistence layer.- Parameters:
event
- information about the 'vread' event- Throws:
FHIRPersistenceInterceptorException
-
afterVread
default void afterVread(FHIRPersistenceEvent event) throws FHIRPersistenceInterceptorException
This method is called during the processing of a 'vread' REST API invocation, immediately after the resource has been read by the persistence layer.- Parameters:
event
- information about the 'vread' event- Throws:
FHIRPersistenceInterceptorException
-
beforeHistory
default void beforeHistory(FHIRPersistenceEvent event) throws FHIRPersistenceInterceptorException
This method is called during the processing of a 'history' REST API invocation, immediately before the resource's history is read by the persistence layer.- Parameters:
event
- information about the 'history' event- Throws:
FHIRPersistenceInterceptorException
-
afterHistory
default void afterHistory(FHIRPersistenceEvent event) throws FHIRPersistenceInterceptorException
This method is called during the processing of a 'history' REST API invocation, immediately after the resource's history has been read by the persistence layer.- Parameters:
event
- information about the 'history' event- Throws:
FHIRPersistenceInterceptorException
-
beforeSearch
default void beforeSearch(FHIRPersistenceEvent event) throws FHIRPersistenceInterceptorException
This method is called during the processing of a 'search' REST API invocation, immediately before the search is performed by the persistence layer.- Parameters:
event
- information about the 'search' event- Throws:
FHIRPersistenceInterceptorException
-
afterSearch
default void afterSearch(FHIRPersistenceEvent event) throws FHIRPersistenceInterceptorException
This method is called during the processing of a 'search' REST API invocation, immediately after the search has been performed by the persistence layer.- Parameters:
event
- information about the 'search' event- Throws:
FHIRPersistenceInterceptorException
-
-