Interface IServerOperationInterceptor

All Superinterfaces:
IServerInterceptor
All Known Implementing Classes:
ServerOperationInterceptorAdapter

Deprecated.
Ths interface is no longer neccessary as of HAPI FHIR 3.8.0 - You can create interceptor methods that are declared using the Hook annotation without needing to implement any interceptor
Server interceptor with added methods which can be called within the lifecycle of write operations (create/update/delete) or within transaction and batch operations that call these sub-operations.
See Also:
  • Method Details

    • resourceCreated

      void resourceCreated(RequestDetails theRequest, org.hl7.fhir.instance.model.api.IBaseResource theResource)
      Deprecated.
      This method is called by the server immediately after a resource has been created, within the database transaction scope of the operation.

      If an exception is thrown by an interceptor during this method, the transaction will be rolled back.

    • resourceDeleted

      void resourceDeleted(RequestDetails theRequest, org.hl7.fhir.instance.model.api.IBaseResource theResource)
      Deprecated.
      This method is called by the server immediately after a resource has been deleted, within the database transaction scope of the operation.

      If an exception is thrown by an interceptor during this method, the transaction will be rolled back.

    • resourcePreCreate

      void resourcePreCreate(RequestDetails theRequest, org.hl7.fhir.instance.model.api.IBaseResource theResource)
      Deprecated.
      This method is called by the server immediately before a resource is about to be created, within the database transaction scope of the operation.

      This method may be used to modify the resource

      If an exception is thrown by an interceptor during this method, the transaction will be rolled back.

      Parameters:
      theResource - The resource that has been provided by the client as the payload to create. Interceptors may modify this resource, and modifications will affect what is saved in the database.
    • resourcePreDelete

      void resourcePreDelete(RequestDetails theRequest, org.hl7.fhir.instance.model.api.IBaseResource theResource)
      Deprecated.
      This method is called by the server immediately before a resource is about to be deleted, within the database transaction scope of the operation.

      If an exception is thrown by an interceptor during this method, the transaction will be rolled back.

      Parameters:
      theResource - The resource which is about to be deleted
    • resourcePreUpdate

      void resourcePreUpdate(RequestDetails theRequest, org.hl7.fhir.instance.model.api.IBaseResource theOldResource, org.hl7.fhir.instance.model.api.IBaseResource theNewResource)
      Deprecated.
      This method is called by the server immediately before a resource is about to be updated, within the database transaction scope of the operation.

      This method may be used to modify the resource

      If an exception is thrown by an interceptor during this method, the transaction will be rolled back.

      Parameters:
      theOldResource - The previous version of the resource, or null if this is not available. Interceptors should be able to handle situations where this is null, since it is not always convenient or possible to provide a value for this field, but servers should try to populate it.
      theNewResource - The resource that has been provided by the client as the payload to update to the resource to. Interceptors may modify this resource, and modifications will affect what is saved in the database.
    • resourceUpdated

      @Deprecated void resourceUpdated(RequestDetails theRequest, org.hl7.fhir.instance.model.api.IBaseResource theResource)
      Deprecated.
      Deprecated in HAPI FHIR 3.0.0 in favour of resourceUpdated(RequestDetails, IBaseResource, IBaseResource)
    • resourceUpdated

      void resourceUpdated(RequestDetails theRequest, org.hl7.fhir.instance.model.api.IBaseResource theOldResource, org.hl7.fhir.instance.model.api.IBaseResource theNewResource)
      Deprecated.
      This method is called by the server immediately after a resource has been created, within the database transaction scope of the operation.

      If an exception is thrown by an interceptor during this method, the transaction will be rolled back.

      Parameters:
      theOldResource - The resource as it was before the update, or null if this is not available. Interceptors should be able to handle situations where this is null, since it is not always convenient or possible to provide a value for this field, but servers should try to populate it.
      theNewResource - The resource as it will be after the update