diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/partition/RequestTenantPartitionInterceptor.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/partition/RequestTenantPartitionInterceptor.java index 4791575c1cc..87c713b78e1 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/partition/RequestTenantPartitionInterceptor.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/partition/RequestTenantPartitionInterceptor.java @@ -69,7 +69,9 @@ public class RequestTenantPartitionInterceptor { throw new InternalErrorException(Msg.code(343) + "No partition ID has been specified"); } - if (tenantId.equals(ProviderConstants.ALL_PARTITIONS_NAME)) { + // for REQUEST_TENANT partition selection mode, allPartitions is supported when URL includes _ALL as the tenant + // else if no tenant is provided in the URL, DEFAULT will be used as per UrlBaseTenantIdentificationStrategy + if (tenantId.equals(ProviderConstants.ALL_PARTITIONS_TENANT_NAME)) { return RequestPartitionId.allPartitions(); } return RequestPartitionId.fromPartitionName(tenantId); diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/provider/ProviderConstants.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/provider/ProviderConstants.java index d0972c6a338..09a6137206e 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/provider/ProviderConstants.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/provider/ProviderConstants.java @@ -53,7 +53,7 @@ public class ProviderConstants { public static final String PARTITION_MANAGEMENT_PARTITION_DESC = "description"; public static final String DEFAULT_PARTITION_NAME = "DEFAULT"; - public static final String ALL_PARTITIONS_NAME = "_ALL"; + public static final String ALL_PARTITIONS_TENANT_NAME = "_ALL"; /** * Operation name: diff diff --git a/hapi-fhir-storage-batch2-jobs/src/main/java/ca/uhn/fhir/batch2/jobs/expunge/DeleteExpungeJobParametersValidator.java b/hapi-fhir-storage-batch2-jobs/src/main/java/ca/uhn/fhir/batch2/jobs/expunge/DeleteExpungeJobParametersValidator.java index e45003b5343..fcb3381b6a8 100644 --- a/hapi-fhir-storage-batch2-jobs/src/main/java/ca/uhn/fhir/batch2/jobs/expunge/DeleteExpungeJobParametersValidator.java +++ b/hapi-fhir-storage-batch2-jobs/src/main/java/ca/uhn/fhir/batch2/jobs/expunge/DeleteExpungeJobParametersValidator.java @@ -26,10 +26,10 @@ import ca.uhn.fhir.jpa.api.svc.IDeleteExpungeSvc; import ca.uhn.fhir.jpa.partition.IRequestPartitionHelperSvc; import ca.uhn.fhir.rest.api.server.RequestDetails; import ca.uhn.fhir.util.ValidateUtil; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; import java.util.List; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; public class DeleteExpungeJobParametersValidator implements IJobParametersValidator { private final IUrlListValidator myUrlListValidator;