@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 operation = null; String compartment = null; if (tok.hasMoreTokens()) { resourceName = tok.nextTokenUnescapedAndSanitized(); if (partIsOperation(resourceName)) { if (tok.hasMoreTokens()) { String nextString = tok.nextTokenUnescapedAndSanitized(); if (partIsOperation(nextString)) { if (tok.hasMoreTokens()) { String nextString = tok.nextTokenUnescapedAndSanitized(); if (nextString.equals(Constants.PARAM_HISTORY)) { if (tok.hasMoreTokens()) { String versionString = tok.nextTokenUnescapedAndSanitized(); if (id == null) { while (tok.hasMoreTokens()) { String nextString = tok.nextTokenUnescapedAndSanitized(); if (operation == null) {
@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 operation = null; String compartment = null; if (tok.hasMoreTokens()) { resourceName = tok.nextTokenUnescapedAndSanitized(); if (partIsOperation(resourceName)) { if (tok.hasMoreTokens()) { String nextString = tok.nextTokenUnescapedAndSanitized(); if (partIsOperation(nextString)) { if (tok.hasMoreTokens()) { String nextString = tok.nextTokenUnescapedAndSanitized(); if (nextString.equals(Constants.PARAM_HISTORY)) { if (tok.hasMoreTokens()) { String versionString = tok.nextTokenUnescapedAndSanitized(); if (id == null) { while (tok.hasMoreTokens()) { String nextString = tok.nextTokenUnescapedAndSanitized(); if (operation == null) {