Class RequestPartitionHelperSvc

java.lang.Object
ca.uhn.fhir.jpa.partition.RequestPartitionHelperSvc
All Implemented Interfaces:
ca.uhn.fhir.jpa.partition.IRequestPartitionHelperSvc

public class RequestPartitionHelperSvc extends Object implements ca.uhn.fhir.jpa.partition.IRequestPartitionHelperSvc
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    ca.uhn.fhir.interceptor.model.RequestPartitionId
    determineCreatePartitionForRequest(ca.uhn.fhir.rest.api.server.RequestDetails theRequest, org.hl7.fhir.instance.model.api.IBaseResource theResource, String theResourceType)
    Invoke the Pointcut.STORAGE_PARTITION_IDENTIFY_CREATE interceptor pointcut to determine the tenant for a create request.
    ca.uhn.fhir.interceptor.model.RequestPartitionId
    determineReadPartitionForRequest(ca.uhn.fhir.rest.api.server.RequestDetails theRequest, String theResourceType, ca.uhn.fhir.interceptor.model.ReadPartitionIdRequestDetails theDetails)
    Invoke the Pointcut.STORAGE_PARTITION_IDENTIFY_READ interceptor pointcut to determine the tenant for a read request.
    toReadPartitions(ca.uhn.fhir.interceptor.model.RequestPartitionId theRequestPartitionId)
     
    toStoragePartition(ca.uhn.fhir.interceptor.model.RequestPartitionId theRequestPartitionId)
     
    void
    validateHasPartitionPermissions(ca.uhn.fhir.rest.api.server.RequestDetails theRequest, String theResourceType, ca.uhn.fhir.interceptor.model.RequestPartitionId theRequestPartitionId)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface ca.uhn.fhir.jpa.partition.IRequestPartitionHelperSvc

    determineReadPartitionForRequestForHistory, determineReadPartitionForRequestForRead, determineReadPartitionForRequestForSearchType
  • Constructor Details

  • Method Details

    • determineReadPartitionForRequest

      @Nonnull public ca.uhn.fhir.interceptor.model.RequestPartitionId determineReadPartitionForRequest(@Nullable ca.uhn.fhir.rest.api.server.RequestDetails theRequest, String theResourceType, ca.uhn.fhir.interceptor.model.ReadPartitionIdRequestDetails theDetails)
      Invoke the Pointcut.STORAGE_PARTITION_IDENTIFY_READ interceptor pointcut to determine the tenant for a read request.

      If no interceptors are registered with a hook for Pointcut.STORAGE_PARTITION_IDENTIFY_READ, return RequestPartitionId.allPartitions() instead.

      Specified by:
      determineReadPartitionForRequest in interface ca.uhn.fhir.jpa.partition.IRequestPartitionHelperSvc
    • determineCreatePartitionForRequest

      @Nonnull public ca.uhn.fhir.interceptor.model.RequestPartitionId determineCreatePartitionForRequest(@Nullable ca.uhn.fhir.rest.api.server.RequestDetails theRequest, @Nonnull org.hl7.fhir.instance.model.api.IBaseResource theResource, @Nonnull String theResourceType)
      Invoke the Pointcut.STORAGE_PARTITION_IDENTIFY_CREATE interceptor pointcut to determine the tenant for a create request.
      Specified by:
      determineCreatePartitionForRequest in interface ca.uhn.fhir.jpa.partition.IRequestPartitionHelperSvc
    • toStoragePartition

      @Nonnull public PartitionablePartitionId toStoragePartition(@Nonnull ca.uhn.fhir.interceptor.model.RequestPartitionId theRequestPartitionId)
      Specified by:
      toStoragePartition in interface ca.uhn.fhir.jpa.partition.IRequestPartitionHelperSvc
    • toReadPartitions

      @Nonnull public Set<Integer> toReadPartitions(@Nonnull ca.uhn.fhir.interceptor.model.RequestPartitionId theRequestPartitionId)
      Specified by:
      toReadPartitions in interface ca.uhn.fhir.jpa.partition.IRequestPartitionHelperSvc
    • validateHasPartitionPermissions

      public void validateHasPartitionPermissions(ca.uhn.fhir.rest.api.server.RequestDetails theRequest, String theResourceType, ca.uhn.fhir.interceptor.model.RequestPartitionId theRequestPartitionId)
      Specified by:
      validateHasPartitionPermissions in interface ca.uhn.fhir.jpa.partition.IRequestPartitionHelperSvc