@Override public void extractTenant(UrlPathTokenizer theUrlPathTokenizer, RequestDetails theRequestDetails) { String tenantId = null; if (theUrlPathTokenizer.hasMoreTokens()) { tenantId = defaultIfBlank(theUrlPathTokenizer.nextTokenUnescapedAndSanitized(), null); ourLog.trace("Found tenant ID {} in request string", tenantId); theRequestDetails.setTenantId(tenantId); } if (tenantId == null) { HapiLocalizer localizer = theRequestDetails.getServer().getFhirContext().getLocalizer(); throw new InvalidRequestException(localizer.getMessage(RestfulServer.class, "rootRequest.multitenant")); } }
String compartment = null; if (tok.hasMoreTokens()) { resourceName = tok.nextTokenUnescapedAndSanitized(); if (partIsOperation(resourceName)) { operation = resourceName; String nextString = tok.nextTokenUnescapedAndSanitized(); if (partIsOperation(nextString)) { operation = nextString; String nextString = tok.nextTokenUnescapedAndSanitized(); if (nextString.equals(Constants.PARAM_HISTORY)) { if (tok.hasMoreTokens()) { String versionString = tok.nextTokenUnescapedAndSanitized(); if (id == null) { throw new InvalidRequestException("Don't know how to handle request path: " + theRequestPath); String nextString = tok.nextTokenUnescapedAndSanitized(); if (operation == null) { operation = nextString;
@Override public void extractTenant(UrlPathTokenizer theUrlPathTokenizer, RequestDetails theRequestDetails) { String tenantId = null; if (theUrlPathTokenizer.hasMoreTokens()) { tenantId = defaultIfBlank(theUrlPathTokenizer.nextTokenUnescapedAndSanitized(), null); ourLog.trace("Found tenant ID {} in request string", tenantId); theRequestDetails.setTenantId(tenantId); } if (tenantId == null) { HapiLocalizer localizer = theRequestDetails.getServer().getFhirContext().getLocalizer(); throw new InvalidRequestException(localizer.getMessage(RestfulServer.class, "rootRequest.multitenant")); } }
String compartment = null; if (tok.hasMoreTokens()) { resourceName = tok.nextTokenUnescapedAndSanitized(); if (partIsOperation(resourceName)) { operation = resourceName; String nextString = tok.nextTokenUnescapedAndSanitized(); if (partIsOperation(nextString)) { operation = nextString; String nextString = tok.nextTokenUnescapedAndSanitized(); if (nextString.equals(Constants.PARAM_HISTORY)) { if (tok.hasMoreTokens()) { String versionString = tok.nextTokenUnescapedAndSanitized(); if (id == null) { throw new InvalidRequestException("Don't know how to handle request path: " + theRequestPath); String nextString = tok.nextTokenUnescapedAndSanitized(); if (operation == null) { operation = nextString;