Package com.ibm.fhir.server.interceptor
Class FHIRPersistenceInterceptorMgr
- java.lang.Object
-
- com.ibm.fhir.server.interceptor.FHIRPersistenceInterceptorMgr
-
public class FHIRPersistenceInterceptorMgr extends java.lang.Object
This class implements the FHIR persistence interceptor framework. This framework allows users to inject business logic into the REST API request processing code path at various points. Interceptors are discovered using the jdk's ServiceLoader class. To register an interceptor implementation, develop a class that implements the FHIRPersistenceInterceptor interface, and then insert your implementation class name into a file called META-INF/services/com.ibm.fhir.server.spi.interceptor.FHIRPersistenceInterceptor and store that file in your jar. These "interceptor" jars should be stored in a common place defined by the FHIR Server.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.util.List<FHIRPersistenceInterceptor>
interceptors
-
Method Summary
-
-
-
Field Detail
-
interceptors
java.util.List<FHIRPersistenceInterceptor> interceptors
-
-
Method Detail
-
getInstance
public static FHIRPersistenceInterceptorMgr getInstance()
-
addInterceptor
public void addInterceptor(FHIRPersistenceInterceptor interceptor)
This method can be used to programmatically register an interceptor such that it is added at the end of the list of registered interceptors.- Parameters:
interceptor
- persistence interceptor to be registered
-
addPrioritizedInterceptor
public void addPrioritizedInterceptor(FHIRPersistenceInterceptor interceptor)
This method can be used to programmatically register an interceptor such that it is added at the beginning of the list of registered interceptors.- Parameters:
interceptor
- persistence interceptor to be registered
-
fireBeforeCreateEvent
public void fireBeforeCreateEvent(FHIRPersistenceEvent event) throws FHIRPersistenceInterceptorException
The following methods will invoke the respective interceptor methods on each registered interceptor.
-
fireAfterCreateEvent
public void fireAfterCreateEvent(FHIRPersistenceEvent event) throws FHIRPersistenceInterceptorException
-
fireBeforeUpdateEvent
public void fireBeforeUpdateEvent(FHIRPersistenceEvent event) throws FHIRPersistenceInterceptorException
-
fireAfterUpdateEvent
public void fireAfterUpdateEvent(FHIRPersistenceEvent event) throws FHIRPersistenceInterceptorException
-
fireBeforePatchEvent
public void fireBeforePatchEvent(FHIRPersistenceEvent event) throws FHIRPersistenceInterceptorException
-
fireAfterPatchEvent
public void fireAfterPatchEvent(FHIRPersistenceEvent event) throws FHIRPersistenceInterceptorException
-
fireBeforeDeleteEvent
public void fireBeforeDeleteEvent(FHIRPersistenceEvent event) throws FHIRPersistenceInterceptorException
-
fireAfterDeleteEvent
public void fireAfterDeleteEvent(FHIRPersistenceEvent event) throws FHIRPersistenceInterceptorException
-
fireBeforeReadEvent
public void fireBeforeReadEvent(FHIRPersistenceEvent event) throws FHIRPersistenceInterceptorException
-
fireAfterReadEvent
public void fireAfterReadEvent(FHIRPersistenceEvent event) throws FHIRPersistenceInterceptorException
-
fireBeforeVreadEvent
public void fireBeforeVreadEvent(FHIRPersistenceEvent event) throws FHIRPersistenceInterceptorException
-
fireAfterVreadEvent
public void fireAfterVreadEvent(FHIRPersistenceEvent event) throws FHIRPersistenceInterceptorException
-
fireBeforeHistoryEvent
public void fireBeforeHistoryEvent(FHIRPersistenceEvent event) throws FHIRPersistenceInterceptorException
-
fireAfterHistoryEvent
public void fireAfterHistoryEvent(FHIRPersistenceEvent event) throws FHIRPersistenceInterceptorException
-
fireBeforeSearchEvent
public void fireBeforeSearchEvent(FHIRPersistenceEvent event) throws FHIRPersistenceInterceptorException
-
fireAfterSearchEvent
public void fireAfterSearchEvent(FHIRPersistenceEvent event) throws FHIRPersistenceInterceptorException
-
fireBeforeInvokeEvent
public void fireBeforeInvokeEvent(FHIROperationContext context) throws FHIRPersistenceInterceptorException
-
fireAfterInvokeEvent
public void fireAfterInvokeEvent(FHIROperationContext context) throws FHIRPersistenceInterceptorException
-
-