Package ca.uhn.fhir.rest.server.tenant
Class UrlBaseTenantIdentificationStrategy
- java.lang.Object
-
- ca.uhn.fhir.rest.server.tenant.UrlBaseTenantIdentificationStrategy
-
- All Implemented Interfaces:
ITenantIdentificationStrategy
public class UrlBaseTenantIdentificationStrategy extends Object implements ITenantIdentificationStrategy
This class is a tenant identification strategy which assumes that a single path element will be present between the server base URL and the beginning
-
-
Constructor Summary
Constructors Constructor Description UrlBaseTenantIdentificationStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidextractTenant(ca.uhn.fhir.util.UrlPathTokenizer theUrlPathTokenizer, RequestDetails theRequestDetails)Implementations should use this method to determine the tenant ID based on the incoming request andand populate it in theRequestDetails.setTenantId(String).StringmassageServerBaseUrl(String theFhirServerBase, RequestDetails theRequestDetails)Implementations may use this method to tweak the server base URL if necessary based on the tenant ID
-
-
-
Constructor Detail
-
UrlBaseTenantIdentificationStrategy
public UrlBaseTenantIdentificationStrategy()
-
-
Method Detail
-
extractTenant
public void extractTenant(ca.uhn.fhir.util.UrlPathTokenizer theUrlPathTokenizer, RequestDetails theRequestDetails)
Description copied from interface:ITenantIdentificationStrategyImplementations should use this method to determine the tenant ID based on the incoming request andand populate it in theRequestDetails.setTenantId(String).- Specified by:
extractTenantin interfaceITenantIdentificationStrategy- Parameters:
theUrlPathTokenizer- The tokenizer which is used to parse the request paththeRequestDetails- The request details object which can be used to access headers and to populate the tenant ID to
-
massageServerBaseUrl
public String massageServerBaseUrl(String theFhirServerBase, RequestDetails theRequestDetails)
Description copied from interface:ITenantIdentificationStrategyImplementations may use this method to tweak the server base URL if necessary based on the tenant ID- Specified by:
massageServerBaseUrlin interfaceITenantIdentificationStrategy
-
-