Class InteractionBlockingInterceptor

java.lang.Object
ca.uhn.fhir.rest.server.interceptor.InteractionBlockingInterceptor

This interceptor can be used to selectively block specific interactions/operations from the server's capabilities. This interceptor must be configured and registered to a RestfulServer prior to any resource provider classes being registered to it. This interceptor will then examine any provider classes being registered and may choose to discard some or all of the method bindings on each provider.

For example, if this interceptor is configured to block resource creation, then when a resource provider is registered that has both a @Read method and a @Create method, the create method will be ignored and not bound.

Note: This interceptor is not a security interceptor! It can be used to remove writes capabilities from a FHIR endpoint (for example) but it does not guarantee that writes won't be possible. Security rules should be enforced using AuthorizationInterceptor or a similar strategy. However, this interceptor can be useful in order to clarify the intent of an endpoint to the outside world. Of particular note, even if a create method has been blocked from binding by this interceptor, it may still be possible to create resources via a FHIR transaction unless proper security has been implemented.

Use new Builder() to create a new instance of this class.

Since:
6.2.0
See Also: